Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contact info

Tan | ts864@cornell.edu

Overview

Currently, the way services are deployed is basically running their Docker containers on AWS EC2 instances. Within each container, a Flask service is hosted using Gunicorn instead of native Flask to make the service more fault-tolerant.

...

EnvironmentIP addressDomainPortSample URLKey pair file
Mobile (Online) Test54.163.4.203

mobile-test.diaper-project.cfcom

(deprecated: on-test.diaper.cf)

5001https://mobile-test.diaper-project.cfcom:5001/api/monitoring

DIAPER confidential > AWS EC2 key files > DIAPER-test-key

Box folder link

Dashboard (Offline) Test54.243.201.107dashboard-test.diaper-project.cfcom5000https://dashboard-test.diaper-project.cfcom:5000/env/





Mobile (Online) Production

35.168.248.57

mobile-prod.diaper-project.cfcom

(deprecated: on-prod.diaper.cf)

5001https://mobile-prod.diaper-project.cfcom:5001/api/monitoring

DIAPER confidential > AWS EC2 key files > DIAPER-production-key

Box folder link

Dashboard (Offline) Production3.228.124.129dashboard-prod.diaper-project.cfcom5000https://dashboard-prod.diaper-project.cfcom:5000/env/

Procedure

The procedure for deploying is the same for all environments. First, download the key pair file corresponding to the instance and run

...

Code Block
ssh -i /path/to/DIAPER-*-key.pem ec2-user@<domain>


See How to ssh into AWS / BioHPC if you're having trouble


Pull your Docker image and other relevant file from GitHub. Instead of your own git account and password, the username is diapertestemail@gmail.com , and the password is the token in the login secrets.

Once pulled, navigate to the folder containing docker-compose files and run the corresponding command as explained below:

...

Now you can log out and the service will continue running on the EC2 instance.

...

Troubleshooting

Server is down

  1. Reboot the instance(shown below)

Image Added


      2. If the problem persists, connect to the relevant server and run the deployment script:

Code Block
// For test environments.
./deploy.sh -n "Your Name" -m "Reason for deployment" test
 
// For production environments.
./deploy.sh -n "Your Name" -m "Reason for deployment" prod

The particular issue may be highlighted during the execution of the above command.



BioHPC database timeout (Obsolete)

If you are experiencing timeout when connecting to the BioHPC database, it' probably because the EC2 instance isn't connected to Cornell's VPN. Check whether the VPN is connected with

...

and enter necessary information as prompted.