Upgrade from v9.2.x to v9.3.x
Overview
The guide describes steps for in-place SPA upgrade from 9.2.x to 9.3.x.
Prerequisites
- You have WorkFusion SPA 9.2.x installed.
- You have downloaded Workfusion SPA 9.3.x package
workfusion-full-package-[version].tar.gzto DB, APP, AutoML Master, AutoML Agent(s), OCR, and APM servers (assume that the package is in/tmp/workfusion-full-package-[version].tar.gz) - All actions for upgrade from 9.2.x to 9.3.x will be performed under
<WF_USER>. Root user is not needed.
Preparation
Unarchive 9.3.x installer on all servers
Adjust the INSTALL_DIR variable according to your environment and run as <WF_USER> on all linux servers (DB, APP, OCR, APM, AutoML Master, AutoML Agent(s)).
export INSTALL_DIR=/opt/workfusion ## the value of "install_dir" setting from config.yml used in 9.2.x installation
mkdir $INSTALL_DIR/wf_installer_930
tar -xzvf /tmp/workfusion/workfusion-full-package-[version].tar.gz --strip 1 -C $INSTALL_DIR/wf_installer_930
Prepare certificates and configs for 9.3.x installation
Copy certificates and configs used originally during 9.2.x installation to 9.3.x package directory on DB server. They can be found on DB server (they exist on DB server only) in the
<INSTALL_DIR>/distr/latest/directory. Run as<WF_USER>on DB server.cd $INSTALL_DIR/wf_installer_930 cp -r $INSTALL_DIR/distr/latest/certificates . cp $INSTALL_DIR/distr/latest/config_overrides.yml ./config_overrides.yml cp $INSTALL_DIR/distr/latest/secrets_overrides.yml ./secrets_overrides.ymlCopy the same certificates and configs from DB server to APP, OCR, APM, AutoML Master, AutoML Agent(s) servers to the same location.
The example below describes how to transfer required files using Python (the simplest way without any prerequisites, assuming there is network availability between DB server and other Linux servers of the environment).
- Create the
wf_configs.tar.gzarchive of configs and certificates on DB server and make it temporarily available for download over HTTP over port 9999 (you can choose any free port).
cd $INSTALL_DIR/wf_installer_930 tar czvf wf_configs.tar.gz certificates config_overrides.yml secrets_overrides.yml ## This will make all content of $INSTALL_DIR/wf_installer_930 directory on DB server downloadable over HTTP over 9999 port (you can choose any free port): python -m SimpleHTTPServer 9999- Log in to other Linux servers of the environment over SSH, download the
wf_configs.tar.gzarchive from DB server, and extract it. Run as<WF_USER>on APP, OCR, APM, AutoML Master, AutoML Agent(s) servers.
export DB_HOSTNAME=db.example.com ## the value of "db_hostname" setting from config.yml used in 9.2.x installation cd $INSTALL_DIR/wf_installer_930 wget http://$DB_HOSTNAME:9999/wf_configs.tar.gz -O wf_configs.tar.gz tar xzvf wf_configs.tar.gz -C /opt/workfusion/wf_installer_930- Press Ctrl + C on DB server to stop file sharing over Python HTTP server.
- Create the
Get decryption password for secrets_overrides.yml file
The file secrets_overrides.yml which we just transferred is encrypted with the ansible vault. The file contains sensitive settings used originally during 9.2.x installation.
We need to tell 9.3.x installer how to decrypt this file during
installation and read the settings. The decryption password is stored
securely in Hashicorp Vault service on DB server. Run as <WF_USER> on
DB server to get the password.
cd $INSTALL_DIR/wf-sec-storage
./loader.sh ansible review | grep ansible_vault_password
## The output should be similar to this:
[INFO ] ansible_vault_password : JHYltHft1AnlwPg
Copy the decryption password (in the example above, it is JHYltHft1AnlwPg) somewhere, or remember it. You will be asked for this password later on each server, right after running the installation command.
The decryption password will be changed to a new value automatically after upgrade to 9.3.x. Thus, if you need to upgrade from 9.3.x to 9.4, you'll have to get a new decryption password using the same way.
Stop services on all servers
Run as <WF_USER> on APP, OCR, APM, AutoML Master, AutoML Agent(s), and DB servers (DB server should be the last server).
wfmanager stop all
Prepare license file on APP server
The license file should be present in the $INSTALL_DIR/wf_installer_930/ directory on APP server. Run under <WF_USER> on APP server.
cd $INSTALL_DIR/wf_installer_930
cp $INSTALL_DIR/workfusion/conf/license.properties .
Upgrade steps
Run as <WF_USER> on DB, APP, OCR, APM, AutoML Master, AutoML Agent(s) servers (DB server should be upgraded first).
## on all servers
cd $INSTALL_DIR/wf_installer_930
## on DB server
./install.sh install db -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
./install.sh check db -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
## on APP server
./install.sh install app -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
./install.sh check app -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
## on OCR server
./install.sh install ocr -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
./install.sh check ocr -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
## on APM server
./install.sh install apm -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
./install.sh check apm -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
## on AutoML Master server
./install.sh install vds-master -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
./install.sh check vds-master -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
## on AutoML Agent(s) server(s)
./install.sh install vds-slave -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
./install.sh check vds-slave -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
After running each command, you'll be asked to enter the Vault password. The prompt looks like this:
./install.sh install db -e @config_overrides.yml -e @secrets_overrides.yml -e passwords_check=false --ask-vault-pass
=> Running 'flat:precheck' tasks
Vault password:
At this point, you should paste (Ctrl + V) the password you saved on step 3.
- When you run the
./install.sh install...command, the Vault password will be asked twice: the first time, right after you press Enter, and the second time in about 20 seconds. You should paste it again. - When you run the
./install.sh check...command, the Vault password will be asked just once.
If you have RPA installed, the following steps need to be performed:
Stop the rpa-manager service on APP server under
<WF_USER>:wfmanager stop rpa-managerRun the command bellow on DB server under
<WF_USER>. Changerpa_manager_db_userandrpa_manager_db_passvariables to appropriate data from yoursecrets.ymlfile):cd $INSTALL_DIR/mongodb_db/bin/mongo selenograph -u 'rpa_manager_db_user' -p 'rpa_manager_db_pass' --host localhost:27016 --eval "db.getCollectionNames().forEach(function(collection_name){print(collection_name); db.getCollection(collection_name.toString()).drop()})An example of outcome:
MongoDB shell version: 3.2.4 connecting to: localhost:27016/selenograph HubBrowserState_lock HubBrowserState_repo _quartz__lock _quartz__repo available_nodes frontend hubSummary_lock hubSummary_repo hubs_lock hubs_repo nodes-metrics nodes_locks nodes_status quotaSessions_lock quotaSessions_repo quotaStats_lock quotaStats_repo quotaSummary_lock quotaSummary_repoStart the rpa-manager service on APP server under:
wfmanager start rpa-manager
Post-upgrade steps
You can review difference between old configuration files and new in changes log: /distr/latest/diff_changes_.log
Follow the steps from Post installation to make sure the environment works properly.