You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Contact info

Tan | ts864@cornell.edu

Overview

Currently, the way Docker containers are deployed on AWS is basically having them run on EC2 instances. This means that each service occupies a unique port on the machine. Below is a list of running services and the ports they are using.

ServicePort
Backend online5001

Test and production environments are deployed separately on the EC2 instances below.

FunctionIP addressKey pair file
Test3.232.82.82DIAPER-test-key.pem
Production

35.168.248.57

DIAPER-production-key.pem

Procedure

The procedure for deploying is the same for both EC2 instances. First, download the key pair file corresponding to the instance and run

chmod 400 /path/to/DIAPER-*-key.pem

Then, ssh into the EC2 instance using

ssh -i /path/to/DIAPER-*-key.pem ec2-user@<ip address>

Pull your Docker image and other relevant file from GitHub. Once pulled, navigate to your project folder and run the Docker as you would do locally (but make sure to run them with sudo). To keep your service from blocking the console, you should run your Docker in detached mode using the -d option.

 

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

 

Note: You must specify which .yml file to use when launching docker. See details at Domains of backend APIs and SSL > "Specify which yml file to use when launching docker on production and test environment"

  • No labels