Search

Server Upgrade from 4.1 to 4.2

Articles

Prerequisites

  1. FQDN available for Core, DB, and Cognitive servers.
  2. Internet/Repo access for DB & Core servers.
  3. SSL:
    1. Web certificate bundle.
    2. DB Certificates Bundle(CA, Certificate, Keys), Jiffy Core Instance IP.
    3. Previously, generated localhost certificate bundle for rabbitmq and vault.
  4. Database backup of jiffydb, gus, and mongodb.
  5. VM backup of DB instance and Jiffy core instance.
  6. Download Core upgrade tar to /tmp on Core server from here.
  7. Download DB upgrade tar to /tmp on DB server from here.
  8. Download Cognitive package to <sharedpath> on Cognitive server from here.

    Contact support@jiffy.ai for the login credentials.

  9. Stop jiffy application and postgresql database server.
    1. Execute the following command in Jiffy Core, as <jiffyapplication> user.

      application stop all

    2. Execute the following command in Jiffy DB as Root user.

      service postgresql-9.6 stop


DB Server Upgrade

REFERENCE_URL: https://imagineer.in/blog/postgresql-major-version-upgrade/

  1. As root user, add the following Repo package:
    1. For RHEL7 Server:
      1. Download the rpm file from here.
      2. Execute the following command.

        yum install centos-release-scl-rh-2-3.el7.centos.noarch.rpm -y

    2. For Centos7 Server:
      1. Download the rpm file from here.
      2. Execute the following command.

        yum install centos-release-scl-2-3.el7.centos.noarch.rpm -y

  2. Execute the following commands:

    • cd /tmp
    • tar -xvf database_upgrade9.6_12.4.tar.gz
    • rm /tmp/dbinstalltstamp
    • rm /tmp/database_install_resume
    • rm /tmp/jiffydbuserinput
    • chmod u+x database_upgrade_root.sh
    • ./database_upgrade_root.sh

  3. Follow the installation prompts.

    Image description

Core Server Upgrade

  1. Execute the following commands as a root user:

    • cd /tmp
    • rm /tmp/jiffy_install_resume
    • rm /tmp/jiffyinstalltstamp
    • tar -xvf jiffy_upgrade4.0_4.2.tar.gz
    • chmod +x jiffy_upgrade_root.sh
    • ./jiffy_upgrade_root.sh

  2. Follow the installation prompts. Image description
  3. Execute the following commands in Jiffy Core, as <jiffyapplication> user.

    • cd /tmp
    • application stop all
    • chmod +x jiffy_upgrade_nonroot.sh
    • ./jiffy_upgrade_nonroot.sh

Cognitive Server Upgrade

Execute the following commands as a root user:

  1. Stop the running containers, if any:

    • sudo docker container stop invoiceml categoryml ml-nginx
    • sudo docker container rm -f invoiceml categoryml ml-nginx

  2. Delete previously downloaded tar file <invoiceml_**.tar> from the shared mountpoint including invoiceml.tar, categoryml.tar, and ml-nginx.tar.
  3. Delete the folder invoicecode.

    rm -rf <cognitivesharedpath>/invoicecode

  4. Remove all existing dockers and images related to invoice and bol:

    • sudo docker rmi -f invoiceml ml-nginx categoryml
    • cd <cognitive shared path>
    • tar -xvf ml.tar
    • tar -xvf HWSegmentaion_1708Jan21.tar
    • tar -xvf T4.3.01208Jan21.tar

    This creates invoiceml.tar, ml-nginx.tar, bolml.tar, invoicecategory.tar, hwsegmentation.tar, start_docker_with_nginx.sh and three folders invoicecode,jiffy_ml_debugger and config.
  5. Create a new folder named output_folder in the same location.

    mkdir -p output_folder.

  6. Modify permissions of the following dir.’s:

    • sudo chmod 777 </path/to/the/documentdata/>
    • sudo chmod 777 </path/to/the/output_folder/>

  7. Modify jfs tenant host details in tenant_config.json file under config folder.

    vi config/tenant_config.json

  8. Execute the following commands:

    • sudo docker load –input invoiceml.tar
    • sudo docker load –input invoicecategory.tar
    • sudo docker load –input bolml.tar
    • sudo docker load –input ml-nginx.tar
    • sudo docker load –input hwsegmentation.tar

  9. Move the folder jiffy_ml_debugger to documentdata folder. Replace the folder if already exists in documentdata.

    • mv jiffy_ml_debugger documentdata/
    • chmod u+x start_docker_with_nginx.sh
    • ./start_docker_with_nginx.sh $(pwd)/invoicecode/
    • $(pwd)/documentdata/ $(pwd)/ssl_certificates/
    • $(pwd)/output_folder/ $(pwd)/config 8567

  10. Check running docker container status.

    sudo docker ps

  11. Check ML version.

    curl -L -k https://127.0.0.1:8765/api/invoice/ml/version/

Did you find what you were looking for?