CloudFormation Launch

Launch Jenkins on ECS:

First download the Cloudformation template in your local instance:

curl -LJO

Now open your CloudFormation console
Go to Specify template and select Upload a template file and then select Choose file. Browse to the above downloaded json file and click Next

Select the desired AWS Region from the top right menu and then fill in the Stack name, KeyName (optional) and leave the auto-filled values as it is (default region used by the CloudFormation would be us-east-2): dashboard Check box the acknowledgment line and click Create stack. This will spawn the ECS Infrastructure and deploy Jenkins container behind an ELB. Additionally, it will also configure the auto-scaling group for ECS Container Instances along with the CloudWatch Alarms to monitor the CPU utilization of the instances.

Once the CloudFormation stack creation is completed, go to the Outputs section of the CloudFormation and click the link to the ELB for the Jenkins Container: dashboard The ELB URL will give you the interface for the Jenkins without a password.

Note: The password is removed for easier access to workshop, however, in practice, please configure the security through Manage Jenkins -> Configure Global Security -> Select Jenkins Own User Database -> Configure for all users to set password.

The Jenkins dashboard would show the buildjobs already configured as shown below: dashboard

Access the ECS Service and ensure that a container is running on one of the two container instances: dashboard