This is a contribution aimed at speeding up the creation of an AWS EC2 node for BWCE continuous integration.
The main entry point is cloudformation/devops.template. It is a AWS CloudFormation template that you can run using the CloudFormation Service and selecting "Create Stack" and uploading that file to S3.
You are then prompted for a few parameters
BWCECFURL
, the URL for the bwce_cf.zip package (v2.3), e.g. from S3,BWCEDockerURL
, the URL for the bwce_docker.zip package (v2.3), a portion of the bwce install (docker subdir) you need to zip and make available, e.g. from S3,GitHubToken
, an access token for your GitHub repository containing a clone of bookstore,JenkinsPwd
, the password you want to set for theadmin
user on Jenkins,KeyName
, the name of a EC2 Key Pair name you want to use to ssh into the created instance,TypeTag
, the label that will be added on the Type tag to any of the created EC2 resources created.
Here are some details of what is actually performed by this template:
- Create a CentOS-based EC2 M3.medium instance in your current AWS region,
- Attach a Security Group to it with universal access on
TCP:22
(SSH) andTCP:80
(HTTP) as well as internalTCP:0-65535
access within the Security Group, - Perform updates on the created machine (OS + Extended Packages),
- Install base packages:
python
,pip
,wget
, - Install AWS CloudFormation Bootstrap,
aws-cfn-bootstrap
, - Install and configure
jenkins
- Install and configure
maven
3.3.9, including preparing a local repository for BWCE stuff, - Install
jenkins
last stable version, - Configure a SSH key to run
jenkins
CLI, - Create the admin user with the provided
JenkinsPwd
, - Add the following plugins:
build-pipeline-plugin
,dashboard-view
,workflow-aggregator
, andplain-credentials
with all their dependencies, - Configure
Maven
injenkins
, - Create the the GitHub connectivity with the provided
GitHubToken
credentials, - Setup a build pipeline for the
bookstore
sample, - Disable Jenkins CLI access,
- Install and configure
docker
, - Install and configure the required BWCE bits,
- Install and configure
runman
(the execution part ofpostman
) for Rest API testing, - Install and configure
nginx
to reverse proxyjenkins
on port 80.