Search

Jiffy Upgrade

Articles

Supported Upgrade Versions

The following Jiffy versions can do a direct upgrade to version 4.6.5.

  1. Jiffy Automate 4.6.0
  2. Jiffy Automate 4.6.1
  3. Jiffy Automate 4.6.2
  4. Jiffy Automate 4.6.3
  5. Jiffy Automate 4.6.4

Artifact list

Name Version Type Description
jiffy-playbook.tar.gz 4.6.5 Ansible playbook Ansible scripts which does the upgrade
jiffy-upgrade.tar.gz 4.6.5 Compressed tar Jiffy core artifacts
jiffy-helms-v.4.6.5.zip 4.6.5 Helm charts Helm charts for container deployments

Container List

Name Tag HELM Chart Changes Description
backward-compatibility-engine JARVIS-MAIN-4.6-BackwardCompatibilityEngine4423Feb22 No Container images and Helm charts for kubernetes deployment
bolcategory JARVIS-MAIN-4.6-vendorcategorisation_8723Feb22 No Container images and Helm charts for kubernetes deployment
bolml JARVIS-MAIN-4.6-T4.3.014423Feb22 No Container images and Helm charts for kubernetes deployment
docsplit JARVIS-MAIN-4.6-DocumentSplit_3124Feb22 Yes Container images and Helm charts for kubernetes deployment
functionator JARVIS-MAIN-4.6-194 No Container images and Helm charts for kubernetes deployment
handwritingsegmentation JARVIS-MAIN-4.6-HWSegmentaion_8828Feb22 No Container images and Helm charts for kubernetes deployment
invoicecategory JARVIS-MAIN-4.6-T4.3.014423Feb22 No Container images and Helm charts for kubernetes deployment
invoiceml JARVIS-MAIN-4.6-T4.3.014423Feb22 No Container images and Helm charts for kubernetes deployment
pdf2image JARVIS-MAIN-4.6-Pdf2Image_4523Feb22 No Container images and Helm charts for kubernetes deployment
pdf2json-service JARVIS-MAIN-4.6-Pdf2JsonService_8608Mar22 Yes Container images and Helm charts for kubernetes deployment
pdfsplit JARVIS-MAIN-4.6-Pdfsplit_4823Feb22 No Container images and Helm charts for kubernetes deployment
portfolio JARVIS-MAIN-4.6-Portfolio_23423Feb22 No Container images and Helm charts for kubernetes deployment
template-converter JARVIS-MAIN-4.6-152 Yes Container images and Helm charts for kubernetes deployment
w2ml JARVIS-MAIN-4.6-w2ml_6223Feb22 No Container images and Helm charts for kubernetes deployment
w2split JARVIS-MAIN-4.6-W2Split_8123Feb22 No Container images and Helm charts for kubernetes deployment

Before you start

  1. Ensure SSH connectivity between the core server and DB server. Verify the access with the following steps:
    1. Connect to core server via SSH.
    2. SSH using private key.

      ssh -i {private key} {username}@{IP address or hostname of DB server}

    3. SSH via password and follow the prompt.

      ssh {username}@{IP address or hostname of DB server}

  2. Keep the DB credentials (Postgres, MongoDB ) available.
  3. Ensure MongoDB and Postgres services are up and running.
    1. Verify MongoDB status.
      • Self-hosted:
        Status can be verified by executing the following command; start the service, if not running.
      • ps -ef | grep mongo

    2. Verify PostgreSQL status:
      • Self-hosted:
        Connect to the DB server and execute the following command:

        systemctl status postgresql-12

      • Managed Service (RDS, Cloud SQL, etc.)

        telnet {dburl} {dbport}

  4. For this upgrade, elevated privileges (root or sudo) are required on both core server and DB server, to apply/modify Nginx, td-agent (FluentD) configuration changes (Core server), and to apply/modify Ulimits (MongoDB server ulimit value should be set to 16384).
  5. Kubernetes cluster access from jiffy core server with the necessary privileges to deploy on cluster.
  6. Jiffy application access for the verification after the upgrade.
    • Tenant URL
    • Tenant username
    • Tenant password
  7. BOT Server credentials for smoke test and verification.
  8. Connect to jiffy core server.
  9. Switch to jiffy application user.
  10. Download the artifact files:
    1. Download helm charts.
      1. mkdir -p /tmp/jiffy-install/helm/
      2. cd /tmp/jiffy-install/helm/
      3. wget --user {username} --ask-password downloads.jiffy.ai/4.6.5/Upgrade/jiffy-helms-v4.6.5.zip

    2. Extract the helm charts in jiffy core server.

      unzip jiffy-helms-v4.6.5.zip

    3. Download ansible playbook and upgrade artifact.

      1. cd /tmp/jiffy-install/
      2. wget --user {username} --ask-password downloads.jiffy.ai/4.6.5/Upgrade/jiffy-playbook.tar.gz
      3. wget --user {username} --ask-password downloads.jiffy.ai/4.6.5/Upgrade/jiffy-upgrade.tar.gz

    4. Extract ansible playbook and upgrade artifact.

      1. tar -xf jiffy-playbook.tar.gz
      2. tar -xf jiffy-upgrade.tar.gz -C /tmp/jiffy-install/upgrade/

  11. Fill in the inventory file and variable.yml file as per requirement (use the existing files or parameters from the previous/last installation as reference).
    1. The inventory file will have all the details of the servers, authentication methods, etc.
    2. variable.yml file contains all the parameters such as the username, custom application parameters, mount point, etc.

Prerequisites

  1. Stop Jiffy application.
    1. Log in to the core server shell.
    2. Switch to jiffy application user.
    3. Stop the application.

      application stop all

  2. Back up the Jiffy, GUS, and MongoDB databases.
    1. For Jiffy and GUS postgres backups (Commands will prompt for DB password):

      1. pg_dump -h {DB hostname} -p 5432 {jiffy schema name} -U {username} | gzip > {filename.gz}
      2. pg_dump -h {DB hostname} -p 5432 {gus schema name} -U {username} | gzip > {filename.gz}

    2. For mongoDB backup
      Self Hosted:
      1. Connect to the mongoDB server
      2. Switch to jiffy application user

        mongodump --ssl --host {MongoDB hostname} --port 27017 --sslPEMKeyFile {Keyfile} --sslAllowInvalidCertificates --authenticationDatabase admin -u admin --out {filename.dump}

        Command will prompt for DB admin password.

Upgrade

Core and DB

Connect to jiffy core server as Linux user.

Pre-Upgrade steps

This step will cover code backup, in case to roll back to previously installed version.

  1. Activate the Ansible python virtual environment. Applicable only, if Ansible is installed under python virtual environment.

    source {mountpoint}/jiffy/.envs/ansibleEnv/bin/activate

  2. Start backup process:

    1. cd /tmp/jiffy-install/
    2. ansible-playbook pre-upgrade/root.yml -i inventory -e @variable.yml

    For debug mode

    ansible-playbook pre-upgrade/root.yml -i inventory -e @variable.yml -v

    For detailed debug mode:

    ansible-playbook pre-upgrade/root.yml -i inventory -e @variable.yml -vvvv

  3. Switch to the jiffy application user
  4. Activate the ansible python virtual environment.
    Applicable only, if ansible is installed under python virtual environment

    source {mountpoint}/jiffy/.envs/ansibleEnv/bin/activate

  5. Run the non-root installer : (Sample variable and inventory file below)

    ansible-playbook pre-upgrade/non-root.yml -i inventory -e @variable.yml

    For debug mode:

    ansible-playbook pre-upgrade/non-root.yml -i inventory -e @variable.yml -v

    For detailed debug mode:

    ansible-playbook pre-upgrade/non-root.yml -i inventory -e @variable.yml -vvvv

Core Upgrade

  1. Switch to root/sudo user in the jiffy core server.
  2. Activate the ansible python virtual environment.
    Applicable only, if ansible is installed under python virtual environment.

    source {mountpoint}/jiffy/.envs/ansibleEnv/bin/activate

  3. Execute the playbook to begin the upgrade.

    ansible-playbook upgrade/root.yml -i inventory -l core -e @variable.yml

    For debug mode:

    ansible-playbook upgrade/root.yml -i inventory -l core -e @variable.yml -v

    For detailed debug mode:

    ansible-playbook upgrade/root.yml -i inventory -l core -e @variable.yml -vvvv

    For sudo and ssh password prompt add -kK options along with run command:

    ansible-playbook upgrade/root.yml -i inventory -l core -e @variable.yml -kK

  4. Change ownership of /tmp/jiffy-install to jiffy application user.

    chown -R {jiffyapp linux user}:{jiffyapp linux user} /tmp/{jiffy-install}

  5. Switch to the jiffy application user.
  6. Activate the ansible python virtual environment.
    Applicable only, if ansible is installed under python virtual environment.

    source {mountpoint}/jiffy/.envs/ansibleEnv/bin/activate

  7. Run the non-root installer : (Sample variable and inventory file below)

    ansible-playbook upgrade/non-root.yml -i inventory -l core -e @variable.yml

    For debug mode:

    ansible-playbook upgrade/non-root.yml -i inventory -l core -e @variable.yml -v

    For detailed debug mode:

    ansible-playbook upgrade/non-root.yml -i inventory -l core -e @variable.yml -vvvv

  8. Execute the below ansible command to update application configuration changes.
    with masterkey prompt:

    ansible-playbook jiffyconfiguration.yml -l core -e @variable.yml

    without masterkey prompt:

    ansible-playbook jiffyconfiguration.yml -l core -e masterKey='{replaceme}' -e @variable.yml

DB Upgrade

During this upgrade, ulimits value is modified on the DB server.

  1. Execute the playbook as root/sudo user to begin the upgrade.

    ansible-playbook upgrade/root.yml -i inventory -l db -e @variable.yml

    For debug mode:

    ansible-playbook upgrade/root.yml -i inventory -l db -e @variable.yml -v

    For detailed debug mode:

    ansible-playbook upgrade/root.yml -i inventory -l db -e @variable.yml -vvvv

Kubernetes Upgrade

  1. Connect to Core server.
  2. Execute the following commands.

    1. cd /tmp/jiffy-install/helm
    2. chmod 777 k8s-upgrade.sh

  3. Switch to jiffy application user.
  4. Execute the script for Kubernetes upgrade. Default values for the Kubernetes upgrade script.

    • namespace(n)=jiffy-cognitive
    • replicacount(r)=1
    • mountpoint(m)=/opt

  5. Please uninstall the existing docplit container from the cluster.

    helm uninstall docplit -n {namespace}

    ./k8s-upgrade.sh -n {namespace} -c {clusterDNS|mandatory} -r {replicacount} -m {mountpoint}

Post upgrade

Restart Nginx:

Nginx on core server has to be restarted by user with elevated privileges.

  • /opt/nginx/sbin/nginx -s stop
  • /opt/nginx/sbin/nginx

Verify Connectors:

Post upgrade, ensure $JIFFY_HOME/deploy/jiffy/src/connectors/ folder has only the below mentioned files.

  • functions_metadata.json
  • constants.py

Drill HEAP and MAX Memory

As jiffy application user, execute the below commands to modify/apply DRILL_MEMORY parameters.

  • #!/bin/bash
  • sed -i 's/^#export DRILL_HEAP=${DRILL_HEAP:-"4G"}/export DRILL_HEAP=${DRILL_HEAP:-"8G"}/g' $DOCUBE_HOME/apache-drill-1.17.0/conf/drill-env.sh
  • sed -i 's/#export DRILL_MAX_DIRECT_MEMORY=${DRILL_MAX_DIRECT_MEMORY:-"8G"}/export DRILL_MAX_DIRECT_MEMORY=${DRILL_MAX_DIRECT_MEMORY:-"16G"}/g' $DOCUBE_HOME/apache-drill-1.17.0/conf/drill-env.sh

Verify the DRILL_MAX_HEAP_MEMORY on the drill configuration file.

cat $DOCUBE_HOME/apache-drill-1.17.0/conf/drill-env.sh

Testing

Verification:

  • Connect to core server.
  • Switch to jiffy application user.
  1. Verify jiffy version by running the following command in the core server. Version should be 4.6.5

    cat $JIFFY_HOME/productversion.txt

  2. Verify jiffy client version by running the following command in the core server. Version should be 4.6.1.47

    cat $JIFFY_HOME/data/client/setup/version.txt

  3. Verify configuration in the application properties file.
    1. anthill.properties ($JIFFY_HOME/properties/)
    2. mangrove.properties ($JIFFY_HOME/properties/)
    3. coral.properties ($JIFFY_HOME/properties/)
    4. application.properties ($GUS_HOME/)
    5. app.properties ($JIFFY_HOME/)
  4. Check uptime and status of jiffy core application processes

    supervisorctl status

  5. Check pod status

    kubectl get pods -n {namespace}

  6. Check Vault status

    vault status

Smoke Test

  1. Connect to Bot Machine.
    1. Right-click on the Bot Manager bottom right and Press Check for updates.
    2. Upgrade bot machine by clicking check for updates.
  2. Connect to jiffy application URL.
  3. Log in to tenant.
    1. Run the below tasks (if available):
      1. Doc node
      2. Web node
      3. Excel node
      4. Add new secrets to vault and verify vault status
      5. Add dataset3
Did you find what you were looking for?