Specific Changes Required for Version Upgrades¶
Upgrade from 2.6 to 2.7¶
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 databse, 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.
ALTER TABLE devices ADD COLUMN IF NOT EXISTS friendlyname varchar(256), ADD COLUMN IF NOT EXISTS dnssuffix varchar(256);
-
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)¶
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.
-
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!