
Continuous Deployment is a special approach in software development that is used to quickly, securely and efficiently implement various functions in software.
The main idea is to create a reliable automated process that allows the developer to quickly provide the user with a finished product. At the same time, permanent changes are made to the production - this is called a continuous pipeline (CD Pipeline).
Skillbox recommends: Practical course "Mobile Developer PRO" .
')
We remind: for all readers of "Habr" - a discount of 10,000 rubles when writing to any Skillbox course on the promotional code "Habr".

To control the flow, you can use a wide range of tools, among which there are both paid and completely free. This article describes the three most popular solutions among developers that may be useful to every programmer.
Jenkins
Fully stand-alone open source automation server. You should work with him to automate all kinds of tasks related to building, testing, supplying or deploying software.
Minimum PC requirements:
- 256 MB of RAM, 1 GB of file space.
Optimally:
- 1 GB of RAM, 50 GB of hard disk space.
To work, you will need additional software - Java Runtime Environment (JRE) version 8.
The architecture (distributed computing) is as follows:

Jenkins Server is a setup that is responsible for the GUI hosting, as well as the organization and execution of the entire assembly.
Jenkins Node / Slave / Build Server are devices that can be configured to perform build work on behalf of the Master (master node).
Installation for LinuxFirst you need to add the Jenkins repository to the system:
cd / tmp && wget -q -O - pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - echo 'deb pkg.jenkins.io/debian-stable binary /' | sudo tee -a /etc/apt/sources.list.d/jeUpdate package repository:
sudo apt updateInstall Jenkins:
sudo apt install jenkinsAfter this, Jenkins will be available in the system on the default port 8080.
To test the operation, you need to open the
localhost : 8080 address in the browser. Then the system prompts you to enter the initial password of the user with root-rights. This password is in the / var / lib / jenkins / secrets / initialAdminPassword file.
Now everything is ready for work, you can start creating CI / CD streams. The graphical interface of the working environment is as follows:


Jenkins strengths:
- the scalability that the Master / Slave architecture provides;
- availability of REST XML / JSON API;
- the ability to connect a large number of extensions through plug-ins;
- active and constantly developing community.
Minuses:
- there is no analytical unit;
- not too user-friendly interface.
Teamcy
Commercial development from the company JetBrains. The server is good for easy setup and a great interface. In the default configuration there are a large number of functions, the number of available plug-ins is constantly increasing.
It requires Java Runtime Environment (JRE) version 8.
Server requirements for noncritical hardware:
- RAM - 3.2 GB;
- processor - dual core, 3.2 GHz;
- communication channel with a capacity of 1 Gb / s.
The server allows to achieve high performance in the work:
- 60 projects with 300 build configurations;
- allocating 2 MB per build log;
- 50 build agents;
- the ability to work 50 users in the web version and 30 users in the IDE;
- 100 external SCR connections, usually Perforce and Subversion. The average change time is 120 seconds;
- more than 150 modifications per day;
- work with the database on a single server;
- JVM server process settings: -Xmx1100m -XX: MaxPermSize = 120m.
Requirements for the agent due to working assemblies. The main task of the server is to track all connected agents and distribute assemblies from the queue to these agents based on compatibility requirements, with reporting results. Agents have different platforms and operating systems, plus a preconfigured environment.
All information about the results of the assembly is stored in a database. First of all, it is history and other similar data, VCS changes, agents, build queues, user accounts and user permissions. The database does not include only assembly logs and artifacts.
Installation for LinuxTo manually install TeamCity with the Tomcat servlet container, use the TeamCity archive: TeamCity .tar.gz. You can download
it from here .
tar -xfz TeamCity.tar.gz
/ bin / runAll. sh [start | stop]
When you first start you need to select the type of database in which data about the assembly will be stored.

The default configuration runs on
localhost : 8111 / with one registered build agent running on the same PC.
TeamCity strengths:
- easy setup;
- convenient interface;
- a large number of built-in functions;
- support;
- there is a RESTful API;
- good documentation;
- good security
Minuses:
- limited integration;
- This is a paid instrument;
- a small community (which, however, is growing).
Gocd
An open source project that requires the Java Runtime Environment (JRE) version 8 for installation and operation.
System requirements:
- RAM - 1 GB minimum, better more;
- processor - dual core, with a core frequency of 2 GHz;
- hard drive - at least 1 GB of free space.
Agent:
- RAM - at least 128 MB, more is better;
- The processor is at least 2 GHz.
The server provides agents and provides a convenient interface for the user:

Stages / Jobs / Tasks:
Installation for Linuxecho “deb download.gocd.org /” | sudo tee /etc/apt/sources.list.d/gocd.list
curl 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 works on
localhost : 8153.
GoCd strengths:
- open source;
- simple installation and configuration;
- good documentation;

- the ability to step-by-step display the GoCD deployment path in one view:

- Excellent display of the pipeline structure:

- GoCD optimizes CD workflow in the most sought after cloud environments, including Docker, AWS;
- The tool gives the opportunity to correct faults in the pipeline, for which there is tracking of every change from commit to deployment in real-time mode.
Minuses:
- need at least one agent;
- no console to display all completed tasks;
- to execute each command, you need to create one task for the pipeline configuration;
- To install the plugin, you need to move the .jar file to <go-server-location> / plugins / external and restart the server;
- relatively small community.
As output
These are just three tools, in fact, they are much more. It is difficult to choose, so be sure to pay attention to additional aspects.
The open source tool gives you the opportunity to understand what it is, plus more quickly add new features. But if something does not work, then you have to rely only on yourself and the help of the community. Paid tools provide support that can sometimes be critical.
If security is the most important thing, you should work with a local tool. If not, then choosing a SaaS solution is a good option.
And the last thing: in order to ensure a truly effective process of continuous deployment, it is necessary to form criteria, the specificity of which will make it possible to narrow the range of choice of available tools.
Skillbox recommends: