dlss-capistrano 4.3.1 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a9175c3b24ed9d85b9acd276d6ada0977e6a018a44c74a5947f8bb0dc37e5af
4
- data.tar.gz: 8df556cff57ab8e63f858670774c31c52796091c56f67317efadc5d9b1bb089a
3
+ metadata.gz: b6c18a333622bff0545dcea50dce10b384d8d230f60077d65b994df2fb03df6e
4
+ data.tar.gz: c16f14ba45ac6b9a268dddd3acc2bfafb1c0c9e0c5b0fd780070985a4987697a
5
5
  SHA512:
6
- metadata.gz: 65e48931177dd8b4ce95eb2fd89af85823f0d0bfc950b1ba1c15a0c1006ca0cf71cf26f2da8631058cc3880859412abbe860c2de55d66adfd3779a6fc7126bae
7
- data.tar.gz: 839b7dc8125c931470d1fe8a3409992694960b1deb143b0ea6f81a69a6fbf57e3b69d73b3e58460956033ead129ce788abefe3ef03535a7c5d1e748cadcfd24b
6
+ metadata.gz: 502ff3bddaefb44315881d156bc3cd31b0f7eaa4d74c94ccf53bf5f536d7debdde463572d42d3916bc38ce955af90955e09b5f014ca1d6b5d2adc4831041f15c
7
+ data.tar.gz: 04bcae94a937c4a81bad89f6e601cea1eb963be8dee55ea2454bc6cc9991a6a529929fb328b5aeff8222b2632b0614cc593617227c12038fef894a3dddc09aef
data/README.md CHANGED
@@ -94,6 +94,11 @@ These tasks are intended to replace those provided by `capistrano-sidekiq` gem,
94
94
 
95
95
  `cap ENV sneakers_systemd:{stop,start,restart}`: stops, starts, restarts Sneakers via systemd.
96
96
 
97
+ ### Racecar via systemd
98
+
99
+ `cap ENV racecar_systemd:{stop,start,restart}`: stops, starts, restarts Racecar via systemd.
100
+
101
+
97
102
 
98
103
  #### Capistrano role
99
104
 
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "dlss-capistrano"
7
- s.version = '4.3.1'
7
+ s.version = '4.4.0'
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["Chris Beer", 'Mike Giarlo']
@@ -0,0 +1,44 @@
1
+ # Capistrano plugin hook to set default values
2
+ namespace :load do
3
+ task :defaults do
4
+ set :racecar_systemd_role, fetch(:racecar_systemd_role, :app)
5
+ set :racecar_systemd_use_hooks, fetch(:racecar_systemd_use_hooks, false)
6
+ end
7
+ end
8
+
9
+ # Integrate racecar hooks into Capistrano
10
+ namespace :deploy do
11
+ before :starting, :add_racecar_systemd_hooks do
12
+ invoke 'racecar_systemd:add_hooks' if fetch(:racecar_systemd_use_hooks)
13
+ end
14
+ end
15
+
16
+ namespace :racecar_systemd do
17
+ # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
18
+ task :add_hooks do
19
+ after 'deploy:failed', 'racecar_systemd:restart'
20
+ after 'deploy:published', 'racecar_systemd:start'
21
+ after 'deploy:starting', 'racecar_systemd:stop'
22
+ end
23
+
24
+ desc 'Stop running workers gracefully'
25
+ task :stop do
26
+ on roles(fetch(:racecar_systemd_role)) do
27
+ sudo :systemctl, 'stop', 'racecar'
28
+ end
29
+ end
30
+
31
+ desc 'Start workers'
32
+ task :start do
33
+ on roles(fetch(:racecar_systemd_role)) do
34
+ sudo :systemctl, 'start', 'racecar'
35
+ end
36
+ end
37
+
38
+ desc 'Restart workers'
39
+ task :restart do
40
+ on roles(fetch(:racecar_systemd_role)) do
41
+ sudo :systemctl, 'restart', 'racecar', raise_on_non_zero_exit: false
42
+ end
43
+ end
44
+ end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlss-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.1
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  - Mike Giarlo
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-07-27 00:00:00.000000000 Z
12
+ date: 2023-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -90,6 +90,7 @@ files:
90
90
  - lib/dlss/capistrano/tasks/bundled_sidekiq.rake
91
91
  - lib/dlss/capistrano/tasks/check_status.rake
92
92
  - lib/dlss/capistrano/tasks/deployed_branch.rake
93
+ - lib/dlss/capistrano/tasks/racecar_systemd.rake
93
94
  - lib/dlss/capistrano/tasks/remote_execute.rake
94
95
  - lib/dlss/capistrano/tasks/sidekiq_systemd.rake
95
96
  - lib/dlss/capistrano/tasks/sneakers_systemd.rake
@@ -97,11 +98,11 @@ files:
97
98
  - lib/dlss/capistrano/tasks/ssh_check.rake
98
99
  - lib/dlss/capistrano/tasks/strscan.rake
99
100
  - lib/lyberteam-capistrano-devel.rb
100
- homepage:
101
+ homepage:
101
102
  licenses:
102
103
  - Apache-2.0
103
104
  metadata: {}
104
- post_install_message:
105
+ post_install_message:
105
106
  rdoc_options: []
106
107
  require_paths:
107
108
  - lib
@@ -116,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  - !ruby/object:Gem::Version
117
118
  version: 1.3.6
118
119
  requirements: []
119
- rubygems_version: 3.2.32
120
- signing_key:
120
+ rubygems_version: 3.3.26
121
+ signing_key:
121
122
  specification_version: 4
122
123
  summary: Capistrano recipes for use in SUL/DLSS projects
123
124
  test_files: []