Donal McBreen
30e0c44396
Switch to rubocop-rails-omakase rubocop rules
...
No code changes required
2024-03-21 13:47:20 +00:00
Donal McBreen
20d6e5365e
Merge pull request #733 from basecamp/integration-test-roles
...
Integration test roles
2024-03-21 13:43:33 +00:00
Donal McBreen
72ace2bf0b
Add an integration test for roles
...
Add an app with roles to the integration tests. We'll deploy two web
containers and one worker. The worker just sleeps, so we are testing
that the container has booted.
2024-03-21 13:30:53 +00:00
Donal McBreen
ba40d026d0
Make integration test app to deploy configurable
2024-03-21 12:09:59 +00:00
Donal McBreen
474b76cf47
Merge pull request #701 from basecamp/rubocop
...
Add Rubocop
2024-03-20 10:59:35 +00:00
Donal McBreen
3ecfb3744f
Add Rubocop
...
- Pull in the 37signals house style
- Autofix violations
- Add to CI
2024-03-20 10:23:02 +00:00
Donal McBreen
c985fa33d1
Bump version for 1.4.0
2024-03-20 09:27:23 +00:00
Donal McBreen
e8b9f8907f
Merge pull request #715 from basecamp/use-role-not-string-in-config
...
Pass around Roles instead of Strings
2024-03-08 08:55:53 +00:00
Donal McBreen
4966d52919
Pass around Roles instead of Strings
...
Avoid looking up roles by names everywhere. This avoids the awkward
role/role_config naming as well.
2024-03-08 08:44:35 +00:00
Donal McBreen
52bb40add0
Merge pull request #656 from DanielJackson-Oslo/informative-error-message-on-lock
...
Informative message on lock error
2024-03-07 11:16:18 +00:00
Donal McBreen
73a9276cdd
Fix up app command tests
2024-03-07 11:11:20 +00:00
Donal McBreen
8c0784ed4a
Merge pull request #634 from alhafoudh/main
...
Allow lines option to be configured when following app logs
2024-03-07 11:11:08 +00:00
Donal McBreen
089a2d3bba
Merge pull request #710 from basecamp/install-wget-or-curl
...
Install docker with curl or wget
2024-03-07 11:01:30 +00:00
Donal McBreen
bd76d23916
Merge pull request #593 from CleverFew/role_logging_config
...
Role specific logging configuration
2024-03-07 10:53:34 +00:00
Donal McBreen
fa37fcd10c
Merge pull request #585 from tsvallender/docker-network
...
Add docker-setup hook
2024-03-07 10:51:08 +00:00
Donal McBreen
f5dc0858b0
Update error message to include wget
2024-03-07 10:49:32 +00:00
Donal McBreen
9dddb140b1
Merge pull request #558 from GeNiuS69/add-skip_push-to-setup
...
Add --skip_push option to setup
2024-03-07 10:26:41 +00:00
Donal McBreen
26b1d57c90
Install docker with curl or wget
...
If curl is not available to download the docker install script, try
with wget instead.
If neither is available or both fail, return a simple failing script
so that we don't carry on regardless.
Fixes: https://github.com/basecamp/kamal/issues/395
2024-03-07 10:16:03 +00:00
Donal McBreen
b94199415f
Convert combine by: '||' to any
2024-03-07 09:10:49 +00:00
Donal McBreen
32a2ae5b2c
Merge pull request #708 from nickhammond/valid_service_name
...
Remove warning for valid service name
2024-03-06 16:22:04 +00:00
Donal McBreen
5c32be10f1
Merge pull request #707 from basecamp/boot-strategy-min-limit-1
...
Ensure a minimum limit of 1 for % boot strategy
2024-03-06 16:06:35 +00:00
Donal McBreen
dc5af03593
Update tests to match single quotes
2024-03-06 16:04:31 +00:00
Donal McBreen
1abd029ea0
Merge pull request #696 from dorianmariecom/patch-1
...
Replace \`service\` by 'service' so it doesn't get executed by bash
2024-03-06 16:04:11 +00:00
Donal McBreen
c4d0d3e5eb
Merge pull request #704 from basecamp/escape-registry-username-password
...
Escape the docker registry username and password
2024-03-06 15:58:46 +00:00
Donal McBreen
46e7cf8e78
Merge pull request #706 from basecamp/kamal-remove-noop
...
Ensure `kamal remove` completes without setup
2024-03-06 15:58:34 +00:00
Donal McBreen
c7cfc074b6
Ensure a minimum limit of 1 for % boot strategy
...
Fixes: https://github.com/basecamp/kamal/issues/681
2024-03-06 15:51:35 +00:00
Donal McBreen
c10f43e365
Merge pull request #692 from nickhammond/valid_service_name
...
Add a simple validation to the service name to prevent setup issues
2024-03-06 15:24:39 +00:00
Donal McBreen
8e2184d65e
Ensure kamal remove completes without setup
...
If `kamal setup` has not run or errored out part way through,
`kamal remove` should still complete.
Fixes: https://github.com/basecamp/kamal/issues/629
2024-03-06 14:59:26 +00:00
Donal McBreen
2be397b679
Escape the docker registry username and password
...
Fixes: https://github.com/basecamp/kamal/issues/278
2024-03-06 11:04:55 +00:00
Donal McBreen
cc8c508556
Merge branch 'main' into valid_service_name
2024-03-05 11:02:33 +00: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
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
Donal McBreen
db94789dc1
Merge pull request #434 from rience/ssh-agent-support
...
Supports Passing SSH Agent Socket to Build Options
2024-03-04 10:54:47 +00:00
Donal McBreen
aca7796e9d
Bump version for 1.3.1
2024-01-10 08:56:34 +00:00
Donal McBreen
8b6d8306d1
Merge pull request #637 from basecamp/tests-wait-longer-for-health
...
Be a bit more patient during tests
2024-01-09 16:45:28 +00:00
Donal McBreen
bb50546467
Merge pull request #636 from basecamp/tests-clean-known-hosts
...
Fix Net::SSH::HostKeyMismatch between bin/test runs
2024-01-09 16:45:12 +00:00
Donal McBreen
acc6b9ad71
Merge pull request #635 from basecamp/missing-base64-require
...
Add a missing base64 require
2024-01-09 16:44:42 +00:00
Donal McBreen
4b05068493
Merge pull request #638 from basecamp/rails-7.2-compatible-rubies
...
Rails 7.2 compatible Rubies
2024-01-09 12:10:29 +00:00
Donal McBreen
68eb549795
Update to actions/checkout@v4 to silence node warning
2024-01-09 11:35:10 +00:00
Donal McBreen
1a3dd52af4
Rails 7.2 compatible Rubies
...
1. Add Ruby 2.7 specific Gemfile that uses an older version of nokogiri
2. Rails edge doesn't support Ruby 2.7.0, so exclude it.
3. Add Ruby 3.3
4. Update Gemfile.lock to test against Rails 7.1.2 as it's the latest
version.
5. Remove continue-on-error from the matrix and always set to true
2024-01-09 11:13:11 +00:00
Donal McBreen
457f06da13
Merge pull request #598 from basecamp/fix-duplicate-role-env-vars
...
Fix duplicate role env vars
2023-11-29 10:09:34 +00: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
Donal McBreen
e3d8a2aa82
Merge pull request #594 from basecamp/match-primary-role-in-filters
...
Try to match primary_role when roles are filtered
2023-11-28 09:15:39 +00:00
Donal McBreen
0e067fb5e1
Merge pull request #595 from basecamp/error-on-filter-miss
...
Error out when roles or host filters don't match anything
2023-11-27 08:08:19 +00:00
Donal McBreen
b1dc188841
Remove stray file
2023-11-23 09:22:36 +00: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
Donal McBreen
77a79b299a
Merge pull request #583 from basecamp/wildcard-filters
...
Add wildcards to roles and hosts filters
2023-11-14 08:19:02 +00: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
Donal McBreen
14a9129410
Merge pull request #577 from basecamp/set-primary-web-role
...
Support customizing the primary_web_role
2023-11-13 09:27:18 +00: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
Donal McBreen
da161445fa
Merge pull request #508 from leonvogt/ssh-port-option
...
Configurable SSH port
2023-11-06 08:48:26 +00: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
Donal McBreen
8f53104d00
Bump version for 1.1.0
2023-11-01 09:20:45 +00:00
Donal McBreen
78fc91f2ec
Merge pull request #557 from basecamp/envify-reset-env-before-push
...
Reset the env before pushing
2023-10-30 11:54:00 +00:00
Donal McBreen
dd748fac8c
Reset the env before pushing
...
Calling `load_envs` again does not load updated env variables, because
Dotenv does not overwrite existing values.
To fix this we'll store the original ENV and reset to it before
reloading.
https://github.com/basecamp/kamal/issues/512
2023-10-30 11:31:50 +00:00
Donal McBreen
b732b2dd55
Merge pull request #547 from nickhammond/envify/trim-lines
...
Enable trim mode with ERB
2023-10-30 08:57:55 +00:00
Donal McBreen
e3254b2aa8
Merge pull request #544 from nickhammond/bugfix-require-sshkit-sensitive-util
...
Require sshkit within the sshkit util
2023-10-30 08:57:08 +00:00
Donal McBreen
e9269d2ee8
Merge pull request #501 from rience/optional-envify-push
...
Optionally Skip Push for "envify"
2023-10-30 08:30:21 +00:00
Donal McBreen
d2214b43b7
Merge pull request #499 from basecamp/env-only-needed-for-push
...
Remove the env check
2023-10-30 08:22:56 +00:00
Donal McBreen
370481921e
Merge pull request #498 from basecamp/app-exec-env-file
...
App exec with env file
2023-10-30 08:22:35 +00:00
Donal McBreen
aa23f26330
Merge pull request #479 from npezza93/main
...
Loosen superuser check to match docker-installs script check
2023-10-30 08:21:30 +00:00
Donal McBreen
f4933d83bf
Merge pull request #477 from clintmiller/patch-1
...
Pass KAMAL_VERSION env var to container run
2023-10-30 08:19:20 +00:00
Donal McBreen
f6662c7a8f
Remove the env check
...
The env check is not needded anymore as all the commands rely on the
env files having already been created remotely.
The only place the env is needed is when running `kamal env push` and
that will still raise an apropriate error.
2023-09-25 15:23:01 +01:00
Donal McBreen
645f5ab72d
App exec with env file
...
When calling `kamal app exec` for new non interactive containers, run
the command per role on each server and include the role config
including the environment.
Fixes: https://github.com/basecamp/kamal/issues/492
2023-09-25 15:07:05 +01:00
Donal McBreen
a03ffd5b92
Merge pull request #476 from basecamp/exec-with-role
...
Run interactive commands with the correct host
2023-09-18 12:14:13 +01:00
Donal McBreen
0861730e0e
Run interactive commands with the correct host
...
Fixes https://github.com/basecamp/kamal/issues/430
2023-09-18 12:00:36 +01:00
Donal McBreen
168c6e2da3
Merge pull request #467 from basecamp/assets-copy-hidden-files
...
Copy all files into asset volume
2023-09-15 08:46:02 +01:00
Donal McBreen
564765862b
Add hidden file check to integration tests
2023-09-15 08:37:41 +01:00
Donal McBreen
3c12d1799c
Copy all files into asset volume
...
Adding -T to the copy command ensures that the files are copied at the
same level into the target directory whether it exists or not.
That allows us to drop the `/*` which was not picking up hidden files.
Fixes: https://github.com/basecamp/kamal/issues/465
2023-09-15 08:07:48 +01:00
Donal McBreen
60835d13a8
Merge pull request #444 from rience/custom-healthcheck-log-lines-count
...
Configurable Number of Lines in Healthcheck Log Output
2023-09-13 08:57:00 +01:00
Donal McBreen
0e021e3c57
Merge pull request #461 from basecamp/escape-newline-from-inspect-format
...
Escape the newline in the inspect query
2023-09-12 19:19:47 +01:00
Donal McBreen
fb0aeec27e
Escape the newline in the inspect query
2023-09-12 19:10:39 +01:00
Donal McBreen
a367819a1c
Merge pull request #460 from basecamp/traefik-wait-5s-after-unhealthy
...
Give Traefik 5s to drop old container
2023-09-12 17:12:20 +01:00
Donal McBreen
0afe289a20
Give Traefik 5s to drop old container
2023-09-12 17:03:51 +01:00
Donal McBreen
bf6af46ac3
Merge pull request #459 from basecamp/env-file-escape-newlines
...
Escape newlines in docker env files
2023-09-12 15:05:38 +01:00
Donal McBreen
df2b76aee1
Escape newlines in docker env files
...
When env variables were passed via `-e` newlines were escaped. This
updates the env file to do the same thing.
2023-09-12 14:57:19 +01:00
Donal McBreen
70a3c7195a
Merge pull request #458 from basecamp/avoid-env-empty-file-warning
...
Fix empty file warning when uploading env files
2023-09-12 12:05:31 +01:00
Donal McBreen
c651de177f
Fix empty file warning when uploading env files
2023-09-12 11:57:28 +01:00
Donal McBreen
7b42daa9fb
Merge pull request #457 from basecamp/remove-dangling-image-filter
...
Remove the `dangling=true` filter
2023-09-12 11:21:50 +01:00
Donal McBreen
9d49b3e391
Merge pull request #456 from basecamp/validate-image
...
Validate the build image
2023-09-12 11:18:32 +01:00
Donal McBreen
2c5ab054db
Remove the dangling=true filter
...
This has been removed from Docker Engine 24 and `docker image prune`
only deletes dangling images anyway.
Fixes https://github.com/basecamp/kamal/issues/410
2023-09-12 11:09:26 +01:00
Donal McBreen
66291a2aea
Validate the build image
...
Kamal needs images to have the service label so it can track them for
pruning. Images built by Kamal will have the label, but externally built
ones may not.
Without it images will build up over time. The worst case is an outage
if all the hosts disks fill up at the same time.
We'll add a check for the label and halt if it is not there.
2023-09-12 10:45:01 +01:00
Donal McBreen
d96e086945
Merge pull request #452 from basecamp/preconnect-to-build-remote-host
...
Connect to remote host before creating builder
2023-09-12 09:21:57 +01:00
Donal McBreen
8424458174
Check protocol is SSH before connecting
2023-09-12 09:12:57 +01:00
Donal McBreen
6a3b0249fe
Connect to remote host before creating builder
...
Connecting to the remote host will make any SSH configuration issues
obvious and add the host to known hosts if that is how SSHKit is
configured.
2023-09-12 09:12:57 +01:00
Donal McBreen
dfc2803714
Merge pull request #454 from basecamp/lts-ubuntu
...
Use LTS version of Ubuntu for integration tests
2023-09-12 09:12:31 +01:00
Donal McBreen
ade90bc051
Use LTS version of Ubuntu for integration tests
2023-09-12 08:59:54 +01:00