Releases: basecamp/kamal
v1.3.1
What's Changed
- Fix duplicate role env vars by @mdkent in #598
- Rails 7.2 compatible Rubies by @djmb in #638
- Add a missing base64 require by @mdkent in #635
- Fix Net::SSH::HostKeyMismatch between bin/test runs by @mdkent in #636
- Be a bit more patient during tests by @mdkent in #637
Full Changelog: v1.3.0...v1.3.1
v1.3.0
What's Changed
- Allow Kamal to run without traefik by @yoelcabo in #580
- feature: add NAME=all option for accessory reboot by @dmitrytrager in #550
- Fix duplicate error message in pre-build.sample by @rmacklin in #523
- Error out when roles or host filters don't match anything by @mdkent in #595
- Try to match primary_role when roles are filtered by @mdkent in #594
- Add option to set an absolute directory path by @leonvogt in #507
New Contributors
- @yoelcabo made their first contribution in #580
- @dmitrytrager made their first contribution in #550
- @rmacklin made their first contribution in #523
Full Changelog: v1.2.0...v1.3.0
v1.2.0
What's Changed
- Configurable SSH port by @leonvogt in #508
- Return a 502 when container is down by @djmb in #564
- Support customizing the primary_web_role by @mdkent in #577
- Enable yaml aliases by @mdkent in #578
- Add allow_empty_roles to control aborting on roles with no hosts. by @mdkent in #582
- Add wildcards to roles and hosts filters by @mdkent in #583
- Pre and post Traefik reboot hooks by @djmb in #573
New Contributors
Full Changelog: v1.1.0...v1.2.0
v1.1.0
What's Changed
- Pass KAMAL_VERSION env var to container run by @clintmiller in #477
- Loosen superuser check to match docker-installs script check by @npezza93 in #479
- App exec with env file by @djmb in #498
- Remove the env check by @djmb in #499
- Optionally Skip Push for "envify" by @rience in #501
- Require sshkit within the sshkit util by @nickhammond in #544
- Enable trim mode with ERB by @nickhammond in #547
- Reset the env before pushing by @djmb in #557
New Contributors
- @clintmiller made their first contribution in #477
- @npezza93 made their first contribution in #479
Full Changelog: v1.0.0...v1.1.0
v1.0.0
What's changed
- Asset bridging by @djmb in #449 and #467
- Copy env files to remote hosts by @djmb in #438
- Add a require_destination setting by @djmb in #451
- Configurable Healthcheck Expose Port by @rience in #443
- Configurable Kamal directory by @djmb in #437
- Configurable Number of Lines in Healthcheck Log Output by @rience in #444
- Zero downtime deployment with cord file by @djmb in #439
- Fix: do not hardcode Net::SSH auth_methods by @gf3 in #440
- Fix: Prune healthcheck containers by @djmb in #425
- Fix: Stop stale containers when deploying by @djmb in #450
- Fix: Connect to remote host before creating builder by @djmb in #452
- Fix: Validate the build image by @djmb in #456
- Fix: Run interactive commands with the correct host by @djmb in #476
Full changelog: v0.16.1...v1.0.0
ππ
Upgrading to 1.0
There are some significant changes in v1.0 of Kamal. You should test out the upgrade in a non-production environment first.
Upgrade steps
- First push your env files to the hosts, either with:
kamal envify [-d destination]
- Or if you manage .env files yourself,
kamal env push [-d destination]
- You should then reboot traefik and any accessories to pick up the new env files.
- Then you can deploy your app
ENV files
Environment variables are now passed to the Docker containers via ENV files. The files are written to the hosts by the kamal env push
command. This allows more control of when environment variables are changed and means that someone can run commands without needing to set up the environment locally.
Shell expansion no longer works with environment variables because they are no longer passed to docker run
as command line arguments.
Run directory
Files are stored under in .kamal
on the hosts. Existing lock and audit files are not migrated. You can configure this with the run_directory
setting.
Zero-downtime deployments
To prevent Traefik from sending requests to a container that is shutting down, it needs to see the container as unhealthy before we call docker stop
. We do this via a "cord". This is a file in a volume mounted into /tmp/kamal-cord
in the container. The healthcheck is re-written to also check for the file.
To mark a container as unhealthy we delete the file or "cut the cord". The healthcheck will fail, Traefik will stop sending requests and then we can shut down the container safely. You can change the directory the cord will be stored in with:
healthcheck:
cord: /var/run/kamal/cord
Or set it to false
to disable the cord. However, this will remove the zero-downtime guarantee.
Assets
During a deployment you may get requests for old JS/CSS going to the new container and visa versa. To prevent 404s, tell Kamal where the those assets are stored in the container. Kamal will mount a volume containing both old and new files into that location.
asset_path: /rails/public/assets
External image verification
If you pull your own images (using kamal deploy --skip_push
), they now need to be tagged with a label service=<app name>
. This is so we find them when pruning old images.
v0.16.1
What's Changed
- Fix picking the first available role on primary_host by @tbuehlmann in #428
- Fix require ActiveSupport module to provide String#remove by @fig in #422
- Allow Traefik to run without publishing port by @tsvallender in #368
New Contributors
- @northeastprince made their first contribution in #426
- @fig made their first contribution in #422
- @tsvallender made their first contribution in #368
Full Changelog: v0.16.0...v0.16.1
v0.16.0
What's Changed
Due to a trademark claim, we've renamed the project to Kamal after the ancient Arab navigational tool. The new executable is now kamal
and all env variables are prefixed with KAMAL_*
. The new website going forward will live at https://kamal-deploy.org.
- Rename project to Kamal by @dhh in #423
- Log uncommitted changes during deploy by @igor-alexandrov in #396
- Include role options when executing commands by @brunoprietog in #389
- Manage SSH connection starts by @djmb in #399
- Removed validation for remote and local builder params by @igor-alexandrov in #415
- Don't hide Traefik errors by @djmb in #414
- Extract versions that contains dashes by @djmb in #413
- Configurable log levels by @djmb in #418
- Fix builder registry cache when using default registry by @manastyretskyi in #417
Full Changelog: v0.15.1...v0.16.0
v0.15.1
v0.15.0
What's Changed
- Include service name to lock details by @igor-alexandrov in #387
- Configurable SSH log levels by @djmb in #386
- Login to the registry proactively before stoping Accessory and Traefik by @igor-alexandrov in #349
- Support a --rolling option for traefik reboots by @lewispb in #393
New Contributors
Full Changelog: v0.14.0...v0.15.0
v0.14.0
What's Changed
- Support for Docker multistage build cache by @igor-alexandrov in #337
- Only require secrets when mutating by @djmb in #342
- Add a minimum version setting by @djmb in #335
- Add support for proxy_command to run_over_ssh by @mattyr in #327
- Fix up the sample pre-deploy hook by @djmb in #331
- Fix ssh symlink by @djmb in #334
- Added ability to override default Traefik command line arguments by @igor-alexandrov in #328
Full Changelog: v0.13.2...v0.14.0