Getting the Source Code on EC2

To deploy MyCRT, you must obtain MyCRT's source code, install al of MyCRT's dependencies, and build the MyCRT project. MyCRT is still in active development - future developments of this project could be automated.

1: Launch an EC2 Instance

From the EC2 dashboard, click "Launch Instance".

Select "Ubuntu Server 16.04 LTS (HVM), SSD Volume Type", t2.micro, and click "Launch".

Choose or create a key pair to use when logging into the instance. After a few minutes, your instance will be available for use. Use your key pair and instance public DNS or IP address to SSH in.

Modify your instance's security group to allow HTTP traffic from all sources.

2: Obtain the MyCRT source code

After SSH'ing in, run the following command to get the source code. Git should come pre-installed on the machine.

git clone https://github.com/CPSECapstone/LilBobbyTables-MyCRT.git mycrt

This will create a mycrt directory for the repository.

3: Install Dependencies

Running the MyCRT service will require that the following dependencies be installed.

Update apt-get

sudo apt-get update

MySQL Client

sudo apt-get install mysql-client

Running mysql --version should show mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper

Node and NPM

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -; sudo apt-get install -y nodejs

This will install both node and npm. node --version should show at least v8.11.1, and npm --version should show at least 5.6.0

Ruby

sudo apt-get install ruby-full

Sass

sudo apt-get install ruby-sass

Chromedriver

sudo apt-get install chromium-chromedriver
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver

4: Build MyCRT

Now, we should be able to build MyCRT. This will ensure that everything has gone well so far!

To build MyCRT, run the following:

cd mycrt
./scripts/npm_install.sh

This will take several minutes, and there should be no errors in the output.

Next Step

pageCreate an RDS Instance

Last updated