Skip to content

Instantly share code, notes, and snippets.

@mtnygard
Last active October 14, 2019 09:35
Show Gist options
  • Save mtnygard/5949507 to your computer and use it in GitHub Desktop.
Save mtnygard/5949507 to your computer and use it in GitHub Desktop.
Packer.io template for a Jenkins server
{
"builders": [{
"type": "amazon-ebs",
"access_key": "",
"secret_key": "",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "m1.large",
"ssh_username": "ubuntu",
"ami_name": "packer-jenkins {{.CreateTime}}"
}],
"provisioners": [{
"type": "shell",
"inline": [
"sudo apt-get install -y openjdk-7-jdk",
"wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -",
"sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'",
"sudo apt-get update",
"sudo apt-get install -y jenkins"
]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment