Practical Linux application deployment on desktops
Despite the fact that initially the Linux Deploy was conceived as an Android application, over time, other options appear in its implementation. With the advent of the Linux, Deploy CLI became an available number of possibilities that open up a new scope of this tool.
Deploy Linux CLI is an application with a command-line interface that is designed to automate the process of installing, configuring, and running GNU/Linux distributions, the chroot inside the container. The application can work both in conventional desktop Linux distributions, and mobile platforms based on the Linux kernel and, subject to the necessary dependencies (all dependencies can assemble statically). Application on Linux-distro run in a chroot environment, work in parallel with the primary system and comparable in speed. The Linux Deploy is based on Linux kernel system call, as a “guest” systems could be made only by Linux distributions.
The application can operate in two modes: as root (chroot) and without them (proof). In normal mode are available for all supported types of installation: install to a file on a drive partition (logical drive), POSIX compliant directory and memory (temps). The proof mode is available only in the installation directory, and also appears in some restrictions:
All users within the container have full access to the entire file system container, and all records and lists owner is the current user;
No access to privileged system operations, for example, the ping does not work, limit, etc.;
Applications can only work with numbers of network ports above 1024;
If your application uses in its work the chroot system call, then it must be run through a special utility, for example, fakechroot
fakechroot-p 2222/usr/sbin/sshd.
The application supports unattended installation (base system) and the initial configuration of the Linux distributions Debian, Ubuntu, Kali Linux, Arch Linux, Fedora, CentOS, openSUSE, Gentoo, and Slackware. Also, you can import any other system of prearranged rootfs-ahriva in tar format.gz, or tar xz. tar.bz2.
The application allows you to connect to the console of the installed system (container), as well as start and stop applications inside a container (it supports various systems initialization and startup scripts of their own). Each installation option saved in a separate configuration file, which is responsible for setting up each container. If necessary, you can run parallel containers. You can export the settings and the container itself as a roots-archive for latest deployment of this container without having to install and configure.
-
The idea is deploying Linux originated from a desire to get an easy and convenient tool for quick deployment of Linux-distribution, which could use for development purposes, testing or training, and then quickly remove it without making changes in the primary (host) Linux system and without risking its integrity. Proot program became possible to create containers to run Linux applications without requiring superuser (root), as well as use software emulation BECAUSE QEMU to run applications with different host architecture without the need to support the binfmt_misc kernel module.
-
It turned out that on my main work with the year 2011 used computers with Debian. Local developers periodically require the system on which to run and test your Web applications (mostly Java, PHP, Python). For these purposes, are usually used either virtual systems by VirtualBox, either in a local cloud Proxmox or Docker. The main disadvantage of VirtualBox is its insistence to computer resources, large size VDI disc image, relatively low speed and the likelihood of breakage of the VM image When the system shut down improperly. The downside to using “cloud” can be called a need for administrator himself serve user requests for the establishment of such systems, as well as expenditure cloud resources to secondary tasks. To work with Docker requires superuser privileges.
-
This month has been an experiment, LD-container replaced PHP developers to their virtual server. Two containers were prepared on the basis of Debian: Apache + PHP + OCI8 and Apache + PHP + MySQL + PhpMyAdmin. The containers placed on a shared network drive on a local area network, each packet size was approximately 150 MB.
That got the administrator:
Once prepared, the container can be deployed on a developer’s computer one command without the participation of the administrator.
Working with container does not require root permissions, so there is no risk of breakage of the primary system.
That got a developer:
-
Deploy, run and manage the system in the container is carried out without the participation of the administrator a single command;
The deployment container from predefined archives network in less than a minute;
Starting and stopping a container (the Web Server + Database) is instantaneous, no need to wait for the operating system startup;
There is no risk to damage the tank if you forgot to turn it off when you shut down your computer because a system image is a mere catalog without a proprietary file system;
The computer runs faster because resources are spent only on startup software in the container and not to the entire operating system (in this case about 50 MB, 500 MB in VirtualBox instead).
Health checks directly from the catalog of the IDE without having to fill it to the server, it is enough to connect the container to the correct directory on the host system.