Upgrade from v9.2.11 to v9.2.12
The guide describes the steps to apply the 9.2.12 patch to SPA v9.2.11.
Prerequisites
To apply the patch, meet the following prerequisites:
- You have WorkFusion SPA 9.2.11 installed.
- Perform all actions for applying the 9.2.12 patch as
<WF_USER>. The root user is not required. - You have set the values of all variables in the
/patches/patch_9.2.12/varsfile according to the relevant path.
Upgrade procedure
Prepare all nodes for patching
On each Linux server, create the
<install_dir>/patches/patch_9.2.12directory, download the patch, and extract it into the directory:$ mkdir -pv <install_dir>/patches/patch_9.2.12 $ cd <install_dir>/patches/patch_9.2.12 $ curl -o 'patch_9.2.12.tar.gz' '<patch download url>' $ tar xzf patch_9.2.12.tar.gzYou will see the following directory structure:
-rwxrwxr-x. 1 wfuser wfuser 18453 Feb 9 07:16 patch_9.2.12.sh -rw-rw-r--. 1 wfuser wfuser 3502219630 Feb 9 08:49 patch_9.2.12.tar.gz drwxrwxr-x. 16 wfuser wfuser 226 Feb 7 10:12 sources -rw-rw-r--. 1 wfuser wfuser 171 Feb 9 07:01 varsThe patch includes the updates for MinIO, and a new domain name is used for the MinIO UI. Create a new domain for the MinIO UI with an alias to the domain name of the APP server. Also, check that the ports for MinIO and the MinIO UI are open and allowed in your firewall. Typically, the ports are 9000 and 9001.
On the DB server, in the
<install_dir>/patches/patch_9.2.12/varsfile, fill in the credentials for the MySQL and Nexus servers and the port for the Nexus server:export INSTALL_DIR='put install_dir path' export MINIO_LB_HOSTNAME='put minio s3 lb hosname' export MINIO_UI_LB_HOSTNAME='put minio s3 UI lb hostname' export MINIO_API_PORT='put minio API port' export MINIO_UI_PORT='put minio UI port' export MINIO_ACCESS_KEY='put minio access key' export MINIO_SECRET_KEY='put minio secret key' export DB_SERVER_HOSTNAME='put DB server hostname' export POSTGRESQL_ADMIN_USER='put postgresql admin user' export MONGODB_DB_PORT='put mongodb DB port' export MONGODB_APM_PORT='put mongodb APM port' export MYSQL_ADMIN='put mysql admin user' export MYSQL_PASS='put mysql admin password'On the DB server, verify the correctness of the specified credentials:
$ source <install_dir>/patches/patch_9.2.12/vars $ <install_dir>/mysql/usr/bin/mysqlcheck -h 127.0.0.1 -P 3306 -u$MYSQL_ADMIN -p$MYSQL_PASS --check-upgrade --all-databasesYou will see a similar output:
mysql.columns_priv OK mysql.db OK ........ (lots of similar output) ..... wfdb.worker_interest OK wfdb.workeractivitylog_test OKOn the DB server, connect to the PostgreSQL server and give the superuser permissions to the analytics user:
$ <install_dir>/postgres/bin/psql -h 127.0.0.1 -p 5432 -U $POSTGRESQL_ADMIN_USER -d postgres ALTER USER analytics WITH SUPERUSER;On each Linux server, stop all WorkFusion services:
$ wfmanager stop allOn the DB and APM servers, back up the MongoDB data directory, preferably on another server.
db : <install_dir>/mongodb_db/data apm: <install_dir>/mongodb_apm/data
Upgrade DB server
To upgrade the DB on the DB server, execute the following command:
$ cd <install_dir>/patches/patch_9.2.12
$ source vars
$ ./patch_9.2.12.sh upgrade_db
You will see the following output:
Wed Feb 9 09:08:25 UTC 2022 Upgrading components on DB server
Wed Feb 9 09:08:25 UTC 2022 Backing up nginx binaries...
mkdir: created directory ‘backup/nginx_1_12_2’
Wed Feb 9 09:08:28 UTC 2022 Extracting nginx binary
Wed Feb 9 09:08:31 UTC 2022 Nginx update completed
Wed Feb 9 09:08:32 UTC 2022 Backing up java binaries...
mkdir: created directory ‘backup/java_8u144’
--- similar output ---
Wed Oct 28 10:05:46 UTC 2020 Mysql update completed. Check for any errors in output
Wed Oct 28 10:05:47 UTC 2020 DB server patching completed
Inspect the output of the MySQL status for any errors or not-ok statuses. It must return OK for each test, as in the example earlier. If the check is successful, execute the following commands to update the database schema:
$ wfmanager start mysql
$ # wait till mysql has started
$ cd <install_dir>
$ mysql/usr/bin/mysql_upgrade -h 127.0.0.1 -P 3306 -u$MYSQL_ADMIN -p$MYSQL_PASS
Upgrade VDS Master server
warning
Upgrade the DB server before VDS Master.
To upgrade VDS Master, on the vdsmaster server, execute the following command:
$ cd <install_dir>/patches/patch_9.2.12
$ source vars
$ ./patch_9.2.12.sh upgrade_vdsmaster
You will see the following output:
Wed Feb 9 09:26:36 UTC 2022 Upgrading components on VDS master
Wed Feb 9 09:26:36 UTC 2022 Backing up java binaries...
mkdir: created directory ‘backup/java_8u311’
Wed Feb 9 09:26:36 UTC 2022 Extracting java binary
Wed Feb 9 09:26:39 UTC 2022 Java update completed
Wed Feb 9 09:26:39 UTC 2022 Backing up rabbitmq binaries...
--- similar output ---
Wed Feb 9 09:27:39 UTC 2022 VDS master upgrade completed"
Upgrade VDS Slave server
To upgrade VDS Master, on the vdsmaster server, execute the following command:
$ cd <install_dir>/patches/patch_9.2.12
$ source vars
$ ./patch_9.2.12.sh upgrade_vdsslave
You will see the following output:
Mon Jun 7 13:48:14 UTC 2021 Upgrading components on VDS slave
Mon Jun 7 13:48:14 UTC 2021 Backing up java binaries...
--- similar output ---
Mon Jun 7 13:48:37 UTC 2021 VDS slave upgrade completed
Upgrade APM server
To upgrade APM, on the APM server, execute the following command:
$ cd <install_dir>/patches/patch_9.2.12
$ source vars
$ ./patch_9.2.12.sh upgrade_apm
You will see the following output:
Mon Jun 7 13:50:41 UTC 2021 Upgrading components on APM server
--- similar output ---
Mon Jun 7 13:48:37 UTC 2021 APM sever upgrade completed
Upgrade OCR server
To update OCR, on the OCR server, execute the following command:
$ cd <install_dir>/patches/patch_9.2.12
$ source vars
$ ./patch_9.2.12.sh upgrade_ocr
You will see the following output:
Mon Jun 7 13:48:14 UTC 2021 Upgrading components on OCR server
--- similar output ---
Mon Jun 7 13:48:37 UTC 2021 OCR server upgrade completed
Upgrade APP server
To upgrade APP, on the APP server, execute the following command:
$ cd <install_dir>/patches/patch_9.2.12
$ source vars
$ ./patch_9.2.12.sh upgrade_ct
You will see the following output:
Mon Jun 7 13:48:14 UTC 2021 Upgrading components on APP server
--- similar output ---
Mon Jun 7 13:48:37 UTC 2021 APP server upgrade completed
Prepare Nginx on all Linux servers
On all Linux servers, except VDSslave, run the following command as a user with root permissions to allow Nginx to listen to port 443:
$ sudo /usr/sbin/setcap CAP_NET_BIND_SERVICE=+eip <install dir>/nginx/bin/nginx
Start WorkFusion services on all Linux servers
On all Linux servers, DB > VDSmaster > APP > OCR > APM > VDSslave, run the following command as <WF_USER>.
$ wfmanager start all
Revoke superuser permissions
On the DB server, connect to the PostgreSQL server and revoke the superuser permissions for the analytics user:
$ <install_dir>/postgres/bin/psql -h 127.0.0.1 -p 5432 -U <postgre_admin user> -d postgres
ALTER USER analytics WITH NOSUPERUSER;
Post-upgrade steps
After the upgrade, on the APP server, check a Business Process as <WF_USER>:
$ cd /tmp/workfusion-full-package-9.2.2.0-35/
$ ./install.sh check_raw app -e @/tmp/config_overrides.yml -e test_rpa=true -e test_ocr=true -e test_ml=true