Upgrade Toolkit Version
Specific Changes Required for Version Upgrades¶
Upgrade to 2.11 from 2.10¶
The 2.11 release of RPS requires an upgrade to the rpsdb
database.
-
Run the following SQL script to add the new table before upgrading the services.
ALTER TABLE IF EXISTS profiles ADD COLUMN IF NOT EXISTS ip_sync_enabled BOOLEAN NULL;
Example - Adding Columns to PostgresDB using psql
This example walks through one potential option to update a Postgres Database using psql.
-
Open a Command Prompt or Terminal.
-
Connect to your Postgres instance and
rpsdb
database. Provide the hostname of the database, the port (Postgres default is 5432), the databaserpsdb
, and your database user.psql -h [HOSTNAME] -p 5432 -d rpsdb -U [DATABASE USER]
Example Commands
Azure: psql -h myazuredb-sql.postgres.database.azure.com -p 5432 -d rpsdb -U postgresadmin@myazuredb-sql AWS: psql -h myawsdb-1.jotd7t2abapq.us-west-2.rds.amazonaws.com -p 5432 -d rpsdb -U postgresadmin
-
Provide your Postgres user password.
-
Run the SQL Statements.
-
Verify the column was added to the table.
SELECT * FROM profiles;
-
-
Continue with general upgrade steps below.
Upgrade to 2.10 from 2.9¶
The 2.10 release of RPS requires an upgrade to the rpsdb
database.
-
Run the following SQL script to add the new table before upgrading the services.
ALTER TABLE IF EXISTS wirelessconfigs ADD COLUMN IF NOT EXISTS ieee8021x_profile_name citext, ADD CONSTRAINT ieee8021xconfigs_fk FOREIGN KEY (ieee8021x_profile_name, tenant_id) REFERENCES ieee8021xconfigs (profile_name, tenant_id);
Example - Adding Columns to PostgresDB using psql
This example walks through one potential option to update a Postgres Database using psql.
-
Open a Command Prompt or Terminal.
-
Connect to your Postgres instance and
rpsdb
database. Provide the hostname of the database, the port (Postgres default is 5432), the databaserpsdb
, and your database user.psql -h [HOSTNAME] -p 5432 -d rpsdb -U [DATABASE USER]
Example Commands
Azure: psql -h myazuredb-sql.postgres.database.azure.com -p 5432 -d rpsdb -U postgresadmin@myazuredb-sql AWS: psql -h myawsdb-1.jotd7t2abapq.us-west-2.rds.amazonaws.com -p 5432 -d rpsdb -U postgresadmin
-
Provide your Postgres user password.
-
Run the SQL Statements.
-
Verify the column was added to the table.
SELECT * FROM wirelessconfigs;
-
-
Continue with general upgrade steps below.
Upgrade to 2.9 from 2.8¶
The 2.9 release of RPS requires an upgrade to the rpsdb
database.
-
Run the following SQL script to add the new table before upgrading the services.
CREATE TABLE IF NOT EXISTS ieee8021xconfigs( profile_name citext, auth_protocol integer, servername VARCHAR(255), domain VARCHAR(255), username VARCHAR(255), password VARCHAR(255), roaming_identity VARCHAR(255), active_in_s0 BOOLEAN, pxe_timeout integer, wired_interface BOOLEAN NOT NULL, tenant_id varchar(36) NOT NULL, PRIMARY KEY (profile_name, tenant_id), );
-
Update the Profiles table.
ALTER TABLE IF EXISTS profiles ADD COLUMN IF NOT EXISTS ieee8021x_profile_name citext, ADD CONSTRAINT ieee8021xconfigs_fk FOREIGN KEY (ieee8021x_profile_name, tenant_id) REFERENCES ieee8021xconfigs (profile_name, tenant_id);
Example - Adding Columns to PostgresDB using psql
This example walks through one potential option to update a Postgres Database using psql.
-
Open a Command Prompt or Terminal.
-
Connect to your Postgres instance and
rpsdb
database. Provide the hostname of the database, the port (Postgres default is 5432), the databaserpsdb
, and your database user.psql -h [HOSTNAME] -p 5432 -d rpsdb -U [DATABASE USER]
Example Commands
Azure: psql -h myazuredb-sql.postgres.database.azure.com -p 5432 -d rpsdb -U postgresadmin@myazuredb-sql AWS: psql -h myawsdb-1.jotd7t2abapq.us-west-2.rds.amazonaws.com -p 5432 -d rpsdb -U postgresadmin
-
Provide your Postgres user password.
-
Run the SQL Statements.
-
Verify the column was added to the table.
SELECT * FROM ieee8021xconfigs;
-
-
Continue with general upgrade steps below.
Upgrade to 2.8 from 2.7¶
The 2.8 release of RPS requires an upgrade to the rpsdb
database.
-
Run the following SQL script to add the new column before upgrading the services.
ALTER TABLE IF EXISTS profiles ADD COLUMN IF NOT EXISTS tls_signing_authority varchar(40) NULL;
Example - Adding Columns to PostgresDB using psql
This example walks through one potential option to update a Postgres Database using psql.
-
Open a Command Prompt or Terminal.
-
Connect to your Postgres instance and
rpsdb
database. Provide the hostname of the database, the port (Postgres default is 5432), the databaserpsdb
, and your database user.psql -h [HOSTNAME] -p 5432 -d rpsdb -U [DATABASE USER]
Example Commands
Azure: psql -h myazuredb-sql.postgres.database.azure.com -p 5432 -d rpsdb -U postgresadmin@myazuredb-sql AWS: psql -h myawsdb-1.jotd7t2abapq.us-west-2.rds.amazonaws.com -p 5432 -d rpsdb -U postgresadmin
-
Provide your Postgres user password.
-
Run the SQL Statement.
-
Verify the column was added to the table.
SELECT * FROM profiles;
-
-
Continue with general upgrade steps below.
Upgrade to 2.7 from 2.6¶
The 2.7 release of MPS requires an upgrade to the mpsdb
database.
-
Run the following SQL script to add two new columns before upgrading the services.
ALTER TABLE devices ADD COLUMN IF NOT EXISTS friendlyname varchar(256), ADD COLUMN IF NOT EXISTS dnssuffix varchar(256);
Example - Adding Columns to PostgresDB using psql
This example walks through one potential option to update a Postgres Database using psql.
-
Open a Command Prompt or Terminal.
-
Connect to your Postgres instance and
mpsdb
database. Provide the hostname of the database, the port (Postgres default is 5432), the databasempsdb
, and your database user.psql -h [HOSTNAME] -p 5432 -d mpsdb -U [DATABASE USER]
Example Commands
Azure: psql -h myazuredb-sql.postgres.database.azure.com -p 5432 -d mpsdb -U postgresadmin@myazuredb-sql AWS: psql -h myawsdb-1.jotd7t2abapq.us-west-2.rds.amazonaws.com -p 5432 -d mpsdb -U postgresadmin
-
Provide your Postgres user password.
-
Run the SQL Statement.
-
Verify the columns were added to the table.
SELECT * FROM devices;
-
-
Continue with general upgrade steps below.
Upgrade a Minor Version (i.e. 2.X to 2.Y)¶
Kubernetes Upgrade¶
Upgrading from a previous minor version to a new minor version release is simple using Helm. By updating your image tags and upgrading through Helm, a seamless transition can be made. Stored profiles and secrets will be unaffected and any connected devices will transition over to the new MPS pod.
Note - Using Private Images
The steps are the same if using your own images built and stored on a platform like Azure Container Registry (ACR) or Elastic Container Registry (ECR). Simply point to the new private images rather than the public Intel Dockerhub.
-
Pull the latest release within
.\open-amt-cloud-toolkit
directory.git pull
-
Merge the latest changes into your existing branch.
git merge v2.13.0
-
In the values.yaml file, update the images to the new version wanted. Alternatively, you can use the
latest
tags.Example - values.yaml File
images: mps: "intel/oact-mps:latest" rps: "intel/oact-rps:latest" webui: "intel/oact-webui:latest" mpsrouter: "intel/oact-mpsrouter:latest" mps: ...
-
In Terminal or Command Prompt, go to the deployed open-amt-cloud-toolkit repository directory.
cd ./YOUR-DIRECTORY-PATH/open-amt-cloud-toolkit
-
Use Helm to upgrade and deploy the new images.
helm upgrade openamtstack ./kubernetes/charts
Successful Helm Upgrade
Release "openamtstack" has been upgraded. Happy Helming! NAME: openamtstack LAST DEPLOYED: Wed Mar 23 09:36:10 2022 NAMESPACE: default STATUS: deployed REVISION: 2
-
Verify the new pods are running. Notice the only restarted and recreated pods are MPS, RPS, and the WebUI.
kubectl get pods
Example - Upgraded Running Pods
NAME READY STATUS RESTARTS AGE mps-55f558666b-5m9bq 1/1 Running 0 2m47s mpsrouter-6975577696-wn8wm 1/1 Running 0 27d openamtstack-kong-5999cc6b97-wbmdw 2/2 Running 0 27d openamtstack-vault-0 1/1 Running 0 27d openamtstack-vault-agent-injector-6d6c75f7d5-sh5nm 1/1 Running 0 27d rps-597d7894b5-mbdz5 1/1 Running 0 2m47s webui-6d9b96c989-29r9z 1/1 Running 0 2m47s
Rollback a Version¶
Is the functionality not working as expected? Rollback to the previous deployment using Helm.
-
Use the Helm rollback command with the Revision you want to rollback to. In this example deployment, we would rollback to the original deployment revision which would be 1.
helm rollback openamtstack [Revision-Number]
Successful Rollback
Rollback was a success! Happy Helming!
Local Docker Upgrade¶
The following steps outline how to upgrade using the public Docker Hub images. Data will not be lost unless Postgres or Vault need to be upgraded and restarted.
-
From the
.\open-amt-cloud-toolkit\
directory, pull the latest branches.git pull
-
Checkout the new release.
git checkout v2.13.0
Note - Rebuilding New Images Locally
If building your own images, you will also have to checkout the newer release from each repo within
.\open-amt-cloud-toolkit\
.-
Pull the new releases of the submodules.
git submodule update --recursive
-
Checkout the release for each of the services you want to upgrade.
cd mps git checkout v2.11.0
-
Repeat for other services.
-
Build the new images.
docker compose up -d --build
-
-
Pull the new release Docker Hub images.
docker compose pull
-
Start the new containers.
docker compose up -d --remove-orphans
-
OPTIONAL. If using versioned tags rather than
latest
, you can delete older tagged images using the following. This will delete all unused images. If you have other non Open AMT images you wish to keep, do NOT run this command.docker image prune -a