📜 ⬆️ ⬇️

Overview of the new Calculate Scratch Server distribution

Calculate Linux

Having played enough with the settings of desktops and Calculate Directory Server (CDS) assemblies, it became clear that most administrators need something more. More precisely, exactly the opposite - more often only a part of the stated capabilities is required. A year ago, we released the first version of Calculate Linux Scratch - the minimum distribution for a desktop computer, which successfully expanded the desktop lineup. Especially for it, an interactive system assembly mechanism was developed. Interactive, because you can change the set of ISO image programs on your own, working directly in the system and testing the result. Later, this technology has spread to all other distributions.
It's server time. Yes, you can install Calculate Directory Server (CDS) and get support for many services out of the box with LDAP support. But in practice, only an office computer can use such a number of services. CDS doesn’t work well as a web server, worse as a firewall. This is due to the abundance of pre-installed software. Calculate Scratch Server (CSS) is called to solve such a problem.

So what is Calculate Scratch Server?

This distribution, like other Calculate Linux is based on Gentoo . For those who are not aware of Gentoo, this is a proven time-meta-distribution kit, with a large community, an abundance of documentation, its own traditions and, as a result, predictability of development and the quality of supported packages. Gentoo allows you to manage the system on your own. The Portage system, largely borrowed from FreeBSD , allows you to build packages from sources, optimizing for your hardware, with the choice of the functionality of each package by simply turning on USE flags. In addition, in Portage, as a rule, there are several versions of each package, significantly simplifying the choice of software.
In a nutshell, Calculate Scratch Server is stage3 (the gentoo minimum working image) with the new install-install utility and the required minimum of packages for running and installing from a livecd image.
If you look deeper, CSS embodies all the practices of Calculate 2 utilities. But first things first.



Calculate Scratch Server represents only the basic set of programs. To perform the necessary tasks, you will need to install packages. You can execute it directly by booting from livecd in “builder” mode. After that, you can perform the necessary installation and software update. At the end, it is enough to execute the 'calculate --iso' command to create a new system image. The image will be created in the / usr / calculate / share / linux directory. It is advisable to mount a free disk partition in this directory, otherwise the computer’s memory may not be enough. The same operation can be done by pre-installing the system on the hard disk and booting into the builder mode. Even easier - working with flash drives. In this case, you only need to update the squashfs image by executing 'calculate - rebuild'.


In the figure, I installed the system in builder mode, executed the cl-builder to go to isolated chroot mode, installed the package and created a new image. The package was installed in a separate aufs2 layer. Thus, no temporary files are included in the final image.
The resulting image is deployed by the 'cl-install' utility with sections to install. If you recorded the image before changing the root password, the installation will take place without asking for a password.



Templates are in their essence scripts for configuring application configuration files for which Calculate utilities work. You can read more about them in the following guide , but here I will briefly describe the principle of their operation. Imagine a Samba server that you configured some time ago. You do not remember for what and what parameter settings have changed, whether everything will work with the proposed update. Patterns are designed to solve similar problems. You create a file with a settings template with the extension '.clt' (Calculate Linux Templates), placing it directly in the directory with the configuration file. It specifies the type of the configuration file, as well as the parameters that you want to change with the comments. Using the cl-templates utility you can test how smb.conf will be updated. The template file, together with the original file, will be converted to XML format, after which they will be merged with subsequent recording of the modified settings file.
The basis of the templates are variables. Variables are divided by type and can contain both a single value and an array of values.


Templates can also contain functions whose values ​​can be calculated during template processing.
An example of a KDM configuration template file can be found here .


Maintaining a system with a small amount of software is a simple task. Portezhy perfectly cope with their responsibilities. However, changing the GCC, GLIBC and other toolchain packages requires rebuilding all the packages. Simplify the task can install the update in a dedicated section. Installing the server in a dedicated section takes 1-2 minutes. The main settings will be transferred from the current system, additional settings will be restored from templates. After rebooting, the server will continue its work.

Auto update settings

As new programs are released, you will install new packages on the server. It is important that after running the dispatch-conf utility, you correctly replace the outdated configuration files. The new mechanism for auto-updating of settings can help this very much. Settings files are not copied, but are generated again taking into account the version of the package being installed, as well as your templates.


The figure shows how after installing the kdm package, configuration files for this package are generated by three utilities that previously participated in its configuration.

Release date

The new Calculate Scratch Server distribution kit will be included in Calculate Linux 10.9, but really interesting features will appear only in 11.0. By this time we plan to split the calculate-server server setup package into separate packages: calculate-ldap, calculate-samba, calculate-mail, calculate-ftp, calculate-jabber, calculate-dns, calculate-dhcp, etc. At the same time, it is as easy to configure Calculate Scratch Server as the directory server.

Source: https://habr.com/ru/post/102095/

All Articles