Skip to content

Deploy notes AWS Config

Christopher edited this page Jun 28, 2019 · 3 revisions

Intro

iSENSE is currently hosted on an elastic beanstalk aws instance. In order to get access to a developer console, please ask one of the senior members.

The deploy config is stored in .ebextensions/deploy.config. This is a YAML config file and it contains the instructions for deploying.

Requirements

Once you have these utilities, navigate to where you have iSense clones and type eb init and enter your credentials. Go to the official amazon elasticbeanstalk cli docs for further reference

Note: Before doing anything with the rsense-beanstalk-env, please test on dev first

Overview

iSENSE has two environments, rsense-beanstalk-env and Rsense-ev (The latter is the dev environment, and has a pending namechange). Please do all staging and deploying on the dev environment first.

Our environment utilizes a standard elastic beanstalk/ruby config. In order to get it to work, you have to make sure that the ec2 instance is part of the rds security group, and that the correct S3 bucket is utilized.

S3 bucket notes

We do not mount our S3 instances directly in order to save cost. Instead, we manually utilize aws s3 sync to copy media objects from our s3 bucket into /media/volume1 of our ec2 instances at startup. In order to make sure uploaded media objects eventually make their way into our S3 buckets, we have a cron job that runs every hour (at *:00) that executes # ~/bkpimgs.sh as root. If you intend to shutdown any ec2 instances, as you must run this script first or else we may lose media objects.

Because of our unorthodox S3 bucket setup, we may run out of space at some point.