Platform v6.4.3-Upgrade Process (Docker Swarm)

Purpose of this document is to provide guideline for upgrading the SmartOps Platform in a docker swarm environment for azure to 6.4.3 version. The document contains prerequisites for installation and detailed instructions to upgrade SmartOps Platform along with FAQs.

Contents

  1. Supported releases for Upgrade
  2. Deployment Timings
  3. Preparation Activities
  4. Upgrading SmartOps from 6.4.2 to version 6.4.3
    1. Pre-Deployment Activity
    2. Deployment Activity (approximately 60 minutes)
  5. Upgrading SmartOps Platform from 6.4.3 to version 6.4.3-Hotfix 9
    1. Post-Deployment Activity
  6. Upgrading SmartOps from 6.4.0 to version 6.4.3
  7. Post Deployment Checks & Validations
    1. Validate Deployment
    2. Perform Post Deployment Configurations
    3. Validate Application Access
  8. Archive Release artifacts (Production or Client Environments)
  9. Rollback to Release Version 6.4.2 on Failed upgrade
    1. Steps to restore Release 6.4.2 Database from Back up
  10. URLs for accessing application features
  11. Get Offline token and update

Supported releases for Upgrade

 

6.4.0

6.4.2

Deployment Timings

Timings will vary based on the environment and network.

Activities

Duration

Preparation Activities

10 mins

Pre-Deployment Activity

45 minutes

Deploy SmartOps

60 minutes

Post-Deployment Activity

20 minutes

Post Deployment Checks & Validations

15 minutes

Validate Deployment

15 minutes

Perform Post Deployment Configurations

15 minutes

Archive Release artifact (Production or Client Environments)

10 minutes

Preparation Activities

ssh <App-001 VM>

 

~ df -h

udev 32G 0 32G 0% /dev

tmpfs 6.3G 2.9M 6.3G 1% /run

/dev/sda1 497G 310G 187G 63% /

tmpfs 32G 0 32G 0% /dev/shm

tmpfs 5.0M 0 5.0M 0% /run/lock

tmpfs 32G 0 32G 0% /sys/fs/cgroup

/dev/sda15 105M 3.6M 101M 4% /boot/efi

/dev/sdb1 126G 61M 120G 1% /mnt

tmpfs 6.3G 0 6.3G 0% /run/user/1000

~ exit

 

Refer following metrics for minimum disk space requirement. Please ensure that enough space is available to do Upgrade in all VMs

Content

Total Size (GB)

Requirement for Node

Docker Images

50

50 GB on each node VM

Database Volume

50

Specific to Infra node

Model Files

20

/data/smartops for each node

 

mkdir backup_6.4.2

cd backup_6.4.2

cp -r <6.4.2_deployment_artifacts_directory_name> .

 

 

Upgrading SmartOps from 6.4.2 to version 6.4.3

Pre-Deployment Activity

ssh <Infra-001 VM>

 

Back up existing data by following below steps in Infra VM

 

# Move to directory to keep the database backup files:

cd backup_6.4.2

# Copy the Data Volume Mount for Database

sudo cp -pr /var/lib/docker/volumes/mysql_mysql-data .

sudo cp -pr /var/lib/docker/volumes/mongo_mongo-data .

sudo cp -pr /var/lib/docker/volumes/postgres_postgres-data .

sudo cp -pr /var/lib/docker/volumes/elasticsearch_monitoringelasticsearch-data .

# Create the compressed file using below commands

sudo tar -pcvzf mongo_mongo-data.tar.gz mongo_mongo-data

sudo tar -pcvzf mysql_mysql-data.tar.gz mysql_mysql-data

sudo tar -pcvzf postgres_postgres-data.tar.gz postgres_postgres-data

sudo tar -pcvzf elasticsearch_monitoringelasticsearch-data.tar.gz

# Remove the uncompressed files after compressing the data successfully.

sudo rm -rf *-data

exit

 

tar -xvf smartops-product-composer-R6.4.3.tar.gz

 

If it is proxy enabled environment, execute below command to replace the proxy variables

Eg: sed -i "s,gateway.zscaler.net,http://172.67.17.50,g" config/*/*.env

sed -i "s,PROXY_PORT=9400,PROXY_PORT=8500,g" config/*/*.env

cd ~/<package_name>/stack-repo/

sed -i "s,PROXY_ENABLED=false,PROXY_ENABLED=true,g" config/*/*.env

sed -i "s,gateway.zscaler.net,<PROXY_SERVER>,g" config/*/*.env

sed -i "s,PROXY_PORT=9400,PROXY_PORT=<PROXY_PORT>,g" config/*/*.env

 

Note: Do not execute this step if it is a non-proxy environment.

 

cd ../installer/

 

sh init.sh

 

vi config.ini

 

Variable

Description

PWF_OR_PRODUCT_NAME

Name of the Packaged Workflow or Product.
value here is smartops-platform

DNS_NAME

DNS for the environment.
Example. https://smartops-dev.eastus.cloudapp.azure.com

PWF_OR_PRODUCT_DNS_SUFFIX

Suffix corresponding to deployment requirement. Leave it blank for SmartOps Platform.

INFRA_VM_NAME

Virtual Machine name(s) for Node Labelling. Provide the VM Name provisioned for SmartOps Infra Setup.
In case of multiple VMs, provide all the VMs with comma separated, and without any space in between.
Example: vm-smartopsengg-dev-infra-001,vm-smartopsengg-dev-infra-002

APP_VM_NAMES

Virtual Machine name(s) for Node Labelling. Provide the VM Name provisioned for SmartOps App Setup.
In case of multiple VMs, provide all the VMs with comma separated, and without any space in between.
Example: vm-smartopsengg-dev-app-001,vm-smartopsengg-dev-app-002

VESPA_VM_NAMES

Virtual Machine name(s) for Node Labelling. Provide the VM Name provisioned for DU Vespa Setup.
In case of separate VMs, provide all the VMs with comma separated, and without any space in between.
By default, it will be same as app VMs for SmartOps Platform.

MON_VM_NAME

Virtual Machine name(s) for Node Labelling. Provide the VM Name provisioned for Log monitoring Setup.

INFRAVM_IP

IP address of Infra VM

APPVM_IPS

app VMs' Ip address(es) (comma separated without any space in between)

VESPAVM_IPS

vespa VMs' Ip address(es) (comma separated without any space in between)

RELATIVE_PATH

Indicates the location of stack-repo directory containing stack files. By default it will be ../

HOME_PATH

Indicates the location where model files are downloaded. By default, it will be smartops

PROXY_SERVER

Proxy server settings : http://<proxy_host>:<port> if proxy is enabled. Leave it blank if Proxy is not required.

DEPLOY_OR_UPGRADE

Flag to indicate if deploy from scratch or upgrade from existing release.
Example: DEPLOY_OR_UPGRADE = upgrade

OFFLINE_TOKEN

Existing Offline Token for the environment. Refer the next instruction point to get current offline token

CLONES_STUDIO_UPLOAD_
DIALOGUE_STATUS

Set this value to true for SmartOps Platform

MYSQL_ROOT_PASSWORD

Root Password for MySQL Database. By default, it is set as 5up3ru53r_sql_Sm.
This is applicable during first deployment when we set up the database.
In case of upgrade, please provide existing password.

MONGO_ADMIN_PASSWORD

Admin Password for MongoDB. By default, it is set as 5up3ru53r_mon_sm

POSTGRESQL_PASSWORD

Password for PostgreSQL. By default, it is set as postgres

MINIO_SECRET_KEY

Secret Key for Minio. By default it is set as 5up3ru53r_min_sm

RABBIT_MQ_ADMIN_PASSWORD

Rabbit MQ Admin Password. By default, it is set as admin

RABBIT_MQ_ADMIN_PWD_
HASH_VALUE

Rabbit MQ Admin Password Hash Value.
BY default yj5MnG4b1HtIeiGaaWTs2kt9Pt+eK1uq0WkFXYf5HGuCn0jQ for default password admin.
In case of any changes to the password, update this value with corresponding HASH Value.

NER_SERVICE_ID

NER Project ID Created in Conversation Designer to integrate with Smart Sense.

You can leave this blank if not used.

 

Deployment Activity (approximately 60 minutes)

./deploy.sh

Upgrading SmartOps Platform from 6.4.3 to version 6.4.3-Hotfix 9

cd ../installer

./replace_anchors.sh config.ini

cd ../stack-repo

docker stack rm kafka logstash monitoring

./stop-start-stacks.sh clones smartops-du

Post-Deployment Activity

NA

Upgrading SmartOps from 6.4.0 to version 6.4.3

TBD

Post Deployment Checks & Validations

Validate Deployment

~ docker stack ps uimux

ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS

c9ebdhm7zcgm uimux_pw_ui.1 smartopsregistry.azurecr.io/smartops/packaged_workflow_ui:6.4.3.286 vm-smartopsengg-qa-app-007 Running Running about an hour ago

pfpzshcrw9wt uimux_smartops_ui_mux.1 smartopsregistry.azurecr.io/smartops-ui-mux:6.4.3.300 vm-smartopsengg-qa-app-006 Running Running about an hour ago

 

~ docker service ls

 

 

 

~ docker service ls | grep 0/1

 

 

Picture 2

Example: contract-mgmnt_cms_doclink_process is down. Then execute following steps to restart it .

The stack name will be ‘contract-mgmnt’ for above service.

 

~ cd ../stack-repo

~ ./stop-start-stacks.sh contract-mgmnt

 

docker stack ps <Stack_Name>

 

Perform Post Deployment Configurations

Note: This step is mandatory to view the components available in the Home Page of application and in menu (nine dots)

Validate Application Access

 

Picture 3

 

Please note that the version is updated as 6.4.3 as in Screenshot

 

Archive Release artifacts (Production or Client Environments)

The deployment artifacts contain sensitive information such as passwords . Hence the deployment folder should be archived to a protected location and removed from the VM after Successful Deployment.

# acrhive the deployment folder

cd ~

sudo tar -pcvzf <package_name>_archive.tar <package_name>

# Move created archive to a secured location

# Remove deployment folder

sudo rm -R <package_name>

>

 

Rollback to Release Version 6.4.2 on Failed upgrade

Steps to restore Release 6.4.2 Database from Back up

# get the stack list by executing below command

docker stack ls

# Use command below to remove stacks

docker stack rm <stack_name>

>

 

ssh <Infra-001 VM>

 

cd backup_6.4.2

# Delete all the Data Volume Mount which got corrupted

sudo rm -R /var/lib/docker/volumes/mysql_mysql-data

sudo rm -R /var/lib/docker/volumes/mongo_mongo-data

sudo rm -R /var/lib/docker/volumes/postgres_postgres-data

sudo rm -R /var/lib/docker/volumes/elasticsearch_monitoringelasticsearch-data .

# Extract the compressed file using below commands

sudo tar -xvf mongo_mongo-data.tar.gz /var/lib/docker/volumes/

sudo tar -xvf mysql_mysql-data.tar.gz /var/lib/docker/volumes/

sudo tar -xvf postgres_postgres-data.tar.gz /var/lib/docker/volumes/

sudo tar -xvf elasticsearch_monitoringelasticsearch-data.tar.gz /var/lib/docker/volumes/

exit

 

 

cd ~backup_6.4.2/<6.4.2_deployment_artifacts_directory_name>/installer/

vi config.ini

#Edit value ‘DEPLOY_OR_UPGRADE = upgrade’

./deploy.sh

 

 

For production and client environments

 

~ cd ~ extracted_folder>/installer/

~ vi config.ini

#Edit value ‘DEPLOY_OR_UPGRADE = upgrade’

~ ./deploy.sh

 

 

URLs for accessing application features

Replace <app-dns-name> with the dns name configured in application gateway.

Eg: smartops.eastus.cloudapp.azure.com

For broker oidc endpoint:

https://<app-dns-name>/keycloak/auth/realms/ustglobal/broker/oidc/endpoint

For accessing SmartOps Application:

https://<app-dns-name> /

For accessing Master Realm for monitoring Apllication:

https://<app-dns-name>/uimux/smartops/master

For Logout URL:

https://<app-dns-name>/keycloak/auth/realms/ustglobal/protocol/openid-connect/logout

For Accessing logs:

 

Get Offline token and update

Picture 28

 

Feedback

Copyright © 2021 UST Global. All Rights Reserved.