Search

Jiffy Installation

Articles

The Jiffy Automate 4.9.X server versions can do a direct upgrade to version 4.10.

Artifact list

Name Version Type Description
jiffy-playbook.tar.gz 4.10 Ansible playbook Ansible scripts which does the upgrade
jiffy-upgrade.tar.gz 4.10 Compressed tar Jiffy core artifacts
jiffy-helms-v4.10.zip 4.10 Compressed zip Helm charts

Containers List

Container Tags (4.10)
backward-comp JARVIS-MAIN-BackwardCompatibilityEngine7825Jan23
bolcategory JARVIS-MAIN-vendorcategorisation_14925Jan23
bolml JARVIS-MAIN-T4.3.021125Jan23
docsplit JARVIS-MAIN-DocumentSplit_9225Jan23
functionator JARVIS-MAIN-446
handwritingsegmentation JARVIS-MAIN-HWSegmentation_15925Jan23
invoicecategory JARVIS-MAIN-T4.3.021125Jan23
invoiceml JARVIS-MAIN-T4.3.021125Jan23
pdf2image JARVIS-MAIN-Pdf2Image_9725Jan23
pdf2json-service JARVIS-MAIN-Pdf2JsonService_15719Jan23
pdfsplit JARVIS-MAIN-Pdfsplit_8525Jan23
portfolio JARVIS-MAIN-Portfolio_38825Jan23
template-converter JARVIS-MAIN-251
w2ml JARVIS-MAIN-w2ml_10825Jan23
w2split JARVIS-MAIN-W2Split_12725Jan23
lineitemmatch JARVIS-MAIN-LineItemMatch_8725Jan23

No changes are made to the helm charts after release 4.6.

Ports and Processes

Component Port Process Source Destination
Email Server (TCP Ports) 25 SMTP Server Core Application Server
Email Server 993 IMAP/IMAPS Core Application Server
Jiffy Web 443 Nginx Any windows machine where the
user accesses Jiffy application
Core Application Server
JPipe gRPC 443 Nginx All the windows client machines
where BOT is installed
Core Application Server
RabbitMQ Viewer 15672 RabbitMQ Any windows machine
where the user accesses RabbitMQ web page
Core Application Server
MongoDB 27017 MongoDB Core Application Server Database Server
Postgres 5432 Postgres Core Application Server Database Server
Kubernetes Server 443 Nginx Ingress Core Application Server Kubernetes Server
LDAP Server 389 LDAP Core application server LDAP Server

Third Party Packages Installed/Upgraded

Software Existing Version Latest Version
Vault 1.8.5 1.10.0
Drill 1.17 1.17.0
Nginx 1.17.8 1.20.2
libedit-devel NA 3.0-12.20121213
Python 3.7.9 3.10.3
ZooKeeper 3.4.8 3.7.0
RabbitMQ 3.8.2 3.9.14-1
Mongo 4.0.19-1 4.2.19
.Net Framework 4.7.2 4.8 +
llvm5.0-devel NA 5.0.1-7
llvm-toolset-7-clang NA 5.0.1-4
Redis 6.0.5 6.2.6
Postgres - DB server version 12.4 14.2
erlang 22.3.4.6-1 23.3.4.11-1
libicu NA 50.2-4

Yum Packages List

Click here to view the detailed list of Yum packages and their respective versions.

Upgrade Prerequisites

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

      1. application stop all
      2. application stop vault

  2. Backup the Postgresql, 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
      1. Self Hosted
        1. Connect to the MongoDB server.
        2. Switch to the jiffy application user.
        3. Use the following command to prompt the DB admin password.

          mongodump –ssl –host {MongoDB hostname} –port 27017 –sslPEMKeyFile {Keyfile the certificate is a combination of ca+cert} –sslAllowInvalidCertificates –authenticationDatabase admin -u admin –out {filename.dump}


Pre-Upgrade Steps

  1. Connect to the core server.
  2. Switch to the jiffy application user.
  3. Download the artifact files:
    1. Download helm charts

      1. export JIFFY_INSTALL=“/tmp/jiffy-install/4.10/”
      2. mkdir -p $JIFFY_INSTALL/helm/
      3. cd $JIFFY_INSTALL/helm/
      4. wget –user {username} –ask-password downloads.jiffy.ai/4.10/Upgrade/jiffy-helms-v4.10.zip

    2. Extract the helm charts in jiffy core server

      unzip jiffy-helms-v4.10.zip

    3. Download ansible-playbook and upgrade artifact.

      1. cd $JIFFY_INSTALL
      2. wget –user {username} –ask-password downloads.jiffy.ai/4.10/Upgrade/jiffy-playbook.tar.gz
      3. wget –user {username} –ask-password downloads.jiffy.ai/4.10/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 $JIFFY_INSTALL/upgrade/
  4. 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.

Backup

Optional for saas environments.

This step will cover code backup, in case of rollback to a previously installed version.

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

    source /opt/jiffy3rdparty/ansibleEnv/bin/activate

  3. Start backup process

    1. export JIFFY_INSTALL=“/tmp/jiffy-install/4.10/”
    2. cd $JIFFY_INSTALL
    3. 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

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

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

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

    source /opt/jiffy3rdparty/ansibleEnv/bin/activate

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

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

    For debug mode:
    1. ansible-playbook pre-upgrade/non-root.yml -i inventory -e @variable.yml -v

      For detailed debug mode:
    2. ansible-playbook pre-upgrade/non-root.yml -i inventory -e @variable.yml -vvvv


Upgrade Procedure

  1. Switch to the jiffy application user
  2. Activate the ansible python virtual environment Applicable only, if Ansible is installed under python virtual environment

    source /opt/jiffy3rdparty/ansibleEnv/bin/activate

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

    1. export JIFFY_INSTALL=“/tmp/jiffy-install/4.10/”
    2. cd $JIFFY_INSTALL
    3. ansible-playbook pre-req-mail.yml -l core -e @variable.yml

    For debug mode:

    ansible-playbook pre-req-mail.yml -l core -e @variable.yml -v

    For detailed debug mode:

    ansible-playbook pre-req-mail.yml -l core -e @variable.yml -vvvv


Core Upgrade

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

    source /opt/jiffy3rdparty/ansibleEnv/bin/activate

  3. Execute the playbook to begin the upgrade.

    1. export JIFFY_INSTALL=“/tmp/jiffy-install/4.10/”
    2. cd $JIFFY_INSTALL
    3. 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

  4. 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

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

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

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

    source /opt/jiffy3rdparty/ansibleEnv/bin/activate

    The Crotab of Jiffy application user is updated on each upgrade and therefore all custom cron jobs must be scheduled outside of the Jiffy application user’s crontab file.

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

    1. export JIFFY_INSTALL=“/tmp/jiffy-install/4.10/”
    2. cd $JIFFY_INSTALL
    3. 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

  9. 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

Kubernetes Upgrade

  1. Connect to the Core server
    1. Execute the below commands:


      export JIFFY_INSTALL=“/tmp/jiffy-install/4.10/”
      cd $JIFFY_INSTALL/helm/
      chmod 777 k8s-upgrade.sh
      For upgrading opendistro elastic search and kibana
      Update opendistro-es/values.yml with hostname values
      Line no 94 and 436
      helm upgrade –install opendistro opendistro-es -n jiffy-cognitive
      Skip the below section if you have done already as part of 4.8.6 upgrade.
      kubectl create namespace logging
      Check the Services
      kubectl get svc
      Based on the requirement, we can modify the values.yaml file.
      Depend on the environment may changes in namespace, elasticsearch endpoint and credentials.
      Update fluent-bit/values.yml with application namespace value
      Line no 15 and line no 18
      helm install -n logging fluent-bit fluent-bit -f fluent-bit/values-fluentbit.yaml

  2. Switch to the jiffy application user
  3. Execute the script for the Kubernetes upgrade.

    Default values for the ks8-upgrade script.

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

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

Drill HEAP and MAX Memory

  1. As the 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/drill/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/drill/conf/drill-env.sh
    application stop all
    application start all

  2. Verify the DRILL_MAX_HEAP_MEMORY on the drill configuration file.

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

Testing & Verification

Verification
  1. Connect to the core server
  2. Switch to the jiffy application user
    1. Verify the jiffy version by running the following command in the core server. Version should be {4.10}

      cat $JIFFY_HOME/productversion.txt

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

      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. Upgrade Installation
    1. Connect to Bot Machine
    2. Right-click on the Bot Manager bottom right and Press Check for updates
    3. Upgrade bot machine by clicking check for updates
  2. Connect to jiffy application URL
  3. Login to tenant
    1. Run the below tasks (if available)
      1. Doc node
      2. Web node
      3. Excel node
      4. Add new secrets to the vault and verify vault status
      5. Add dataset

Roll-Back

  1. Switch to the jiffy application user

application stop all

Database Restore

  1. Restore gus,jiffy Postgres schemas from backup
  2. Restore mongo dB from backup

Code Restore

  1. Code backup is stored in $JIFFY_HOME/uploads/backup folder. There will be backup folders for each component.
    1. Anthill
    2. Mangrove
    3. Coral
    4. Zeus
    5. jiffy-web
    6. fileserver
    7. gusbe
    8. gusfe
    9. data-client-engine
    10. connectors
    11. docube-web
    12. jiffy-commons
    13. Sentry
  2. Restore these backup folders to the original location.
  3. Restore properties from backup folder
  4. Start application

    application start all

Did you find what you were looking for?