dlss-capistrano 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/dlss-capistrano.gemspec +1 -1
- data/lib/dlss/capistrano/tasks/control_master.rake +0 -7
- data/lib/dlss/capistrano/tasks/deployed_branch.rake +1 -1
- data/lib/dlss/capistrano/tasks/remote_execute.rake +1 -1
- data/lib/dlss/capistrano/tasks/setup/setup.rake +20 -0
- data/lib/dlss/capistrano/tasks/ssh_check.rake +1 -1
- data/lib/dlss/capistrano.rb +1 -0
- data/lib/dlss.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 506c54e0736ba7c8d957d70eac27e0c87afac59efaf6661474d583633324af17
|
4
|
+
data.tar.gz: 467a54901a05725308adf64eacd926c6bee8788daa9c6c779ef053e178e51f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21c6a06bf65ea3a5df664de92e72c4030dce9bd281834863eda9205f4e2fa96b49753c2a5f8b36efec1f72fcfaef9ba559e3513f9efe09212e1584f7c25c7d57
|
7
|
+
data.tar.gz: 961902bb30a3e69e262ef12f140bf34fdee71d32c8f79eb9c3949ddcd32fa6f9c7160b52b349b7114f7535245b8420d61a7ec41e25afec98414f59000f55afe7
|
data/README.md
CHANGED
@@ -8,11 +8,9 @@ This gem provides Capistrano deployment tasks used by Stanford Libraries' Digita
|
|
8
8
|
|
9
9
|
To start, we recommend an SSH configuration like the one described in the [DeveloperPlaybook](https://github.com/sul-dlss/DeveloperPlaybook/blob/main/best-practices/ssh_configuration.md), since it has sensible defaults for Kerberos authentication and multi-factor authentication (using `ProxyJump` and `ControlMaster`, etc.).
|
10
10
|
|
11
|
-
To
|
11
|
+
To get `dlss-capistrano` tasks running via an existing SSH control master socket, you need to opt-in by setting the environment variable `USE_CAPISTRANO_CONTROLMASTER=true` (in e.g. your `~/.zshenv` file or similar for your particular shell).
|
12
12
|
|
13
|
-
If
|
14
|
-
|
15
|
-
The control master host is the value of the `ProxyJump` directive in your SSH config, and the control master socket is the value of the `ControlPath` directive in your SSH config.
|
13
|
+
If your SSH client configuration (`~/.ssh/config`) uses values other than the defaults for `CONTROLMASTER_HOST` (which maps to the `ProxyJump` directive, and defaults to `dlss-jump`) or `CONTROLMASTER_SOCKET` (which maps to the `ControlPath` directive, and defaults to `~/.ssh/%r@%h:%p`), you'll want to set these environment variables locally to the values you use (in e.g. your `~/.zshenv` file or similar for your particular shell). Otherwise, the gem will fail to connect to the appropriate jump host and/or won't be able to properly check the status of the control master process.
|
16
14
|
|
17
15
|
## Included Tasks
|
18
16
|
|
data/dlss-capistrano.gemspec
CHANGED
@@ -10,13 +10,6 @@ namespace :load do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
# Integrate hook into Capistrano
|
14
|
-
namespace :deploy do
|
15
|
-
before :generate_otk, :setup_controlmaster do
|
16
|
-
invoke 'controlmaster:setup'
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
13
|
namespace :controlmaster do
|
21
14
|
desc 'set up an SSH controlmaster process if missing'
|
22
15
|
task :setup do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
desc 'display the deployed branch and commit'
|
2
|
-
task deployed_branch
|
2
|
+
task :deployed_branch do
|
3
3
|
# see https://github.com/mattbrictson/airbrussh/tree/v1.5.2?tab=readme-ov-file#capistrano-34x
|
4
4
|
Airbrussh.configure do |config|
|
5
5
|
config.truncate = false
|
@@ -10,7 +10,7 @@ namespace :load do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
desc "execute command on all servers"
|
13
|
-
task :remote_execute,
|
13
|
+
task :remote_execute, :command do |_task, args|
|
14
14
|
raise ArgumentError, 'remote_execute task requires an argument' unless args[:command]
|
15
15
|
|
16
16
|
# see https://github.com/mattbrictson/airbrussh/tree/v1.5.2?tab=readme-ov-file#capistrano-34x
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Setup controlmaster SSH session before generating one-time-key
|
2
|
+
before 'otk:generate', 'controlmaster:setup'
|
3
|
+
|
4
|
+
DOES_NOT_REQUIRE_OTK_LIST = [
|
5
|
+
'bundler:map_bins',
|
6
|
+
'controlmaster:setup',
|
7
|
+
'controlmaster:start',
|
8
|
+
'default',
|
9
|
+
'deploy:generate_otk',
|
10
|
+
'install',
|
11
|
+
'load:defaults',
|
12
|
+
'otk:generate',
|
13
|
+
*Rake.application.stages
|
14
|
+
].freeze
|
15
|
+
|
16
|
+
Rake.application.tasks.each do |task|
|
17
|
+
next if DOES_NOT_REQUIRE_OTK_LIST.include?(task.name)
|
18
|
+
|
19
|
+
before task, 'deploy:generate_otk'
|
20
|
+
end
|
data/lib/dlss/capistrano.rb
CHANGED
data/lib/dlss.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dlss-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- lib/dlss/capistrano/tasks/deployed_branch.rake
|
120
120
|
- lib/dlss/capistrano/tasks/racecar_systemd.rake
|
121
121
|
- lib/dlss/capistrano/tasks/remote_execute.rake
|
122
|
+
- lib/dlss/capistrano/tasks/setup/setup.rake
|
122
123
|
- lib/dlss/capistrano/tasks/sidekiq_systemd.rake
|
123
124
|
- lib/dlss/capistrano/tasks/sneakers_systemd.rake
|
124
125
|
- lib/dlss/capistrano/tasks/ssh.rake
|
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
- !ruby/object:Gem::Version
|
145
146
|
version: 1.3.6
|
146
147
|
requirements: []
|
147
|
-
rubygems_version: 3.5.
|
148
|
+
rubygems_version: 3.5.15
|
148
149
|
signing_key:
|
149
150
|
specification_version: 4
|
150
151
|
summary: Capistrano recipes for use in SUL/DLSS projects
|