-
Notifications
You must be signed in to change notification settings - Fork 73
Setup Cloud CI in 15 minutes with Jenkins, DotCi, Docker and DigitalOcean
- Create a droplet with docker under applications
- 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 toManage Jenkins > Manage Plugins
-
Create a github application with
Authorization callback URL
ofhttp://<droplets-ip-address>/dotci/finishLogin
-
Configure github-oauth-plugin
Manage Jenkins > Configure Global Security
-
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 .
- Make sure you to add ssh keys of your machine to your github account. Github guide describing the process.
-
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. -
Configure DotCi: Under
Manage Jenkins > Configure System
change mongodb host fromlocalhost
tomongodb
and label todocker
Thats it. Head over to DotCi Usage Documentation