Continuous Deployment tools

Continuous Delivery, commonly referred to just by CD, is a software delivery approach adopted by IT companies to deliver user features in a faster, safer and continuous way.

The idea behind is to create a reliable and automated process which delivers software from the developer to the software product’s user. The goal is to have a constant flow of software changes into production, known as a CD Pipeline.

This is how a typical CD Pipeline flow looks like.

There are many CD Pipeline software tools which orchestrates the described flow, some are free while for some you need to pay; below we will briefly describe 3 of the most popular ones.


1. Jenkins

Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software.

Dependencies

  • Java Runtime Environment (JRE) version 8

Hardware requirements

Minimum:

- 256 MB of RAM

- 1 GB of drive space

Recommended:

- 1 GB of RAM

- 50 GB of drive space

Architecture

The architecture of Jenkins is based on a distributed computing model which consists of 2 components :

- Jenkins Server - it is the base installation of Jenkins and it is responsible for hosting the GUI, orchestrating and also executing the build jobs;

- Jenkins Node/Slave/Build Server - devices which can be configured to act as build job executors on behalf of the Master.

Installation Steps for Linux OS

— Add Jenkins repository to your system

cd /tmp && wget -q -O — https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
echo ‘deb https://pkg.jenkins.io/debian-stable binary/’ | sudo tee -a /etc/apt/sources.list.d/jenkins.list

— Update your system repository

sudo apt update

— Install Jenkins

sudo apt install jenkins

Now Jenkins should be available on your system on the default port 8080.

Open Jenkins in your browser( http://localhost:8080 ), you will be asked for the initial password of the admin user.

You can find it in the file /var/lib/jenkins/secrets/initialAdminPassword .

Now you are set, and can start building you CI/CD flows. These are some samples on how the GUI looks.

Sample Pipeline visual flow
Sample build job output

Advantages:

  • scalable due to it’s Master/Slave architecture;
  • includes a REST XML/JSON API;
  • highly extendable, due to the plugins, which add many functionalities;
  • large and active online community which is a good resource for support and use cases.

Disadvantages:

  • no analytics;
  • interface outdated compared with other newer tools.

2. TeamCity

TeamCity is another commercial CI/CD server, this time from the JetBrains company. It is known for its incredibly simple setup and beautiful user interface. It has a robust set of features out of the box and a growing plugin ecosystem.

Dependencies

  • Java Runtime Environment (JRE) version 8

Hardware requirements

With a modest server (3.2Gb RAM, 3.2 GHz dual core CPU, single HDD and 1Gb network adapter) you can get the following:

  • 60 projects and 300 build configurations (with one forth being active and running regularly);
  • more than 300 builds a day;
  • about 2Mb log per build;
  • 50 build agents;
  • 50 web users and 30 IDE users;
  • 100 VCS roots (mainly Perforce and Subversion using server checkout), average checking for changes interval is 120 seconds;
  • more than 150 changes per day;
  • the database (MySQL) is running on the same machine;
  • TeamCity server process has -Xmx1100m -XX:MaxPermSize=120m JVM settings.

The agent requirements are basically determined by the builds that are run.

Architecture

The TeamCity Server responsibility is to monitor all the connected build agents, distribute queued builds to the agents based on compatibility requirements, and report the results. The build process is executed by the Build Agents which can have different platforms, operating systems, and pre-configured environments that you may want to test your software on.

All information on the build results (build history and all the build-associated data except for artifacts and build logs), VCS changes, agents, build queue, user accounts and user permissions, etc. are stored in a database.

Installation Steps for Linux OS

Use the TeamCity<version number>.tar.gz archive to manually install TeamCity bundled with Tomcat servlet container.

Download TeamCity archive from JetBrains site:https://www.jetbrains.com/teamcity/download/
tar -xfz TeamCity<version number>.tar.gz
<TeamCity home>/bin /runAll.sh [start|stop]

On the first TeamCity start, you can select the SQL database type which will store build history, users, build results and some run time.

By default, TeamCity runs on http://localhost:8111/ and has one registered build agent that runs on the same computer.

Advantages:

  • ease of use/setup;
  • great interface;
  • built-in features;
  • support;
  • offers a RESTful API;
  • well documented;
  • secured out of the box;
  • installation and configuration is quick and easy.

Disadvantages:

  • limited integration;
  • is a commercial tool;
  • the community is small but is growing.

3. GoCD

GoCD is an open-source Continuous Integration and Continuous Delivery tool.

Dependencies

  • Java Runtime Environment (JRE) version 8

Hardware Requirements

  • Server Hardware

— RAM : minimum 1GB, 2GB recommended

— CPU : minimum 2 cores, 2GHz

— Disk : minimum 1GB free space

  • Agent Hardware

— RAM : minimum 128MB, 256MB recommended

— CPU : minimum 2GHz

Architecture

- GoCD Server provides the user interface and the work for the agents

- GoCD Agents run the commands received from the server.

- Stages/Jobs/Tasks:

Installation Steps for Linux OS

echo “deb https://download.gocd.org /” | sudo tee /etc/apt/sources.list.d/gocd.list
curl https://download.gocd.org/GOCD-GPG-KEY.asc | sudo apt-key add -
add-apt-repository ppa:openjdk-r/ppa
apt-get update
apt-get install -y openjdk-8-jre
apt-get install go-server
apt-get install go-agent
/etc/init.d/go-server [start|stop|status|restart]
/etc/init.d/go-agent [start|stop|status|restart]

By default, GoCD runs on http://localhost:8153 .

Advantages:

  • open source;
  • easy to install;
  • very good and detailed documentation;
  • friendly GUI;
  • GoCD’s value stream map shows your entire path to production in a single view;
  • nice overview of the pipeline structure;
  • GoCD streamlines your CD workflow on popular cloud environments such as Kubernetes, Docker, AWS and more;
  • it helps you troubleshoot a broken pipeline by tracking every change from commit to deploy in real time.

Disadvantages:

  • you need to install minim one agent;
  • no main console to show all the jobs execution;
  • in the pipeline configuration you have to create one task for each command you want to execute;
  • to install a plugin you have to put the .jar file into <go-server-location>/plugins/external and restart the Go server;
  • small community.

Conclusions

These are just 3 examples, but there are many other CD related tools and choosing the right one for your application might be challenging. Here are some topics that you could go through to make the choice easier :

Open source or commercial — Open source allows you to look under the hood, and also tends to implement new features faster, but you have only your wits and the corresponding community if something breaks. For paid software you get the vendor’s support, so it is easier to implement and safer to run.

Hosted in house or Saas — If you want to integrate with a third party company or just don’t want to care about operating and scaling, then you might prefer Saas. On the other hand, if security is your main concern or you have legal constraints, a self-hosted solution is best.

Specific requirements — The technologies used to develop your software products or other requirements specific to your organisation should narrow down the list.

This short overview was done together with my colleagues Vlad Mihai and Madalin Mitu. If you would like to talk more about this topic, you can find us anytime via LinkedIn. We’ll be happy to connect on anything that relates to build engineering, continuous delivery, continuous deployment processes, tools or scripting languages.