Sales +1-855-261-3391 Chat Blog Partner Support Status  |  Download

Networking Unplugged

Perspectives on cloud networking and software-defined WANs

Posted July 18, 2014
Comments 0 Comments

Secure Cloud Bursting (Part 1): How to Build a Jenkins Master

If you work in DevOps, you’ve had to use Continuous Integration to test and package an app for deployment. This can take time, effort and money that could be better used elsewhere.

You probably haven’t thought about it, but CI is actually pretty expensive. The below chart shows our capacity versus our usage over a one month period.

Build Capacity Versus Usage

As you can see, we only use approximately 36% of our allotted build capacity. When we started sharing these numbers with industry colleagues at DevOpsDays Silicon Valley, we found that this is not unusual. We typically spend $10,000/month on this infrastructure, while 60% remains unused month over month. If we were able to pay for the amount of time we actually use, we would see a $6,000 monthly savings.

How much of your infrastructure do you think sits unused over any given month?

We have been working on a way to get our organization to maximum build cost efficiency with reduced infrastructure complexity via secure cloud bursting and would like to share the steps to do this with you over a series of four blog posts.

Our first post will detail how to build a Jenkins Master. Posts two, three and four will explore how to build a Jenkins Slave and connect it to the Master, deploy a Jenkins Slave to a secure cloud and perform a Jenkins initiated cloudburst.

In this first post, we will review step 1—How to Build a Jenkins Master.

Note: The commands below assume you are using an Ubuntu Linux-based CLI. You can pull our repo from Github to avoid using copy/paste in steps four, seven and eight.

git clone

1. Install Docker dependencies on an Ubuntu Linux machine.

a. Update your package installer to allow install of Docker dependencies.

sudo apt-get update
sudo apt-get install -y apt-transport-https

b. You may need to update your kernel. Here’s how to tell if you need to. 

uname -r

if <= 3.8Check Kernel Example

sudo apt-get install -y linux-image-generic-lts-raring linux-headers-generic-lts-raring 
sudo reboot

c. Now you need to add the Docker repo to your list of repos.

sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"

2. Install Docker.

sudo apt-get update
sudo apt-get install -y lxc-docker

3. Make a directory on your machine with two sub directories - demo and Jenkins.

mkdir demo 
cd demo 
mkdir jenkins-master 
cd jenkins-master

4. Copy and paste the code from the Pertino supplied Dockerfile into a file named Dockerfile in your demo subdirectory. The file explains what each line of code will do.

5. Run:

sudo docker build -t iteration .

6. Wait 10-15 minutes. This may need to be re-run due to a Docker or Jenkins timeout.

7. Copy and paste the code from the other Pertino supplied Dockerfile into a file named Dockerfile in your Jenkins-master subdirectory.

8. Copy and paste the code from the Pertino supplied config file (supervisord.conf) into a file named supervisord.conf in your Jenkins-master subdirectory.

9. Build Jenkins-master container.

sudo docker build -t jenkins-master .

9. Verify that you successfully created a Jenkins Master. 

sudo docker images

Verify Jenkins master

10. Run Jenkins-master.

sudo docker run -p 8080:8080 -p 6022:22 -p 54525:54525 -h ${HOSTNAME} -d jenkins-master

 12. You can now navigate to http://localhost:8080 to see your newly created Jenkins Master.Verify Jenkins Site


Please comment if you have any questions and stay tuned for part 2 of our secure cloud bursting series—How to Build a Jenkins Slave and Connect it to the Master.

Luke Woydziak

Luke Woydziak

Networking Team Lead

Pertino is my seventh tech company, and I've loved every minute of it. After a career as a professional Track and Field Athlete, I've taken my passion and energy and directed it toward building and leading a team that solves complex engineering problems.

comments powered by Disqus
Chat now Click to Chat