2023-10-28 23:37:31 +00:00
|
|
|
# Deploying new versions
|
|
|
|
|
2024-04-05 21:02:15 +00:00
|
|
|
We use [deploy-rs](https://github.com/serokell/deploy-rs) to deploy changes.
|
|
|
|
Currently this process is not automated, so configuration changes will have to
|
|
|
|
be manually deployed.
|
2023-10-28 23:37:31 +00:00
|
|
|
|
2024-04-05 21:02:15 +00:00
|
|
|
To deploy, make sure you have a [working development shell](./development-shell.md).
|
|
|
|
Then, run `deploy-rs` with the hostname of the server you want to deploy:
|
2023-10-28 23:37:31 +00:00
|
|
|
|
2023-11-06 20:34:50 +00:00
|
|
|
For nachtigall.pub.solar:
|
2024-05-08 20:57:07 +00:00
|
|
|
|
2023-10-28 23:37:31 +00:00
|
|
|
```
|
2024-05-25 15:25:45 +00:00
|
|
|
deploy --targets '.#nachtigall' --magic-rollback false --auto-rollback false --keep-result --result-path ./results
|
2023-10-28 23:37:31 +00:00
|
|
|
```
|
|
|
|
|
2024-05-25 15:25:45 +00:00
|
|
|
For metronom.pub.solar (aarch64-linux):
|
|
|
|
|
|
|
|
```
|
|
|
|
deploy --targets '.#metronom' --magic-rollback false --auto-rollback false --keep-result --result-path ./results --remote-build
|
2023-11-06 20:34:50 +00:00
|
|
|
```
|
|
|
|
|
2024-04-05 21:02:15 +00:00
|
|
|
Usually we skip all rollback functionality, but if you want to deploy a change
|
|
|
|
that might lock you out, e.g. to SSH, it might make sense to set these to `true`.
|
2023-11-06 20:34:50 +00:00
|
|
|
|
2024-04-05 21:02:15 +00:00
|
|
|
To skip flake checks, e.g. because you already ran them manually before
|
|
|
|
deployment, add the flag `--skip-checks` at the end of the command.
|
|
|
|
|
|
|
|
`--dry-activate` can be used to only put all files in place without switching,
|
|
|
|
to enable switching to the new config quickly at a later moment.
|
|
|
|
|
2024-05-25 15:25:45 +00:00
|
|
|
We use `--keep-result --result-path ./results` to keep the last `result`
|
|
|
|
symlink of each `deploy` from being garbage collected. That way, we keep builds
|
|
|
|
cached in the Nix store. This is optional and both flags can be removed if disk
|
|
|
|
space is a scarce resource on your machine.
|
|
|
|
|
2024-04-05 21:02:15 +00:00
|
|
|
You'll need to have SSH Access to the boxes to be able to run `deploy`.
|
|
|
|
|
|
|
|
### Getting SSH access
|
2024-05-08 20:57:07 +00:00
|
|
|
|
2024-04-05 21:02:15 +00:00
|
|
|
See [administrative-access.md](./administrative-access.md).
|