capistrano-nomad 0.6.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/dsl.rb +16 -28
- data/lib/capistrano/nomad/helpers/nomad.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f13cb3a6f203bc88f1bad802dea89660937818fe4568824fb0f2aa9ed789fab
|
4
|
+
data.tar.gz: '09f27219c86a2fe67e2d47a660cabdef3844517954feba31141d4c38fb20d6a5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd44e5fb4c6cbd3db75cc22f67ef116d0ece07965c1e20387cebee287bf28de7b09ee9d8cd5d9b0cff29a1bb0ae0a5d16d0deb451cdeb731ddcdd32fbfa0a57
|
7
|
+
data.tar.gz: 9759e600f1bc654c9093b5e72606de756bf220271a11ee6a0b8fc770b78f78e638f4557ba6054e57326f4cd5ef4ee05de6183a66f1e0351fc9129bd5bbcf4177
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -60,10 +60,11 @@ nomad_docker_image_type :redis,
|
|
60
60
|
nomad_job :frontend
|
61
61
|
nomad_job :backend, docker_image_types: [:backend], var_files: [:rails]
|
62
62
|
nomad_job :redis, docker_image_types: [:redis]
|
63
|
+
nomad_job :"traefik-default", template: :traefik, erb_vars: { role: :default }
|
64
|
+
nomad_job :"traefik-secondary", template: :traefik, erb_vars: { role: :secondary }
|
63
65
|
|
64
66
|
nomad_namespace :analytics do
|
65
67
|
nomad_job :grafana
|
66
|
-
nomad_job :"node-exporter"
|
67
68
|
end
|
68
69
|
```
|
69
70
|
|
data/capistrano-nomad.gemspec
CHANGED
@@ -58,16 +58,6 @@ def nomad_job(name, attributes = {})
|
|
58
58
|
capistrano_nomad_rerun_jobs([name], namespace: namespace)
|
59
59
|
end
|
60
60
|
|
61
|
-
desc "Purge #{description_name} job"
|
62
|
-
task :purge do
|
63
|
-
capistrano_nomad_purge_jobs([name], namespace: namespace, is_detached: false)
|
64
|
-
end
|
65
|
-
|
66
|
-
desc "Display status of #{description_name} job"
|
67
|
-
task :status do
|
68
|
-
capistrano_nomad_display_job_status(name, namespace: namespace)
|
69
|
-
end
|
70
|
-
|
71
61
|
desc "Upload and plan #{description_name} job"
|
72
62
|
task :upload_plan do
|
73
63
|
capistrano_nomad_upload_plan_jobs([name], namespace: namespace)
|
@@ -90,24 +80,22 @@ def nomad_job(name, attributes = {})
|
|
90
80
|
|
91
81
|
desc "Restart #{description_name} job"
|
92
82
|
task :restart do
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
end
|
110
|
-
end
|
83
|
+
capistrano_nomad_restart_jobs([name], namespace: namespace)
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "Stop #{description_name} job"
|
87
|
+
task :stop do
|
88
|
+
capistrano_nomad_stop_jobs([name], namespace: namespace)
|
89
|
+
end
|
90
|
+
|
91
|
+
desc "Purge #{description_name} job"
|
92
|
+
task :purge do
|
93
|
+
capistrano_nomad_purge_jobs([name], namespace: namespace, is_detached: false)
|
94
|
+
end
|
95
|
+
|
96
|
+
desc "Display status of #{description_name} job"
|
97
|
+
task :status do
|
98
|
+
capistrano_nomad_display_job_status(name, namespace: namespace)
|
111
99
|
end
|
112
100
|
|
113
101
|
desc "Open console to #{description_name} job. Specify task by passing TASK environment variable"
|
@@ -321,6 +321,18 @@ def capistrano_nomad_deploy_jobs(names, *args)
|
|
321
321
|
capistrano_nomad_upload_run_jobs(names, *args)
|
322
322
|
end
|
323
323
|
|
324
|
+
def capistrano_nomad_stop_jobs(names, namespace: nil)
|
325
|
+
names.each do |name|
|
326
|
+
capistrano_nomad_execute_nomad_command(:job, :stop, { namespace: namespace }, name)
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
def capistrano_nomad_restart_jobs(names, namespace: nil)
|
331
|
+
names.each do |name|
|
332
|
+
capistrano_nomad_execute_nomad_command(:job, :restart, { namespace: namespace }, name)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
324
336
|
def capistrano_nomad_purge_jobs(names, namespace: nil, is_detached: true)
|
325
337
|
names.each do |name|
|
326
338
|
capistrano_nomad_execute_nomad_command(:stop, { namespace: namespace, purge: true, detach: is_detached }, name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-nomad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Hu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|