Search

Jiffy Core Server Installation

Articles

This section contains information on how to install and run Jiffy Core server on a Linux environment.

Pre-requisites

  1. Refer to the Infrastructure requirements of JIFFY.ai Core server for all software and hardware pre-requisites.
  2. Jiffy database installation is completed and connectivity verified.
  3. Cognitive server installation is completed and connectivity verified.
  4. Installation files downloaded to /tmp in the core server.
  5. Certificates for Core, DB and cognitive servers available in the core server. This should be trusted by the JVM in the Java trust store in the core server.

Core Server Installation Steps

Root Installer

Log in to Jiffy core linux shell as a root user via SSH (Secure Shell) and run the commands provided in the Pre-requisites Setup and Permission Setup sections respectively.

Pre-Requisites Setup

  1. Run the following commands:

    • cd /tmp
    • tar -xf jiffy-installer.tar.gz
    • chmod u+x jiffy_prerequisites.sh
    • chmod u+x jiffyserver_nonroot.sh
    • chmod u+x generate_cert.sh
    • ./generate_cert.sh
    • ./jiffy_prerequisites.sh

  2. This will generate a local CA and a localhost certificate will be generated in this path with this certifying authority. FluentD, Sentry, Vault, RabbitMQ AMQPS server and Redis will use this certificate for internal SSL communication.

    The web facing certificates have to be provided separately by the customer.

  3. Follow on-screen instructions to proceed.

    The value provided in brackets for each user input will be considered as the default input on pressing Enter key.

    Image description

  4. Installation location: If the user wants to install in a different location, provide the appropriate input such as /home, /jiffy etc.

  5. Linux username for jiffy application: If the user wants to create or use a different user, provide the required username.

  6. Linux group name: If the user wants to create and assign a different group, provide that group name.

  7. Home directory for the user: If the user wants to assign a different home directory to the linux user created above, specify the appropriate directory.

  8. Do you want to re-enter the values?: If the user wants to re-enter, please input **y **.

  9. Do you want to continue?: This step will check for the recommended disk space and prompt for confirmation to proceed. If the user wants to proceed with a lower disk size, press the Enter key or y. If the user is creating a new linux user, it will prompt for password input. If the user is going to use an existing user, it will not prompt for the password input.

  10. Do you want to append hostname with loopback address into hosts file?: By default, if the Enter key is pressed, it will take it as yes. If the user do not want to append that line into hosts** file, please type n.

    Package installation will proceed, wait for a while

  11. Prompt for the rabbitmq username and password: Please type the username and password for the rabbitmq’s web console user. The password should confirm to the standard password policy guidelines. Image description Server domain name for Grafana login should be provided as input next: Image description Certificate paths to be provided here for nginx and rabbitmq web interfaces and for the secure internal communication. (The generate_cert.sh step has created this certificate already) Image description A successful installation for the root prerequisite will end with the following screenshot: Image description

Permission Setup

Run the following commands to modify the file ownership.

  • cd /tmp
  • chown -R jiffyapp-usr:jiffyapp-usr jiffyserver_nonroot
  • chown -R jiffyapp-usr:jiffyapp-usr jiffyserver_nonroot.sh

Update jiffyapp-usr appropriately with the correct Linux username which was created during the Pre-requisite setup.

Java Trust Store Configuration

Adding certs to the Java trust store is done by the installer. In case a Java upgrade happens, the following steps have to be performed to re-import the existing certificates into the trust store.

  1. Import self-signed CA certificate into the trust store:

    keytool -import -keystore /etc/pki/java/cacerts -storepass changeit -noprompt -trustcacerts -alias jiffyca -file /tmp/ca_cert.pem

  2. Import self-signed certificate into the trust store:

    keytool -import -keystore /etc/pki/java/cacerts -storepass changeit -noprompt -trustcacerts -alias jiffycert -file /tmp/localhost_cert.pem

  3. Import DB server certificate into the trust store:

    keytool -import -keystore /etc/pki/java/cacerts -storepass changeit -noprompt -trustcacerts -alias jiffydb -file /tmp/dbcert.pem

  4. Import cognitive server certificate into the trust store:

    keytool -import -keystore /etc/pki/java/cacerts -storepass changeit -noprompt -trustcacerts -alias jiffycognitive -file /tmp/cognitive_cert.pem

Non-Root Installer

Switch to thejiffy Linux usernamewhichwas created during the prerequisites and run the command below:

./jiffyserver_nonroot.sh

Keep all the details of the DB, Redis, Tenant etc handy before running this step. During this step the RabbitMQ username/password/host/port will be asked. Please provide the following as input.

Host: port localhost:5671

Give the same rabbitmq username and password which was given during Pre-requisite Setup.

Use the following table for DB detail reference:

Application DB Name Username Password
Jiffy jiffyappdb jiffy_db_user jiffy_db_user
Gus gusappdb gus_db_user gus_db_user

Create Masterkey

Jiffy DB Details

Image description

Initialize Vault

  • Provide the Initial Root Token printed on the screen as the input to the Vault token.
  • Among the vault unseal keys printed on the screen, provide two of them as the key input in the next screen. Save the Root token and Unseal keys for future reference.
  • The next input for the role_id and secret_id can be picked up from the screen. Refer screenshot for an example.

Image description

Image description

Bootstrap Docube

Image description

Bootstrap GUS

Image description

Bootstrap Drill

Image description

Start Jiffy

Image description

Centralized Logger Configuration

Configure Zipkin In Grafana

  1. Log in to Grafana.
  2. Default credentials will be admin admin.
  3. Goto Configuration.
    Image description
  4. Add data source.
  5. Type Zipkin in the search box.
  6. Select Zipkin and Fill the url as http://localhost:9411.
  7. Click on the Save and test button.

Configure Zipkin In Grafana

  1. Log in to Grafana.
  2. Default credentials will be admin admin.
  3. Goto Configuration.
  4. Add data source.
  5. Type Zipkin in the search box.
  6. Select Zipkin and Fill the url as http://localhost:3100.
  7. Add a dervied field.
    Image description
  8. Click on the Save and test button.

Start JIFFY.ai

Start Webserver

Run the following command as root user:

**/opt/nginx/sbin/nginx**

Start Vault

Run the following commands as jiffy linux user:

  • **cd $JIFFY_HOME/.vault.d/**
  • **nohup vault server -config=startupconfig.hcl >vault_$(date +%Y%m%d_%H%M%S).log 2>&1 &**
  • **vault operator unseal <unseal key 1 which was generated during the initialization>**
  • **vault operator unseal <unseal key 2 which was generated during the initialization>**
  • **application start all**
  • **$JIFFY_HOME/zipkin/conf/start_zipkin.sh**

Start Jiffy Core

Run the following command as jiffy linux user:

  • **application stop all**
  • **application start all**

For intercom to work correctly, the jiffy user should have a unique Email ID. After logging into the application, please create a new jiffy application user.

Did you find what you were looking for?