Fleet (a distributed init system)

From Bauman National Library
This page was last modified on 17 December 2015, at 10:50.


fleet (disturbed init system) - is an instrument of initialization at Linux distributive - CoreOS - makes it easy to customize applications and manage high availability cluster from a single point. It works in conjunction with system initialization systemd each individual node. The system can also be used in other distributions, but for its use fleet must be installed and configured on each machine of cluster.


CoreOS - distribution of Linux, designed to perform large-scale deployments in a simple infrastructure. Based on Chrome OS, CoreOS supports easy system hosts and uses Docker containers for all applications . This system provides process isolation, and allows applications to easily navigate through the cluster.
For cluster management and configuration data between nodes CoreOS uses distributed repository of the "key-value" under the name etcd. Also, this component is a service discovery platform, which allows applications to dynamically adjusted based on publicly available information.
For claster launching planing and application managing uses fleet - disturbed init system.

System engineering

The main host system is relatively simple and precedes many of the common features of traditional servers. In fact, in CoreOS not even have a package manager. Instead, all the additional applications are run as docker-containers, which provides isolation, mobility and external management services.
When loading CoreOS reads a user-defined configuration file called cloud-config, to perform the initial setup. This file allows CoreOS connect with other users of the cluster, run the necessary services and reconfigure important settings. It is through this system CoreOS able to immediately connect to the cluster as a working unit.
Typically, a file cloud-config, at least according to the host, joining the existing cluster, and then tells the host to load two services: etcd and fleet. All these three operations are closely related; thanks to this new workflow host can connect to an existing server and run the tools necessary to configure and manage each nodom cluster. Overall, this is all the requirements to boot a node in the cluster.


Docker - a system at the level of containerization system LXC (also known as Linux containers), which uses kernel namespacing and control groups (cgroups) for process isolation.
Insulation helps to keep the environment clean and predictable application. One major advantage of this system - simple software distribution. Docker-container can be run independently of the operating system. This means that the container is collected on a laptop can work properly in a cluster and scale with a separate data center.
Docker allows you to distribute the software operating environment with all the necessary dependencies. Containers may work together with other containers, but act as a single server. The advantage of Docker-containers of virtualization is that it does not seek to imitate the Docker entire operating system, it implements only the components necessary to run the application. In general, concerning Docker has many advantages over the virtualization technology.
The CoreOS system uses Docker-containers for all software, except for a small set included in the basic software installation. This means that nearly all programs run within the container. At first it may seem inconvenient; yet this program greatly simplifies the equipment of the cluster the necessary tools. CoreOS system should be managed primarily at the cluster level, not at the level of individual servers.


Demon etcd used on each of the cluster hosts to storage and distribution data. It is needed to store configurations agreed and serves as a platform to launch services. This service discovery mechanism may be used for other services request information to adjust the configuration details. For example, when you run the load balancer it can request addresses etcd IP-several internal web servers.
Service etcd - storage type key-value, which can be used by each node to obtain data on the configuration, request information about the services running and publication of information that must be known to other members of the cluster.

On each node in the cluster has a separate client etcd, which interacts with other clients in a cluster and thus distributes and disseminates information.
Applications that need to retrieve information from the repository, just need to connect to etcd on the local machine. All data storage etcd be available for each unit regardless of where they are actually stored: each stored value is automatically reproduced for the entire cluster. The leader of the cluster is automatically selected.
To access the data etcd, as well as be able to read and modify them, you can use a simple interface HTTP / JSON (available on default) or utility etcdctl. Both of these methods are quite simple and intuitive.
It is important to understand that the HTTP interface is also available for applications running in Docker-containers. This means that when you set up separate containers may take into account the values stored in etcd.


Demon fleet is a distributed system initialization. It works by connecting to the system initialization systemd each individual node in the cluster. Fleet handles planning services based on user-defined criteria.
In fact, fleet is an interface for controlling each of these systems systemd cluster. This tool allows you to start or stop services, as well as receive information on the status of running processes in the whole cluster. However, the fleet has several useful functions, to forgive the execution of all these operations. Equipped with a mechanism for the distribution process, it can run services on less busy hosts.
You can also specify the conditions of accommodation services are running, that is, to indicate that the service should (or should not) work on a specific host, depending on where the hosts are located, what services are already running, etc.
As the fleet uses systemd to start local processes, each defining services file is systemd (with multiple user options). Suffice it once to transfer the files configuration tool fleet, to be used for the entire cluster.
This flexibility opens up many configuration options. For example, it is possible to make each container web server has been deployed on a single node. In the same way, you can deploy an auxiliary container only nodah that are running the parent container.
Any node can be used to manage the cluster using the utility fleetctl. This utility allows you to plan services and manage the nodes learn the general state of the systems. Program fleetctl - the main interface of the cluster.


Due to fleet users may see the cluster as a single unit instead of worrying about each individual server.[1]


  1. Amber:CoreOS system components