This app is for demo purposes only. It consists of a frontend in node.js (v6.x) that displays data from a table from a MySQL backend (AWS RDS). The intent is to showcase
- CI pipeline using TravisCI
- Auto-provisioning (and teardown) of AWS EC2 instances via AWS CLI
git clone https://github.com/sosimon/simple-app.git
cd simple-app
npm install
node app.js
We're using TravisCI; the configuration is defined in .travis.yml
. The following is a description of the sequence of activities.
- Set environment variables
- AWS access keys -
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
will need to change depending on the AWS account being used
- AWS access keys -
- Setup (before_install)
- Install AWS CLI
- EC2 -
setup.sh
will spin up a new instance and attempt to verify the SSH connection - RDS - MySQL instance already setup; no configuration required
- Testing (script)
- Lint -
lint.sh
, which runsnpm run lint
- Unit tests - INCOMPLETE
- Lint -
- Deploy (script)
- Deploy app to EC2 - package app (tar.bz2), SCP to remote instance and extract
- Integration tests on the EC2 instance -
test.sh
, which runsnpm run test
- Teardown (after_script)
teardown.sh
: remove SSH keypair and terminate EC2 instance