Self-hosted (AWS)
Operate your installation
Check, upgrade, roll back and remove an installation with the Diakrin CLI.
Five commands cover everything after the install: check it, upgrade it, roll it back and remove it.
Before you start
| You supply | Example | Comes from |
|---|---|---|
| The settings file | diakrin.env | The folder you installed from |
| AWS access | aws sts get-caller-identity works | The same account as the install |
Every command takes --env diakrin.env, plus --profile, --region and --installation to override it. Add --json for machine-readable output.
Check the status
diakrin self-hosted status --env diakrin.envYou should see the installed version, the CLI version, whether an update is available and the running services.
Run the health check
diakrin self-hosted doctor --env diakrin.envYou should see every check pass. If the GitHub webhook source ranges changed, refresh them:
diakrin self-hosted doctor --env diakrin.env --fixUpgrade
List the signed releases, then move to one:
diakrin self-hosted versions --env diakrin.envdiakrin self-hosted upgrade --to <version> --env diakrin.envYou should see a database snapshot, infrastructure changes, migrations and a rolling update, ending healthy. An upgrade must come from a version listed in Upgrade from on Self-hosted releases. --to is required. Run doctor afterwards.
Roll back
diakrin self-hosted rollback --env diakrin.envYou should see the services return to the previous release's images. The database is not rolled back; the result names the snapshot taken before the upgrade. Rolling back after an upgrade needs CLI 0.1.7 or newer.
Remove it
A person decides this and types the installation id. An agent never does.
diakrin self-hosted destroy --env diakrin.env --dry-runYou should see what would be removed and nothing changed.
diakrin self-hosted destroy --env diakrin.env --confirm-installation <id>You should see everything Diakrin created removed. The audit bucket, the state bucket and a final database snapshot are kept on purpose.
For a trial, --purge-retained also deletes the final snapshots, the audit bucket and the state bucket. The audit bucket can be deleted only if you set DIAKRIN_AUDIT_RETENTION_DAYS=1 at install. That value is for trials and never for production.
diakrin self-hosted destroy --env diakrin.env --confirm-installation <id> --purge-retainedYou should see nothing left of the installation except a KMS key waiting out its deletion period.
If it fails
| You see | It means | Do this |
|---|---|---|
UPGRADE_TARGET_REQUIRED (exit 2) | upgrade needs --to | Pick a version from versions |
UPGRADE_SKIP or DOWNGRADE (exit 5) | The release is not a valid next step | Upgrade from a version listed in Upgrade from |
NO_PREVIOUS (exit 2) | There is no earlier release to return to | Nothing to roll back |
DESTROY_INCOMPLETE (exit 1) | Part of the removal failed; nothing was forgotten | Run the same destroy command again |
Next
See the releases, or troubleshoot a problem.