Create a gist now

Instantly share code, notes, and snippets.

Vagrant provisioning: CentOS6.5 + Docker + Jenkins
config.vm.provision "shell", inline: <<-SHELL
sudo cp -p /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
sudo sh -c 'echo ZONE=\"Asia/Tokyo\" > /etc/sysconfig/clock'
sudo sh -c 'echo UTC=\"false\" >> /etc/sysconfig/clock'
sudo sh -c "source /etc/sysconfig/clock"
sudo yum update -y
sudo yum install -y wget
sudo rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
sudo yum install -y docker-io
sudo chkconfig docker on
sudo yum install -y java-1.7.0-openjdk
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install -y jenkins
sudo chkconfig jenkins on
sudo sed -i -e 's@JENKINS_ARGS=""@JENKINS_ARGS="--prefix=/jenkins"@' /etc/sysconfig/jenkins
sudo sed -i -e 's@JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"@JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.util.ProcessTree.disable=true"@' /etc/sysconfig/jenkins
sudo usermod -G docker jenkins
sudo yum clean all
SHELL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment