README.md in dlss-capistrano-4.4.1 vs README.md in dlss-capistrano-5.0.0
- old
+ new
@@ -2,10 +2,16 @@
[![Gem Version](https://badge.fury.io/rb/dlss-capistrano.svg)](https://badge.fury.io/rb/dlss-capistrano)
This gem provides Capistrano deployment tasks used by Stanford Libraries' Digital Library Systems and Services group.
+## Necessary setup
+
+If you use values other than the defaults for `CONTROLMASTER_HOST` (`dlss-jump`) or `CONTROLMASTER_SOCKET` (`"~/.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 host and/or won't be able to properly check the status of the control master process.
+
+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.
+
## Included Tasks
### Remote Execution
Sometimes you want to execute a command on all boxes in a given environment, and dlss-capistrano's got your back:
@@ -34,11 +40,11 @@
### Status checking
**NOTE**: Requires that `curl` is installed on each server host the check is run on.
-Use `cap ENV check_status` to hit the (*e.g.*, [okcomputer](https://github.com/sportngin/okcomputer)-based) status endpoint of your application. This is especially valuable with hosts that cannot be directly checked due to firewall rules.
+Use `cap ENV check_status` to hit the (_e.g._, [okcomputer](https://github.com/sportngin/okcomputer)-based) status endpoint of your application. This is especially valuable with hosts that cannot be directly checked due to firewall rules.
By default, these checks run against all nodes with the `:web` role and hit the `/status/all` endpoint. These can be configured in `config/deploy.rb` (or `config/deploy/{ENV}.rb` if you need environment-specific variation):
```ruby
set :check_status_roles, [:my_status_check_web_role]
@@ -61,31 +67,10 @@
### Display Revision (and branches)
`cap ENV deployed_branch` displays the currently deployed revision (commit ID) and any branches containing the revision for each server in `ENV`.
-### Resque-Pool hot swap (OPTIONAL)
-
-The `dlss-capistrano` gem provides a set of tasks for managing `resque-pool` workers when deployed in `hot_swap` mode. (If you are using `resque-pool` without `hot_swap`, we recommend continuing to use the `capistrano-resque-pool` gem instead of what `dlss-capistrano` provides.) The tasks are:
-
-```shell
-$ cap ENV resque:pool:hot_swap # this gracefully replaces the current pool with a new pool
-$ cap ENV resque:pool:stop # this gracefully stops the current pool
-```
-
-By default, these tasks are not provided; instead, they must be explicitly enabled via adding a new `require` statement to the application's `Capfile`:
-
-```ruby
-require 'dlss/capistrano/resque_pool'
-```
-
-This is the hook provided if you opt in:
-
-```ruby
-after 'deploy:publishing', 'resque:pool:hot_swap'
-```
-
### Sidekiq via systemd
`cap ENV sidekiq_systemd:{quiet,stop,start,restart}`: quiets, stops, starts, restarts Sidekiq via systemd.
These tasks are intended to replace those provided by `capistrano-sidekiq` gem, which has assumptions about systemd that do not apply to our deployed environments.
@@ -96,15 +81,13 @@
### Racecar via systemd
`cap ENV racecar_systemd:{stop,start,restart}`: stops, starts, restarts Racecar via systemd.
-
-
#### Capistrano role
-The sidekiq_systemd tasks assume a Capistrano role of `:app`. If your application uses a different Capistrano role for hosts that run Sidekiq workers, you can configure this in `config/deploy.rb`, *e.g.*:
+The sidekiq_systemd tasks assume a Capistrano role of `:app`. If your application uses a different Capistrano role for hosts that run Sidekiq workers, you can configure this in `config/deploy.rb`, _e.g._:
```ruby
set :sidekiq_systemd_role, :worker
```
@@ -133,9 +116,16 @@
- You use git for source control
- The server you deploy to uses rvm, it is installed system-wide, and is the default system ruby
- You do not have an .rvmrc checked into git (should be in your .gitignore)
- You will not use rvm gemsets on the server you deploy to
- Bundler will install specified gems into {your_project_home}/shared/bundle directory
+
+## Releasing
+
+To release a new version:
+
+1. Update the version number in `dlss-capistrano.gemspec` and commit.
+2. `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
## Copyright
Copyright (c) 2020 Stanford University. See LICENSE for details.