Install Jenkins ModuleView SourceRelease Notes
This module contains two scripts for working with Jenkins CI server:
install.sh: This script will install Jenkins on a Linux server. Currently, Ubuntu and CentOS are supported. This script also installs the
run-jenkins: This script can be used to configure and run Jenkins. You will typically run this script while your server is booting.
- Check out the jenkins example for working sample code.
- See install.sh and run-jenkins.sh for all options you can pass to these scripts.
--module-name 'install-jenkins' \
--repo 'https://github.com/gruntwork-io/terraform-aws-ci' \
--tag '<VERSION>' \
The command above will copy
install.sh to your server, run it, install Jenkins 2.164.3, and copy the
/usr/local/bin. We recommend running this command in a Packer template so you
can create an AMI with Jenkins installed. Check out the jenkins example for an example of such a
Once you have an AMI with Jenkins installed, you need to deploy it on an EC2 Instance in AWS. The easiest way to do this is with the jenkins-server module. When the EC2 Instance is booting, you should typically do two things in User Data:
Mount an EBS volume for the Jenkins home directory. You want to use an EBS volume so that your Jenkins data is persisted even if the EC2 Instance is replaced (e.g., after a crash or upgrade). The
mount-ebs-volumescript in the persistent-ebs-volume module makes it easy to attach and mount a volume.
run-jenkinsscript to start Jenkins, set its home directory to the mount point for the EBS volume, and configure it to use a certain amount of memory:
--memory "1g" \
Check out the jenkins example for an example of such a User Data script.