DevOps: Part 1 Git , Jenkins and Docker
DevOps Part 1 Article Ka Hamady

DevOps: Part 1 Git , Jenkins and Docker

DevOps is a methodology used to fill the Gap between an Application Development part and its operational part.

It allows better communication and collaboration between these two important steps of an Application.Before DevOps the Applications Deployment takes more time and with DevOps the Applications and Services can be deployed fastly. DevOps methodology is used in many of the Software Development Applications and Services.

In the Application development process methods from Stakeholder Application requirements to the development part and the Operational one there is some sometimes some gaps or some luck of collaboration or communication for the release of a better and fast delivery product.

Sometimes between Stakeholders and Developers the Agile methodology is used to fill the gap and between Developers and Operational teams DevOps is used to fill the gap.Agile methodology will be discussed in another article.

The Software Development Code is deployed to the remote server and every time that a change is made the code will be automatically built and if there is Bugs the Code writer will be noticed or by E-mail or by any other way so that the Bug can be fixed in time and it facilitates also the Bug Code Localization.For example if the bug is found in the last code built it can be fixed according to the last version pushed through the Version Control Tool such as Git or SVN or Mercurial. It allows a Continuous Integration , Continuous Delivery and Deployment.This is also part of the DevOps Life Cycle from the Code , Version Control tool, the build, test and deployment tools.

Continuous Integration is the process to commit the code frequently to the remote server so that problems in code can be detected early and fixed.Every time that a code commit is done it will be built,tested and deployed to the servers.

Before Continuous Integration the entire source code is built once and Developers have to wait for test results and there is no feedback but with continuous integration there is a feedback every time that a code commit is done.That's why also DevOps is very important because the Bugs are detected at the early development process not at the end allowing applications to be fastly deployed and released than before.

In this article some continuous integration tools are introduced. At first we will discuss about the Version Control Tool Git , Continuous Integration Tool Jenkins , Docker (Containers) for Application Deployment.

In the Article DevOps Part 2 we will discuss about DevOps Management and Configuration Tools.

  1. Git and GitHub

Git is a version control tool highly used in the development process.A version control is a management change to documents ,computers Programs, large web sites and other collections of information. The word Version refers to Changes. Git helps the development team to work with the same file and store back the file changes process.There are two types of Version Control System: Distributed and Non-Distributed.The first one is more suitable.

The Distributed Control System is composed of Server Remote Repository(GitHub) and many local Repositories.

GitHub is a remote server platform where we can host code for version control collaboration, it's a company that allows you host your server repository like a social Network for Developers.

Git is used because it presents many features, it is

  • Compatible with existing systems/Protocols such as SSH or other Version Control Tools such as SVN.
  • Non-Linear: It supports non-linear development of Software
  • Branching: Create and Merge branches
  • Lightweight: Uses Lossless compression techniques to compress data on the client's side
  • Speed: Git is faster because written in C ,it reduces the Runtime process
  • Open Source : You can its source code according to your needs
  • Reliable: As we can store all the versions (Snapshots) , if the Central Server crashes a backup is always available in your local servers.
  • Secure: SHA1 security protocol in every file.
  • Economical: Released in GPL's license so it's free.

Your local repository is in general your local machine and your central repository is your GitHub Account.

We have many Git operations and Commands.These commands will help to push from your local repository to the central one (git push) or to pull from your central repository to the local one (git pull). Also how to commit to the master (git commit) ,how to store all the commits(git log).There is also Branch creation , merging with git merge that allows different branches work together. We can also clone with the security protocols such as HTTPs or SSH , git revert to go back to the previous version of the file. We will do an article for Git Commands and Operations.

2. JENKINS Tool for Continuous Integration:

Continuous Integration has been introduced above and it has been said that it allows code build for every code commit done to see if there is no bugs and if there is fix it and go forward with the development.It avoids the entire code build at the end of the development that will make bug fix very difficult and can slow the deployment and delivery process.

JENKINS is an open source continuous integration tool written in Java with many plugins.

The Plugins allows Integration of various DevOps stages. It allows also Jenkins to be extended to meet specific needs of individual projects.

Jenkins is a main tool during all the DevOps Life Cycle stages.

To use Jenkins you have to create a FreeStyle or Pipeline Project , put the Git Repository URL (GitHub link), Build (can be done or with cmake or with any other build tool like maven).The build App is then deployed on the testing server for testing and then on the deployment server for release.

There are some problems related to the Single Jenkins Server that's why there is Jenkins Distributed Architecture with Jenkins Master and many Jenkins Slave.Cause of the different environment for build an test Jenkins Slaves are generally required to provide the desired environment on the basis of Requests received from Jenkins Master.


3. Docker:

Before discussing about Docker let's talk a little bit about Microservices architecture.

Applications become easier to build and maintain when they are broken into smaller ,composable pieces which work together.Each component is developed separately and the application is then simply the sum of its constituent components.

Even at security level build simple components is better because the more complex the system is the more it is vulnerable, it is always better to divide a complex system into smaller simple systems and then after combine them together.

And at testing level also because in the Software Deveolpment Life Cycle (SDLC) there is a the corresponding Software Testing Life Cycle (STLC) where there is a test for every step of the Development from the simple function code (Unit Test) to the complex one .After that we have integration Testing that tests the Compatibility and Interaction between the different single components of the system (Integration Testing) and then there is the System testing.


So come back to your our microservices architecture, for each service or application there is a VM (Virtual Machine) so for example if we have 10 Applications we have to use 10 VMs.

And here comes Docker which is tool designed to make it easier to create , deploy and run applications by using Containers.With our example above at the place of using 10 VMs for the 10 Apps we can use one VM with 10 containers.One container for each application or microservice or component.

The system will be the Host OS (Operating System) where we can install one VM as Docker Engine and put Containers where are placed the Apps with all the binaries (BINS) and Libraries (LIBS).

Docker Containers are lightweight alternatives to virtual machines and it uses the host OS and you don't have to pre-allocate any ARM in containers.

To build a Docker Container we have to build first a Docker File.

The Docker File builds the Docker image (App Requirements) and that image contains all the project's code.You can run this image to create as many Docker Images (Process Runtime) as you want.

Then this image can be uploaded on DockerHub (like GitHub) which is a Remote Docker Image Platform and from there we can pull the image and build or create a Container(Run). So the Docker Image can be stored or in Docker Hub or in the local Repository.For the Docker Hub we have the Staging Server , Testing and Production Servers.

The Docker Containers are :

  • runtime instance of Docker Image
  • Isolated App platform
  • Contains everything needed to run the app
  • Can be built from one or more images

The is also Docker Compose which can run apps from multiple containers.


That's all for this article guys and will catch up for the next one.

The next time we will try mo make some application example.

Any Comment , Contribution or Correction is welcomed in the Knowledge Spirit.


Ka Hamady

Physicist and Electronic Engineer








Sayed mohamed ali

Laurea Magistrale LM presso Università della Calabria

3 年

molto interessante

要查看或添加评论,请登录

社区洞察

其他会员也浏览了