Docker image to trial Jenkins Operation Center clustered setup
Written by: Michael Neale
Developer Zone
3 min read
At CloudBees we have some on-prem products we sell called Jenkins Operations Center , and Jenkins Enterprise . The latter, as you can guess, is a supported version of Jenkins with extra plugins and features, Operations Center is a means to manage a bunch of different Jenkins installations from a single place, monitor and more. There are also good things like failover and such.
The challenge we had was that there was a fair bit involved in showing all this working together - as the whole point is this is for advanced users who are getting deep into continuous delivery. An example setup would look something like this:
So we need a setup that involves HA proxy (to route and failover web requests, and give us one entry point to the whole system) - and then several other servers: Jenkins masters, Operations Center itself, some slaves and so on.
Now there is an excellent tutorial to take you through setting up a lot of this - but if you want to kick the tyres or demo something - it takes a while to setup. Our Solution Architects wanted a way to quickly show people the core concepts, demo them, and give them something they can try themselves without spending a whole lot of time setting it up.
So - we picked Docker!
Docker let us set up all these moving parts - a cluster in a box, quite easily. Furthermore, it has been set up to be kept up to date (via continuous delivery on our own dogfood jenkins). As Jenkins data is stored in the jenkins_home directory - any time the contents of that demo workspace changes by a product manager (eg we want to demo a new feature) - we just update the workspace in our own repo and it triggers a build/test/deploy of the docker image to the docker hub:
https://registry.hub.docker.com/u/cloudbees/joc-trial/
to run this, all you need to do is:
docker run -p 80:80 -it -h jockey.local cloudbees/joc-trial
(ensure that jockey.local points do your docker hosts IP) - obviously once you have docker installed - boot2docker is recommended.
This only needs you to have docker running - and the rest is done for you (make sure you have a chunk of memory as this is a little cluster setup!).
We also deploy a private version of this repo for internal use (with build in licences and such) - but it is based on the same data and image - all hosted out of the docker hub.
This is a mini distributed system - we need all this to show off some of the core features that users would want to try:
Operations Center Master
Client Master in a highly available mode with a backup master
Shared Slaves (slaves can be used from any master)
Slaves local to client master
Folders/Folders plus: ties slaves to a particular folder
Templates
Role Based Access Control (and with single sign on)
RBAC with a secret project
Monitoring graphs
Read on for the details of what you can do with this trial/demo of Operations Center. There is quite a lot to it.
Some extra reading:
boot2docker - for installing docker if you are new to it - for all platforms.
JOC install tutorial
Demo repository on docker hub
Documentation on the trial setup