Commit Graph
19 Commits
Author SHA1 Message Date
Jacopo 9ddb181f50 Merge branch 'main' into cleanup-excessive-containers-running
* main:
  Pull the primary host from the role
  Minimise holding the deploy lock
2023-04-12 15:19:19 +02:00
Jacopo 3cbf4aea46 Make method private method and use :send 2023-04-12 11:53:49 +02:00
Jacopo 5ed431b807 Merge branch 'main' into cleanup-excessive-containers-running
* main: (24 commits)
  Bump version for 0.11.0
  Labels can be added to Traefik
  Make rollbacks role-aware
  fix typo role to roles
  Explained the latest modifications of Traefik container labels
  Remove .idea folder
  Updated README.md with new healthcheck.max_attempts option
  Fix test case: console output message was not updated to display the current/total attempts
  Require net-ssh ~> 7.0 for SHA-2 support
  Improved deploy lock acquisition
  Excess CR
  Style
  Simpler
  Make it explicit, focus on Ubuntu
  More explicit
  Not that --bundle is a Rails 7+ option
  Update README.md
  Update README.md
  Improved: configurable max_attempts for healthcheck
  Traefik service name to be derived from role and destination
  ...
2023-04-12 11:52:47 +02:00
Jacopo 72b70e3e9e More compact 2023-04-11 16:22:47 +02:00
Jacopo e8697327fa Use no_commands block 2023-04-11 16:20:16 +02:00
Jacopo 0bfd4ca780 Use cli = self approach 2023-04-11 16:04:46 +02:00
Jacopo 12e3a562c4 Extract helper 2023-04-11 15:26:55 +02:00
Jacopo c3393c8213 Remove dot 2023-04-11 11:03:11 +02:00
Jacopo 03d933d10b Add Role to the message 2023-04-11 10:59:25 +02:00
Jacopo 579b4cd9aa Simplify
By using and ad-hoc command to detect and stop stale containers.
By default stale containers are only detected.
2023-04-11 10:22:03 +02:00
Jacopo f9436d5673 Style 2023-04-11 08:53:33 +02:00
Jacopo 8ae5331d97 Boot stop all the old containers 2023-04-11 08:53:33 +02:00
Jacopo 4d47fbdf41 Merge stop and stop_stale_containers 2023-04-11 08:53:33 +02:00
Jacopo e980f1164e Avoid using GNU-only Perl Regepx Grep 2023-04-11 08:53:33 +02:00
Jacopo e2f6db5cae Clear stale containers
By stopping all the older containers with matching /#{service}-#{role}-#{dest}-.*/ running on the same host.
2023-04-11 08:53:33 +02:00
Jacopo 9b43a6b23b Customizable stop wait time
Configurable via a global `stop_wait_time` option.
The default is `10` which matches Docker defaults.
2023-03-24 15:04:45 +01:00
Jacopo 50ee954ca9 Fix Traefik retry middleware
As per [Traefik docs](https://doc.traefik.io/traefik/middlewares/overview/#configuration-example)
a middleware to be activated needs to be applied to a route. Change the default settings
to apply the `retry` middleware on every role with Traefik enabled.
2023-03-14 12:15:00 +01:00
Jacopo eb46d0507e Example on how to set up Cron 2023-02-23 11:02:39 +01:00
Jacopo 689b81014b Print container logs when HealthCheck response_code != 200
The Healthcheck container is shut down right after performing the check, this
makes it harder to troubleshoot configuration issues in the healthcheck
endpoint, e.g DNS rebinding error. Printing the container logs helps the troubleshooting.
2023-02-21 11:48:29 +01:00