Self-hosted (AWS)

Operate your installation

Check, upgrade, roll back and remove an installation with the Diakrin CLI.

Deployment
Self-hosted
Area
Operate

Five commands cover everything after the install: check it, upgrade it, roll it back and remove it.

Before you start

You supplyExampleComes from
The settings filediakrin.envThe folder you installed from
AWS accessaws sts get-caller-identity worksThe 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

sh
diakrin self-hosted status --env diakrin.env

You should see the installed version, the CLI version, whether an update is available and the running services.

Run the health check

sh
diakrin self-hosted doctor --env diakrin.env

You should see every check pass. If the GitHub webhook source ranges changed, refresh them:

sh
diakrin self-hosted doctor --env diakrin.env --fix

Upgrade

List the signed releases, then move to one:

sh
diakrin self-hosted versions --env diakrin.env
sh
diakrin self-hosted upgrade --to <version> --env diakrin.env

You 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

sh
diakrin self-hosted rollback --env diakrin.env

You 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.

sh
diakrin self-hosted destroy --env diakrin.env --dry-run

You should see what would be removed and nothing changed.

sh
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.

sh
diakrin self-hosted destroy --env diakrin.env --confirm-installation <id> --purge-retained

You should see nothing left of the installation except a KMS key waiting out its deletion period.

If it fails

You seeIt meansDo this
UPGRADE_TARGET_REQUIRED (exit 2)upgrade needs --toPick a version from versions
UPGRADE_SKIP or DOWNGRADE (exit 5)The release is not a valid next stepUpgrade from a version listed in Upgrade from
NO_PREVIOUS (exit 2)There is no earlier release to return toNothing to roll back
DESTROY_INCOMPLETE (exit 1)Part of the removal failed; nothing was forgottenRun the same destroy command again

Next

See the releases, or troubleshoot a problem.

Next stepSelf-hosted releases →