Skip to main content
Star us on GitHub Star

Upgrade a Quickstart Network

This document explains the process for backing up, and upgrading your controller and router(s).

Backup Existing Network

While you can certainly back up every file relating to your network, there are only a few that would be necessary. To back up the necessary files follow these steps:

  1. Backup the database:
    1. Run the following
    ziti edge db snapshot
    1. This will create a backup file in the same directory as your controller's DB file. It will have the same name as the controller DB file (usually ctrl.db) with a date and timestamp appended to it in the following format ctrl.db-YYYYMMDD-HHMMSS. If you're not sure where your DB file is located, you can find the location in the db section of your controller config.
  2. Backup the controller PKI.
    1. Copy the PKI directory to a safe backup location (Default path: $ZITI_HOME/quickstart/$(hostname -s)/pki/).
  3. Backup the controller config file (default path: $ZITI_HOME/$(hostname -s).yaml).
  4. Backup the environment file (default path $ZITI_HOME/$(hostname -s).env).
  5. Backup any router config files.
    1. If you used one of our quickstarts, the single edge router created defaults to $ZITI_HOME/$(hostname -s)-edge-router.yaml

Stop Existing Services

If your network is using services to run your controller and/or router(s), stop those services.

Obtain the Desired Binary

Releases can be found here. There is a helpful script function called getZiti that will obtain the binary, and determine the correct architecture and OS for you.

Here is the process for using getZiti to obtain the latest binary. You may optionally add yes as an argument to the getZiti function to have the new ziti binary automatically added to your $PATH

source /dev/stdin <<< "$(wget -qO- https://get.openziti.io/quick/ziti-cli-functions.sh)"
getZiti
note

After upgrading the binary, be sure to check your PATH to ensure it is pointing to the new binary.

Update Services

If you have services to start up the network, update them to use the new binary file.

The ExecStart section on a systemd service will point to the full path to the old binary. Update this line to point to the path of the newly downloaded binary. Any path in the service file needs to be updated similarly.

For example, the following portion of the ExecStart

.../ziti-v0.28.0/ziti" controller run 

will be updated to the following for v0.28.2 and later.

.../ziti-v0.30.4/ziti" controller run

Reload and Start Services

To reflect changes made to the services, reload the service daemon and start your services.

Upgrading Versions <=v0.28.2

If your old Ziti network was v0.28.3 or later, this section can be ignored

A major change to environment variables names was performed on v0.28.3 so, if your network was v0.28.2 or earlier, then you may optionally run the following commands to update your env file to use the updated environment variable names.

source /dev/stdin <<< "$(wget -qO- https://get.openziti.io/quick/ziti-cli-functions.sh)"
performMigration