Skip to content
NebulaCtrldocs

Upgrade the control plane

Move the control plane to a newer release from Settings → Updates or with the installer, confirm it is healthy, update the cluster agents, approve new GitHub App permissions, and go back to the previous release if needed.

An upgrade replaces the control plane container with the new release's image. Pending database migrations run when the new container starts. Clusters and their workloads are not touched.

Before you start

  • Take a backup. Neither the console update nor the installer backs up the database. Follow Back up and restore the control plane, and keep the dump with its matching .env.
  • Read the changelog for every release between the running version and the target. The changelog announces breaking changes to the HTTP API and to nebula.toml.
  • Write down the running version. You need it to go back. It is on Settings > Updates and in the version pill in the header.
  • Choose a path. The console path needs the nebula-updater service on the host, and an owner of the Default organization. The installer path needs a shell on the host. The installer path is the only way to choose a version other than the newest.
  • Check openssl. The installer needs openssl 1.1.1 or newer to verify the release, and stops before it changes anything if it is missing. openssl version shows it. The updater service verifies releases itself and needs nothing extra.
  • Know the rollback. If the new release does not come up, the updater puts the previous one back by itself. By hand, you re-run the installer with the previous version and --allow-downgrade. Migrations are never reversed, so a release that cannot run on the migrated schema needs the backup restored. See If it goes wrong.
  • Check scripts that lay out the canvas. PUT and DELETE /api/v1/projects/ID/canvas no longer exist. The layout belongs to an environment now: GET and PUT /api/v1/environments/ID/canvas. ID is the project's or the environment's id.

The control plane is unreachable for the few seconds it takes to replace its container. The console reconnects by itself.

1. Update the control plane

  1. Sign in as an owner of the Default organization and open Settings > Updates.
  2. Read the release notes with Release notes.
  3. Select Update to vX.Y.Z, then Update to vX.Y.Z again in the confirmation.

The panel moves through Waiting for updater, Updating and Updated. Until the updater picks the request up, Cancel update withdraws it. Only the newest published release is offered, and only when it is newer than the running one.

If the button is replaced by a warning, the warning says what is missing: no updater token, a development build, no updater reporting, or an updater offline for more than two minutes. Below it, How to update shows the installer command.

2. Update the cluster agents

A control plane update does not update any agent. Follow Update a cluster agent for each cluster. Settings > Updates lists the clusters whose agents trail the control plane, each with an Update agent button. With two or more, Update all agents updates them one after another.

3. Approve new GitHub App permissions

Do this if you connected a GitHub App. A new App asks for checks and pull_requests at the write level. An installation granted earlier keeps the permissions it has until its owner approves the new ones. Pushes keep deploying meanwhile. Without checks, a pull request's nebula.toml plan is posted as a commit status and not as a check run. Without write access to pull_requests, a focused preview posts no comment on the pull request. Without read access, no preview environment is created.

  1. Select Settings > Integrations.
  2. Under Source control, select Manage on the GitHub row, then Check connection on the connection.
  3. If the connection shows Missing permissions: followed by checks or pull_requests, select Manage on GitHub and approve the new permissions in the App's settings on GitHub. The line never lists the write level of pull_requests, which only adds the preview comment.
  4. Return to the console and select Check connection again.

The console also shows Approve the new pull request permission on GitHub to enable previews with a Review on GitHub button when pull_requests is missing.

4. Refresh the permissions of older clusters

Do this if you want the browser shell on a cluster whose agent was installed before the shell existed. An agent update changes only the agent's image, never its roles, so the roles on that cluster still come from the install manifest you last applied. Until the manifest is applied again, the cluster lacks the pods/exec permission, and Open shell is disabled with the message "Update the agent to open a shell". Follow Re-apply the manifest on an older cluster for each cluster.

Verify

curl -s http://127.0.0.1:8080/api/v1/version | grep -o '"version":"[^"]*"'

Use your listen address if it is not the default.

"version":"0.39.0"
  • The value is the release you installed.
  • Settings > Updates shows the result as Updated to vX.Y.Z.
  • Settings > Integrations shows no Missing permissions: line on the GitHub connection after Check connection.
  • On a cluster you refreshed, an admin sees Open shell enabled on the Instances tab of a running service.
  • Open the console and a project. Clusters show connected after their agents reconnect.

Verify a release by hand

Since 0.42.0, every release carries a detached signature made with one Ed25519 key. The installer, cli.sh and the updater check these signatures themselves. Do it by hand to inspect a file before you run it, or on a host that has a mirror of the release site.

The public key is published at https://get.nebulactrl.dev/release-signing.pub. A copy is built into the installer, cli.sh and the updater. Each signature is the file's URL plus .sig, and holds the base64 of the raw 64-byte signature over the file's exact bytes.

Release X.Y.Z signs these files, each beside its .sig:

LocationFiles
https://get.nebulactrl.dev/vVERSION/install.sh, release.json, compose.yaml, cli/nebula_VERSION_checksums.txt
https://get.nebulactrl.dev/install.sh, compose.yaml, cli.sh, version, changelog.json, versions.json

The files under /vVERSION/ never change. The ones at the top move to the newest release.

To check one file, you need openssl 1.1.1 or newer and bash. VERSION is the release, for example 0.42.0.

  1. Download the key.

    curl -fsSL https://get.nebulactrl.dev/release-signing.pub -o release-signing.pub
  2. Compare its fingerprint with this one.

    openssl pkey -pubin -in release-signing.pub -outform DER | openssl dgst -sha256
    SHA2-256(stdin)= 7951a947573e9a2d031dbdaaf422bb3c442cb4cc93b45fc50f7e1d7cc935f7ab
  3. Download the file and its signature.

    curl -fsSLO https://get.nebulactrl.dev/vVERSION/release.json -O https://get.nebulactrl.dev/vVERSION/release.json.sig
  4. Verify the signature.

    openssl pkeyutl -verify -pubin -inkey release-signing.pub -rawin -in release.json -sigfile <(base64 -d release.json.sig)
    Signature Verified Successfully

Any other result means the file is not what the release published. Do not use it.

release.json pins the control plane and agent images by digest in images.controlPlane and images.agent. After a signed release.json, that digest is the one to trust. Images are also signed by the workflow that publishes them. To verify the control plane image with cosign, replace DIGEST with the value after @ in images.controlPlane:

cosign verify ghcr.io/nebulactrl/nebula@sha256:DIGEST --certificate-identity-regexp '^https://github.com/nebulactrl/nebula/.github/workflows/image.yml@refs/tags/v' --certificate-oidc-issuer https://token.actions.githubusercontent.com

The first curl | sh of the installer, or of cli.sh, rests on TLS to get.nebulactrl.dev, because a script cannot check its own signature before it runs. To avoid that, download install.sh and install.sh.sig, verify them with the steps above, then run the file with sh install.sh.

Install a release by hand

Do this when the updater refuses a release, or when you want a release older than 0.42.0. Releases before 0.42.0 were published before releases were signed, so the updater cannot verify them and never runs them. The installer installs them with a warning, and their files are protected by TLS only.

Run this on the host. Replace /opt/nebula with your install directory and VERSION with the release. Add --allow-downgrade when it is older than the running one:

curl -fsSL https://get.nebulactrl.dev/vVERSION/install.sh | sh -s -- --dir /opt/nebula --version VERSION --allow-downgrade

For a release since 0.42.0, the installer verifies release.json and the Compose file before it changes anything. For an older release, it prints a warning that it cannot.

If it goes wrong

The GitHub connection still lists missing permissions after you approved them. The list is stored with the last check. Select Check connection again to refresh it.

The console shows "Update to vX.Y.Z failed and was rolled back". The installer failed, or the new release did not answer with its version, so the updater ran the previous release's installer with --allow-downgrade, and the control plane runs the previous version again. The update history lists it as Rolled back. Read the installer output with Show installer log, fix the cause, then request the update again. On the host the log is /opt/nebula/updater/install-VERSION.log, and the service log is journalctl -u nebula-updater.

The console shows "Update to vX.Y.Z failed". The installer failed and so did the reinstall of the previous release. The message states what the control plane answers now and the command that puts the previous release back:

curl -fsSL https://get.nebulactrl.dev/vPREVIOUS/install.sh | sh -s -- --dir /opt/nebula --version PREVIOUS --allow-downgrade

Replace PREVIOUS with the version you wrote down. Run it on the host.

The console shows "Update to vX.Y.Z failed" with "The updater stopped reporting during the update". The updater service went away mid-update, and the control plane wrote the update off after 15 minutes without contact. The control plane runs the version named in the message. Check journalctl -u nebula-updater, then restart the service with sudo systemctl restart nebula-updater.

The updater refuses the update. The message begins The updater refused to install vX.Y.Z and names the reason, such as a version that is not newer than the installed one or one missing from the release index. Nothing was run.

The updater says a release "was published before releases were signed". The target or the rollback version is older than 0.42.0, and the updater runs only releases it can verify. Nothing was run. Follow Install a release by hand.

The updater says an installer "is not signed by the NebulaCtrl release key", or its signature "could not be downloaded". The installer it downloaded does not verify, so the updater did not save or run it. Nothing of the new release started, and the control plane still runs the version in the message. A missing signature usually means the release is still publishing: request the update again in a few minutes. A signature that does not match means the file was altered in transit or on the release site. Run the checks in Verify a release by hand from another network, and report a mismatch that persists to the NebulaCtrl maintainers as a security issue.

The previous release does not start on the migrated schema. Go back with the command above, then restore the dump you took before the upgrade. Anything written after the dump is lost, and clusters enrolled after it are unknown to the restored database. See Back up and restore the control plane.

The container never becomes healthy. The installer prints the last 40 log lines and stops. .env and the Compose file are already in place, so fix the cause and run the installer again. For the cause, see Control plane troubleshooting.

On this page