Skip to main content
Version: Organisations 1.2.8

Upgrading Organisations

For the cloud engineer who installed Organisations, with the same AWS credentials: run the newer bundle's installer from a fresh directory in the same account and region; it re-runs the steps a release changes and leaves your administrators and single sign-on as they are.

Before you start: download the latest release from the AlphaAgent Console's Organisation page (Console: licences, usage and billing); the installer does not fetch releases. Requirements are those of the install (Install Organisations).

Upgrade​

  1. Unzip the new bundle into its own directory.
  2. Copy the installer's state file, .alphaagent-org-install.json, from the previous bundle's directory into the new one; it carries the step record and your answers.
  3. Run python3 orgctl.py install with the same --region and credentials. The installer finds the existing Organisation, prints its stacks and reads the running version from the deployed application stack itself. If it is older than the bundle it says "this bundle is <new>; the running install is <old>." and offers the Resume menu: Resume (default: continue from the first incomplete step and update the running install), Redo (every step again; idempotent, slower) or Delete and reinstall (destroy everything, then start fresh; the fresh install is always private, so it asks for a Transit Gateway, your administrators' ranges and the outbound traffic choice, and with console_access set to public in --config it stops before deleting anything). --yes always resumes.
  4. Confirm. The installer prints "Upgrading from <old> to <new>." and "Re-running org-auth, foundation, private-network, push-image, seed-config, spa, app, settle, doctor to apply <new>": the sign-in stack (updated in place), the foundation and data stacks, the private network, the container image, the configuration secrets, the console web application, the application stack, the settle wait and the doctor. saml, console-credential and bootstrap-admin do not re-run and are not asked again.
  5. Wait for the Done banner with your console address.

From Organisations 1.2.0 you go straight to the latest release shown on the Organisation page of the AlphaAgent Console, in one install; no release is a required stop on the way.

A stack change that would replace a data-holding resource (a table, secret, bucket, file system, cache, the user pool, a repository, queue, topic or database) stops and asks; only --allow-data-loss skips the question, never --yes or --config. Progress is saved after each step; Ctrl-C stops before the next and the same command resumes. Finally the installer re-reads the running version; a run that leaves the old one in place exits with "This run did not update the running install (still <old>). Run python3 orgctl.py install --redo or report this." instead of Done.

Update Organisations before a Studio release that needs it​

Some Studio releases need a newer Organisations than the one you run. Studio 2.2.28 and later ship the coder workspace in its own, smaller image, and Organisations 1.2.8 is the release that copies it into your account's image repository with the other Studio images. An earlier Organisations refuses such a release (release_needs_newer_organisations) instead of deploying a workspace that pulls an image nobody pushed. Update Organisations first, then update Studio. The update needs no new permissions in your AWS accounts. Organisations 1.2.8 also adds the Coder workspaces section to each deployment's Analytics tab, and a deployment shows Not reported there until its next health check (Deployment detail).

While the update runs​

When an update replaces the running Organisations application, the installer stops Update schedules before it changes anything else, and says so: from then they start no job, under either release, until the update finishes. From the moment the new release starts, changes to configuration templates, Update schedules, deployments and their values, and every new job, are held until it finishes; each such change in the console answers "Organisations is updating. Try again in a few minutes." Signing in, viewing, revoking an API key or a connector credential, and removing administrators, roles and grants stay available.

The installer lists the jobs that are running or waiting, by deployment. It waits for a running job to end before it updates, unless you answer yes (or pass --yes): the update then stops the task running the job, and the new release takes the job over. A job waiting for an answer, waiting to start, or failed and still holding its deployment carries on under the new release when it is resumed, starting with a check of the values it applies; the update goes over such jobs only when you answer yes. Change nothing in Organisations until the update finishes. Once the application stack runs the new release and every task of the earlier release has stopped, Update schedules run again, as they are, and changes are open again. The console is uploaded after the application stack is updated, so it always matches the release that answers it.

If an update stops part way​

  • It stops before the application stack is updated, or the stack rolls back: the installer puts every Update schedule back as it was and says so. Run python3 orgctl.py install again to finish the update.
  • You press Ctrl-C, or the installer stops waiting, while the stack is still updating: AWS carries on. The installer keeps Update schedules stopped and says so. Run the install again: it waits for the update to end, then finishes it or puts your Update schedules back.
  • The application stack cannot finish rolling back (UPDATE_ROLLBACK_FAILED): Update schedules stay stopped and changes stay held. In the CloudFormation console, choose Continue update rollback for alphaagent-org-app, wait until it reads UPDATE_ROLLBACK_COMPLETE, then run the install again. Never delete the application stack.
  • A later step stops after the stack runs the new release: the new release runs your Update schedules as before. Run the install again to finish the steps that did not complete.
  • A task of the earlier release is still running when every step has finished: changes stay paused, and the installer exits with an error instead of reporting success. Run the install again in a few minutes.
  • The installer cannot put the Update schedules back: it says they stay stopped until the install finishes. Run it again, and do not edit Update schedules until it has finished.
  • The pause has no expiry: if orgctl install is no longer running, run it again. Two hours after the update began, the console message says so: "Organisations has been updating since {time}. If orgctl install is no longer running, run it again to finish the update."
  • An update begun from another directory or computer: the installer says when it began and asks before carrying it on in its place; answer no if that update is still running. --yes also answers no; to carry it on unattended, set "_take_over_install": true in the --config file.

After an update​

A job the earlier release ran while the update was under way can return a deployment's API allow-list, CloudWatch log retention and alarm topic to their defaults before the new release records them. The installer names each deployment where that may have happened; check those settings on its Configuration tab. Organisations 1.2.2 records the values each deployment runs as the update reaches it, so check the Configuration and Runtime limits tabs once it finishes, and set any value or size changed by hand in AWS since then (Runtime limits and service sizing, Where values come from).

Installing Organisations 1.2.2 before Studio 2.2.12 is visible to you gives time to save the values and sizes you rely on: on a deployment that runs Studio 2.2.7, the Runtime limits tab and Edit service sizing save them from then on, with the ranges of the next Studio release, and the update to Studio 2.2.12 writes them.

Installing an older bundle​

An older bundle stops before anything is changed, with exit code 3, whether you run install (with or without --restart-from or --redo) or a single step. This applies when the bundle is older than the Organisations running in the account, or older than the release that last wrote your deployment records. The message names what the older release would leave alone, because it cannot read what the newer one wrote:

  • "Organisations {older} makes no change to a deployment whose records a newer release wrote: {n} deployments keep their settings, and no job runs on them until Organisations {newer} or later is installed." Uninstalled deployments are not counted.
  • "Update schedules stop running under the older release: {n} schedules. They run again once Organisations {newer} or later is installed." Only enabled schedules are counted.

Install the release the message names, or a later one. --allow-downgrade installs the older bundle anyway: it first prints the same sentences, then lists the affected deployments by name and domain. It is never implied by --yes or --config, and the installer accepts no shortened form of the flag. If the installer cannot read the deployment records, it says which check it could not make and why. An upgrade, or a re-install of the release already running, goes ahead and says the check used only the running version; with no running version it stops and tells you to grant dynamodb:Scan on the deployments table, refresh your AWS credentials, run the command again in a few minutes, or download the latest release. After a downgrade, an Update schedule that a newer release saved in a form the older release cannot read covers no deployment until the newer release is installed again, and no job runs on a deployment whose records a newer release wrote until then. Reload any console page left open after a downgrade.

A schedule that a later release saved in a shape this release cannot read shows read-only as Saved by a newer Organisations release. It cannot be edited, enabled or run now, and can be deleted.

How your console's network access is kept​

The installer has thirteen steps. Network access, outbound traffic and the VPC range stay as they were installed; nothing is asked again.

  • A private console re-applies its private-network step: the attachment is found already available (no new request), and the routes, load balancer access and, with outbound traffic through your Transit Gateway, the endpoints are brought up to the release.
  • A public console (installed before private network access) keeps its internet-facing load balancer and NAT gateway. The private-network step prints "Skipped: public console access", and teardown works as before. Network access cannot be changed in place: a private console means a new install.
  • Before anything changes, the installer checks that each private subnet still has room for what the new release runs there. If not, it stops with the Organisation unchanged and names the smallest range that fits.

Run doctor​

python3 orgctl.py doctor, the last step, checks the configuration secrets, fail-closed configuration, the tables, the administrator roster, the image repositories, the two services, the account-registration template, the web application's CORS rule, the SAML wiring, the sign-out address, the Console credential and, on a private console, the attachment, routes and load balancer access, and the firewall list with outbound traffic through your Transit Gateway. Before checking the services it waits for any rolling restart the preceding steps started. It prints "N passed, N warning(s), N failed, N skipped", exits 2 on a failure, and --json prints data. After an upgrade: sign-out fails if the signed-out address is missing (run python3 orgctl.py org-auth); console-credential warns if the Console is unreachable and fails if the credential was rotated or revoked there (run python3 orgctl.py console-credential, or bundle downloads fail).

Re-run a single step​

Every step has its own command: preflight, org-auth, foundation, private-network, push-image, seed-config, spa, app, settle, console-credential, saml, bootstrap-admin and doctor; a single step skips the requirements block and the confirmation. saml re-asks for the metadata file when your identity provider's certificate rotates; console-credential follows a rotation in the Console.

status, reset and teardown​

  • python3 orgctl.py status prints the installed state (steps, single sign-on values, hostname, load balancer, stack statuses) and never prompts. A stack whose first create failed reads "stuck: <stack>. The first create failed and rolled back. Re-run python3 orgctl.py install: it deletes the stack and creates it again, unless its rollback kept resources, which are then named." Any other stuck stack cannot be updated: delete it, then python3 orgctl.py install --restart-from <step>.
  • python3 orgctl.py reset empties the state file when it was confirmed against another account or region.
  • python3 orgctl.py teardown deletes the Organisation in this account and region; the full resource list and flags are on Install Organisations.

What you should see​

  • The Done banner with "Console: https://<your hostname>"; doctor printing "N passed, 0 failed" (warnings are explained in the table).
  • The Organisations console, for anyone signed in, showing the Organisations update banner, "The Organisations console was updated. Reloading to pick up the latest version…" with Reload now, and reloading itself four seconds later (someone in the middle of a task sees "A new version of the Organisations console is available. Reload when you have finished what you are doing." and reloads when ready); the foot of the Dock shows the new version. On live walks an upgrade took 7 to 13 minutes.
  • Your Studio deployments unchanged: upgrading Organisations does not update them. The Studio releases your Organisation offers reach each deployment through an update schedule (Configuration templates and Update schedules); Updates, Releases in the console lists it.

Notes​

  • python3 orgctl.py with no command prints the guided welcome ("No install recorded on this machine…", "An install is already under way here: N/13 steps done. Next step: …", or complete) and offers to start or resume.
  • Same account and region only. One installer per directory at a time; status is never blocked.
  • The network answers are fixed for the Organisation's life: console access, outbound traffic, the VPC range, the Transit Gateway, the administrators' ranges and the egress IP addresses. A --config file that gives a different value for one of them stops the run and names the value the Organisation was installed with.
  • Without the copied state file the installer recovers the installation from the live stacks and still applies the release, but may re-ask answers it cannot read back. An interrupted first install finished with single-step commands also upgrades correctly.
  • Teardown never touches the registration stacks in your Studio accounts (Accounts).