Pre Requisites:
Jiffy should be installed in the destination machine (Destination > machine is the server where the JDI is going to run)
Don’t use Studio in the destination machine.
It will support only one JDI instance for one Jiffy instance.
The jiffy server(destination machine) will have a folder path for
> hosting JDI project. And all the deployment configuration will
> already be set up. Usually this path will be
> /opt/JDI/studioJDI/deploy.
Types of deployments:
Project installation
App installation / upgrade
Project upgrade
1.Project Installation:
cd /$JIFFY_HOME/JDI/studioJDI/
mkdir download
scp <zip file> <username>@<server ip or
hostname>:/$JIFFY_HOME/JDI/studioJDI/download
cd /$JIFFY_HOME/JDI/studioJDI/download
unzip <zip file>
Note: If you are doing the deployment first time please skip this step.
cd /$JIFFY_HOME/JDI/studioJDI/deploy
python backup.py
supervisorctl stop JDI
rm -r /$JIFFY_HOME/JDI/studioJDI/deploy
cd /$JIFFY_HOME/JDI/studioJDI/download/JDI_xxxxxx/
cp -R deploy /$JIFFY_HOME/JDI/studioJDI/
cd /$JIFFY_HOME/JDI/studioJDI/deploy
source \$JIFFY_HOME/.envs/jiffyEnv/bin/activate
python install.py --type 1 --confirm yes/no
For any help:
Type:
Python install.py --help
supervisorctl startJDI
supervisorctl status
rm -r /$JIFFY_HOME/JDI/studioJDI/download/
2.App installation / upgrade:
Note:
Upgrade means the app is already running in JDI and you want to > update it.
Install means the app is not their in JDI and you want to add it.
Steps:
scp <zip file> <username>@<server ip or
hostname>:/$JIFFY_HOME/JDI/studioJDI/download
cd /$JIFFY_HOME/JDI/studioJDI/download
unzip <zip file>
cd /$JIFFY_HOME/JDI/studioJDI/deploy
python backup.py
supervisorctl stop JDI
Note: If you are doing App install please skip this step
rm -r /$JIFFY_HOME/JDI/studioJDI/deploy/src/<app_name>
cd /$JIFFY_HOME/JDI/studioJDI/download/JDI_xxxxxx/
cp -R <app_name> /$JIFFY_HOME/JDI/studioJDI/deploy/src/
Note: This is important.
cd /$JIFFY_HOME/JDI/studioJDI/deploy
source \$JIFFY_HOME/.envs/jiffyEnv/bin/activate
python install.py --type 2 --name <app_name> --confirm yes/no
python install.py --type 3 --name <app_name> --confirm yes/no
supervisorctl start JDI
supervisorctl status
rm -r /$JIFFY_HOME/JDI/studioJDI/download/
4.Project Upgrade:
scp <zip file> <username>@<server ip or
hostname>:/$JIFFY_HOME/JDI/studioJDI/download
cd /$JIFFY_HOME/JDI/studioJDI/download
unzip <zip file>
cd /$JIFFY_HOME/JDI/studioJDI/deploy
python backup.py
supervisorctl stop JDI
cd /$JIFFY_HOME/JDI/studioJDI/download/JDI_upgrade_xxxxxx/
cp -R deploy /$JIFFY_HOME/JDI/studioJDI
cd /$JIFFY_HOME/JDI/studioJDI/deploy
source \$JIFFY_HOME/.envs/jiffyEnv/bin/activate
python install.py --type 4 --confirm yes/no
supervisorctl start JDI
supervisorctl status
rm -r /$JIFFY_HOME/JDI/studioJDI/download/