Skip to content

Instantly share code, notes, and snippets.

@danielscholl
Created September 18, 2017 18:11
Show Gist options
  • Save danielscholl/3d0bfe1262197351ae769511d52f7d18 to your computer and use it in GitHub Desktop.
Save danielscholl/3d0bfe1262197351ae769511d52f7d18 to your computer and use it in GitHub Desktop.
Cloud Init for Jenkins
#cloud-config
package_upgrade: true
write_files:
- path: /etc/systemd/system/docker.service.d/docker.conf
content: |
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd
- path: /etc/docker/daemon.json
content: |
{
"hosts": ["fd://","tcp://127.0.0.1:2375"]
}
runcmd:
- wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
- sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
- apt-get update && apt-get install jenkins -y
- curl -sSL https://get.docker.com/ | sh
- usermod -aG docker azureuser
- usermod -aG docker jenkins
- service jenkins restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment