Commit Graph

797 Commits

Author SHA1 Message Date
Nick Hammond a1bc6d61af Switch the regex ordering for hyphen and underscore for service name to remove warning 2024-03-06 09:08:17 -07:00
Donal McBreen cc8c508556 Merge branch 'main' into valid_service_name 2024-03-05 11:02:33 +00:00
Nick Hammond 3b16e047c5 Add hyphen to the allowed character list for service name 2024-03-04 10:03:22 -07:00
Donal McBreen 6563393d9a Merge pull request #627 from aishek/626-mention-sprockets-config-in-deploy-template
Mention Sprockets config in deploy template
2024-03-04 15:31:41 +00:00
Aleksandr Borisov f286fdc374 Update lib/kamal/cli/templates/deploy.yml
Co-authored-by: Donal McBreen <dmcbreen@gmail.com>
2024-03-04 16:26:11 +03:00
Donal McBreen 828cca322b Merge pull request #650 from basecamp/retained-containers
Config the number of containers to keep
2024-03-04 12:05:35 +00:00
Donal McBreen cb030e8751 Merge pull request #680 from igor-alexandrov/traefik-2.10
Bump default Traefik image to 2.10
2024-03-04 11:58:37 +00:00
Donal McBreen 6892abb4be Config the number of containers to keep
By default we keep 5 containers around for rollback. The containers
don't take much space, but the images for them can.

Make the number of containers to retain configurable, either in the
config with the `retain_containers` setting on the command line
with the `--retain` option.
2024-03-04 11:55:45 +00:00
Donal McBreen bcfd0ca88a Merge pull request #645 from juan-apa/fix-missing-netscp-require
require missing net/scp dependency
2024-03-04 11:49:43 +00:00
Donal McBreen 2e8071a5b3 Merge pull request #608 from CleverFew/fix_accessory_cli_host_params
Accessory CLI respects `--hosts`
2024-03-04 11:31:50 +00:00
Donal McBreen 200e2686fd Merge pull request #506 from rience/custom-acc-service-name
Allow for Custom Accessory Service Name
2024-03-04 10:57:10 +00:00
Nick Hammond a02af74dda Add a simple validation to the service name to prevent setup issues 2024-02-22 09:47:48 -07:00
Krzysztof Adamski 1c2a45817a Supports Passing SSH Args to Build Options 2024-02-15 14:20:20 +01:00
Krzysztof Adamski b411356409 Allow for Custom Accessory Service Name 2024-02-15 11:12:18 +01:00
Igor Alexandrov 77e72e34ce Bumped default Traefik image to 2.10 2024-02-13 16:00:02 +04:00
Juan Aparicio c984db152f require missing net/scp dependency 2024-01-11 17:00:13 -03:00
dhh 5a09aa12ba Allow local builds using a different arch than native 2024-01-10 13:00:48 -08:00
Donal McBreen aca7796e9d Bump version for 1.3.1 2024-01-10 08:56:34 +00:00
Matthew Kent c5ae54d7d4 Add a missing base64 require.
Also, prepare for the moving of base64 from default to a bundled gem in ruby 3.4.
2024-01-09 08:21:10 -08:00
Alexandr Borisov 414d29ae4e Mention Sprockets config in deploy template 2024-01-04 09:18:38 +04:00
Nick Lozon b2fd5744fb perform intersection on specified hosts 2023-12-12 14:39:33 -05:00
Matthew Kent 7fa53d90bd Merge hashes to de-dupe the app and role envs.
This is better then adding them together which confusingly results in
both ENV vars in the same file, though based on the load order, they
worked anyway.
2023-11-28 15:59:03 -08:00
Donal McBreen a155b7baab Bump version for 1.3.0 2023-11-28 14:06:45 +00:00
Donal McBreen 175e3bc159 Merge pull request #507 from leonvogt/introduce-absolute-accessories-paths
Add option to set an absolute directory path
2023-11-28 10:15:27 +00:00
Matthew Kent 63babecba7 Raise an error when either the filtered hosts or roles are empty.
Keeps us confusingly running things on the primary_host when nothing
matches.
2023-11-25 12:47:39 -08:00
Matthew Kent 79baa598fa Make an effort to match the primary_role from a list of specific roles.
This is less surprising than picking the first role and first host.
2023-11-24 17:41:58 -08:00
Donal McBreen 635876bdb9 Merge pull request #523 from rmacklin/fix-error-message-in-pre-build-sample-hook
Fix duplicate error message in pre-build.sample
2023-11-16 08:51:22 +00:00
Donal McBreen 11521517fa Merge pull request #550 from dmitrytrager/feature-name-all-for-accessory-reboot
feature: add NAME=all option for accessory reboot
2023-11-16 08:50:51 +00:00
Donal McBreen 610d9de3fd Merge pull request #580 from happyscribe/feat/no-web
Allow Kamal to run without traefik
2023-11-16 08:44:45 +00:00
Donal McBreen bf79df0f72 Bump version for 1.2.0 2023-11-15 14:48:11 +00:00
Donal McBreen a0959b5afd Merge pull request #573 from basecamp/pre-post-traefik-reboot-hooks
Pre and post Traefik reboot hooks
2023-11-15 14:01:40 +00:00
Yoel Cabo 7472e5dfa6 Merge remote-tracking branch 'origin/main' into feat/no-web 2023-11-14 12:11:18 +01:00
Yoel Cabo 887b7dd46d Do not invoke healthcheck on deploy when no web role 2023-11-14 11:34:32 +01:00
Matthew Kent efcb855db7 Advertise wildcard support. 2023-11-13 23:43:26 -08:00
Matthew Kent 7137850354 Add support for wildcard matches with '*' on roles and hosts.
eg:
  --roles=*_chicago,*_tokyo
  --hosts=app-*

Useful for targeted deploys.
2023-11-13 23:43:23 -08:00
Donal McBreen 8a85840a47 Merge pull request #582 from basecamp/allow-empty-roles
Add allow_empty_roles to control aborting on roles with no hosts.
2023-11-13 09:30:01 +00:00
Donal McBreen 80cc0c23d8 Merge pull request #578 from basecamp/enable-yaml-aliases
Enable yaml aliases
2023-11-13 09:28:40 +00:00
Matthew Kent 60187cc3a4 Add allow_empty_roles to control aborting on roles with no hosts.
This added flexibility allows you to define base roles that might not
necessarily exist in each deploy destination.
2023-11-12 08:54:28 -08:00
Yoel Cabo 87cb8c1f71 fix: allow configurations without web roles 2023-11-12 09:39:07 +01:00
Matthew Kent 263b4a4fb8 Enable aliases for more exotic templating situations.
This is super useful for DRY when configuring a number of roles and you
hit the limits of what's reasonable with ERB.
2023-11-11 17:25:50 -08:00
Matthew Kent a9cc7c73d2 Handle an undefined primary_web_role. 2023-11-11 12:57:31 -08:00
Matthew Kent 628a47ad88 Background for the new option. 2023-11-10 16:39:06 -08:00
Matthew Kent 47f8725cf3 Support a dynamic primary_web_role instead of assuming it's 'web'.
This allows for more meaningful naming in roles.

The only caution here is that we don't support the renaming of roles, so
any migration is left to the user.
2023-11-10 16:35:25 -08:00
Donal McBreen 5fd4a28bf7 Pre and post Traefik reboot hooks
Provide pre and post reboot hooks for Traefik, that can be used to
remove/add to an external load balancer to prevent requests from being
sent during the reboot.

Works best with the --rolling setting, where each hook is called once
per host.
2023-11-08 15:11:26 +00:00
Donal McBreen 97ba6b746b Merge pull request #564 from basecamp/return-502-if-no-container
Return a 502 when container is down
2023-11-08 14:58:22 +00:00
Donal McBreen 9e25d8a012 Priority 2 for the main app 2023-11-08 14:12:45 +00:00
Leon f339626667 Add option to set absolute directory path 2023-11-03 22:48:30 +01:00
Leon 2d86d4f7cc Add SSH port to run_over_ssh 2023-11-03 22:32:37 +01:00
Leon 792aa1dbdf Add SSH port option 2023-11-03 22:32:37 +01:00
Donal McBreen 24a2f51641 Return a 502 when container is down
If the app container is down or not responding then traefik will return
a 404 response code. This is not ideal as it suggests a client rather
than a server problem.

To fix this, we'll define a catch all route that always returns a 502.

This is not ideal as this route would take priority over a shorter route
with priorty 1.

TODO: up the priority of the app route.
2023-11-03 14:20:52 +00:00