July 2017
Intermediate to advanced
402 pages
9h 38m
English
In order to create our EC2 instance with Jenkins running on it, we will proceed as we did in Chapter 3, Treating Your Infrastructure As Code, using either the web interface or the command-line interface as follows:
$ aws cloudformation create-stack \
--capabilities CAPABILITY_IAM \
--stack-name jenkins \
--template-body file://jenkins-cf.template \
--parameters ParameterKey=KeyPair,ParameterValue=EffectiveDevOpsAWS
As before, we can then wait until the execution is complete:
$ aws cloudformation wait stack-create-complete \
--stack-name jenkins
Next, we can extract the host public IP:
$ aws cloudformation describe-stacks \
--stack-name jenkins \
--query 'Stacks[0].Outputs[0]'
{
"Description": ...Read now
Unlock full access