Browse the Repo
Browse the Repo
Sample infrastructure-modules repo (multi-account setup) for fictional company Acme.
This Terraform Module can be used to deploy Jenkins, an open source build automation server.
The resources that are created by this module include:
If you don't have access to any of the Gruntwork modules, email email@example.com.
To use this module, you need to:
The Jenkins server should run the AMI built using the Packer template in
To build the AMI from the Packer template:
GITHUB_OAUTH_TOKEN. Your GitHub account must have access to the Gruntwork GitHub repos mentioned in
packer/jenkins-ubuntu.json; if you don't have access to those, email firstname.lastname@example.org.
packer build jenkins-ubuntu.json.
These templates mount the JENKINS_HOME directory
on a separate, persistent EBS volume at path
/jenkins. Unlike a root volume on an EC2 Instance, this EBS volume will
persist between redeploys so you don't lose all your data each time you push out new code.
If you want to upgrade the Jenkins version, your best option is to update the
jenkins_version variable in this Packer
template. If you use the Jenkins UI to do upgrades, you will lose that upgrade the next time you deploy a new AMI. A
Jenkins upgrade installs a new war file for Jenkins onto the root volume. The
JENKINS_HOME directory should remain
unchanged and continue working with the new version.
When you first install Jenkins, it walks you through a Setup Wizard. As part of that process, we recommend using the standard set of plugins recommended by the Setup Wizard. On top of that, we also typically install two other useful plugins using the plugins UI:
We have deployed Jenkins with an Application Load Balancer in front of it for a few reasons:
In order for Jenkins to be able to do automatic deployment by running Terraform, we have given it IAM permissions to access a large number of AWS APIs. This means Jenkins is a highly trusted actor and we need to be extra careful in how we manage and secure it.
For more info on what is Jenkins, how to configure it, and how to use it to set up continuous integration and continuous delivery, see the Jenkins documentation. For info on finding the Jenkins logs in CloudWatch, check out the cloudwatch-log-aggregation-scripts documentation. For info on viewing the custom metrics in CloudWatch, check out the cloudwatch-memory-disk-metrics-scripts documentation.
We're here to talk about our services, answer any questions, give advice, or just to chat.