Created
September 18, 2017 18:11
-
-
Save danielscholl/3d0bfe1262197351ae769511d52f7d18 to your computer and use it in GitHub Desktop.
Cloud Init for Jenkins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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