Installing and Setting up Jenkins through Docker

Jenkins is written in Java and is a scalable, highly efficient open source automation server which runs using various plugins designed for continuous integration, deployment and automation purposes. Any new language, framework or tool can be easily setup on Jenkins using these plugins. Jenkins is platform independent, easily configurable, customizable for any project we come up with and has a rich plugin ecosystem.

This post covers installation and setting up of Jenkins Server through Docker and talks about various features of dashboard.

Setting up Jenkins

The following steps will show how to setup a Jenkins host on your computer running Ubuntu OS.

  1. Open a terminal, run the docker command to make sure it’s running. If not, start it using the below command (1) and verify status (2) :
    1. sudo systemctl start docker
    2. sudo systemctl status docker
  2. Run the following command as shown in the screenshot below :Screenshot from 2018-10-06 23-55-41The above command pulls Jenkins image and runs Jenkins in the Docker container built from this image.

Unable to find image ‘jenkinsci/blueocean:latest’ locally
latest: Pulling from jenkinsci/blueocean
4fe2ade4980c: Pull complete
6fc58a8d4ae4: Pull complete
fe815adf554b: Pull complete
f76236630288: Pull complete
8039171c0e57: Pull complete
18d8e90ec574: Pull complete
7a2a4ab0865c: Pull complete
0e70b771820a: Pull complete
6e7e196001ad: Pull complete
c63c334888d6: Pull complete
1dd6901c0bea: Pull complete
ca93531eb098: Pull complete
4d0f9ddcdde1: Pull complete
9a912b50042f: Pull complete
979f904978de: Pull complete
5c0e3c2efea2: Pull complete
Digest: sha256:b7135a71c62bbf11148944037417a2aae9e940ebc4cc7c3438a6b8c29a73d9f9
Status: Downloaded newer image for jenkinsci/blueocean:latest
Running from: /usr/share/jenkins/jenkins.war

Visit http://localhost:8080 to enter the initial admin password which can be fetched from container logs, by identifying the ID.

Screenshot from 2018-10-07 00-10-58


Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:


This may also be found at: /var/jenkins_home/secrets/initialAdminPassword


Enter this password in the browser prompt and we’re ready to customize Jenkins. Select Install Suggested Plugins and it will install the required ones. Once the plugin setup is complete you will be asked to create an Admin user. Fill in the details and click Save and Finish. Jenkins is now ready !

Screenshot from 2018-10-07 00-34-51


Jenkins Dashboard

When you first login to Jenkins you don’t have jobs or builds, on the top right corner there is an option to add short description. The bottom right corner has a REST API section, with some details on how to interact with Jenkins API.


On the left hand side of dashboard, Open Manage Jenkins and select Configure Global Security settings. By default, we should have security enabled and realm is Jenkins’ Own User Database. When more than one user is present in that case we should have Authorization set to different options, other than default.

Matrix-Based security –  It allows administrators to grant permissions to various groups depending upon the context. Here, I have selected this option and added new user account by granting various permissions, which can be seen below :Screenshot from 2018-10-07 00-39-20

So, we have identified important points on how to setup Jenkins server through Docker and have gained some insight on user management and access control.



Journey from Linux Systems Admin to a DevOps Engineer

It was an open source event that delve me into *NIX and since then my real interest were in Systems. I was hired as a Linux Systems Administrator in a start-up named Atlantis Computing and I really enjoyed my work. It was in the year 2007 when the journey began.
System Administrators [SysAd] are the people who run millions of computer that makes everything in our daily life possible. Without them there will be no large working computers anywhere. Imagine a world where air-traffic controllers don’t have computers, where you need to talk to an operator anytime you want to make a phone call and where you have no e-mails. It’s hard to imagine. Right ?
The role of SysAd is quite diverse and encompasses variety of specialities ( same way as doctors graduate and specialize in surgery, pediatrics, and so on ). At the higher level SysAd is responsible for building and maintaining the computer systems for an organization. When it crashes, we fix it, when it under-performs, we tune it and when it grows old, we upgrade it.
The role of managing these and other computer systems comes under Operations group. An Operations group can include variety of people, from Desktop support team for a company, to people who design and build large scale computing infrastructures, to senior managements who decides company’s IT decisions.
I chose to be a SysAd and I enjoyed it greatly. I get to sit behind the scenes ensuring users get to information they need without interruption. It lead to a vast number of opportunities which can take whole life time to explore and enjoy. I actively participate in various local user group meetings and attend conferences to meet different kinds of people. I spend time in responding to e-mails in various mailing lists and feel happy when their problems are fixed. And yes we have our day too.

Well, after being in Operations field for more than four years I got an opportunity to attend DevOps Days 2011 at ThoughtWorks, Bangalore and I have already shared my experience with it in one of my previous posts. I was overwhelmed and thought I was not giving justice to myself after learning about the creative ideas and solutions. I started interacting with folks about a career in DevOps. A fellow ThoughtWorker named Ram guided and motivated me to a large extent.
So what are DevOps skills is another question in my mind ? And it is answered very nicely on Puppet blog. Today, I can best utilize my Operational skills while interacting with Developers. I now see that continuous product deployments have improved. Making realistic deployment environments available to the team so that production deployments can be exercised early and automated. I am now in the process of hardening my skills on Chef, Puppet because I like automating most of my tasks.
A couple of months back OpsCode hosted ChefConf 2013, a 4 day event focused on adopters and contributors to Chef. Our organization Relevance Lab was participating sponsor. While my colleague attended it, I had an opportunity to attend live webcast. It was a rich experience, ChefConf demonstrated the electricity of how DevOps is shaping the future of how businesses compete in market place.
I am exposed to many automation tools and cloud computing providers like Amazon, OpenStack. I can now apply thoughts on how Infrastructure can be programmable. I am breathing a DevOps culture.

%d bloggers like this: