Skip to content

Setup Cloud CI in 15 minutes with Jenkins, DotCi, Docker and DigitalOcean

Joshua Clark edited this page Apr 3, 2016 · 6 revisions
  • Create a droplet with docker under applications

digitalocean

  • Install mongodb and jenkins trusted docker builds
 mkdir -p /mongodb/db 
 docker run -d -p 27017:27017 -v /mongodb:/data --name mongodb library/mongo

 docker run -d -P -p 80:8080 --link mongodb:mongodb -v /jenkins:/jenkins aespinosa/jenkins
  • Install DotCi: You should now be able to access your jenkins instance at http://<droplets-ip-address> . Install DotCi plugin from Jenkins update center by going to Manage Jenkins > Manage Plugins

  • Create a github application with Authorization callback URL of http://<droplets-ip-address>/dotci/finishLogin

  • Configure github-oauth-plugin Manage Jenkins > Configure Global Security

github-oauth-plugin configuration

  • Add jenkins slave. Jenkins master is the docker container running jenkins. We don't want builds running on master, but you can add the same droplet as a jenkins slave .

  • Install git and java on the machine with

 apt-get update && apt-get install -q -y openjdk-7-jre-headless git
  • Add droplet as a jenkins slave under Manage Jenkins > Manage Nodes. Add root username and password credentials emailed to you when you created the droplet. Jenkins slave

  • Configure DotCi: Under Manage Jenkins > Configure System change mongodb host from localhost to mongodb and label to docker

DotCi configuration

Thats it. Head over to DotCi Usage Documentation

Clone this wiki locally