Infrastructure as Code

Click here to view a recording of the re:Invent breakout session or, to view a shorter 10-minute walkthrough of the demo, click here.

The Demo App 🐪

The Dromedary demo app is a simple nodejs application that displays a pie chart to users. The data that
describes the pie chart (i.e. the colors and their values) is served by the application.

If a user clicks on a particular color segment in the chart, the frontend will send a request to the
backend to increment the value for that color and update the chart with the new value.

The frontend will also poll the backend for changes to values of the colors of the pie chart and update the chart
appropriately. If it detects that a new version of the app has been deployed, it will reload the page.

Directions are provided to run this demo in AWS and locally.

Core Demo Requirements

Given a version-control repository, the bootstrapping and the application must be capable of launching from a single CloudFormation command and a CloudFormation button click - assuming that an EC2 Key Pair and Route 53 Hosted Zone has been configured. The demo should not be required to run from a local environment.

An application pipeline in CodePipeline must go from commit to production in less than 10 minutes.

It should be capable of running on a new AWS account without any additional setup.

Feature Backlog 🐪

We plan to add additional features in the coming months. Check the issues and Feature Backlog for more information.

Running in AWS 🐪

DISCLAIMER: Executing the following will create billable AWS resources in your account. Be sure to clean
up Dromedary resources after you are done to minimize charges

PLEASE NOTE: This demo is an exercise in Infrastructure as Code, and is meant to demonstrate neither
best practices in highly available nor highly secure deployments in AWS.

CloudFormation Bootstrapping (e.g. for AWS Test Drive)

You'll also need to create a hosted zone in Route53. This hosted zone does
not necessarily need to be publicly available and a registered domain.

You can either use the AWS CLI or the AWS web console to launch a new CloudFormation stack. To launch from the console, click the button below (you'll need to login to your AWS account if you have not already done so).

Upon completion of a successful pipeline execution, Dromedary will be available by going to the Outputs tab on the master CloudFormation stack and clicking on the value for the DromedaryAppURL Output. If that hosted zone is not a publicly registered domain, you can access Dromedary via IP address. The IP address can be queried by viewing the EIP output of the ENI CloudFormation stack.

Every time changes are pushed to Github, CodePipeline will build, test, deploy and release those changes.

Configure Jenkins Security

IMPORTANT: It's very important that you enable Jenkins security.

From CodePipeline, click on any of the Actions to launch Jenkins. From Jenkins, perform the following steps to configure security:

Manage Jenkins > Configure Global Security

Check Enable Security

Click Jenkins’ own user database

Check Allow users to sign up

Check Logged in users can do anything

Click the Save button

Click Sign Up in the top right to create an account

Save and login as that user

Manage Jenkins > Configure Global Security

Check Matrix Based Security

Add a line for the user you just created

Check the Administer box

Click the Save button

Cleanup

To delete (nearly) all Dromedary resources, delete any Dromedary application stacks and delete the master CloudFormation stack. The only resources that remain and require manual deletion is the Dromedary S3 bucket.