Last Updated: Jul 16, 2020
This section contains information on how to install and run Jiffy Core server on a Linux environment.
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.
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
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.
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.
Installation location: If the user wants to install in a different location, provide the appropriate input such as /home, /jiffy etc.
Linux username for jiffy application: If the user wants to create or use a different user, provide the required username.
Linux group name: If the user wants to create and assign a different group, provide that group name.
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.
Do you want to re-enter the values?: If the user wants to re-enter, please input **y **.
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.
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
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. Server domain name for Grafana login should be provided as input next: 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) A successful installation for the root prerequisite will end with the following screenshot:
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.
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.
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
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
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
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
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 |
Run the following command as root user:
**/opt/nginx/sbin/nginx**
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**
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.