In this article I will talk about the features of the Cockpit tool. Cockpit was created to facilitate the administration of the Linux OS. In short, it allows you to perform the most common Linux administrator tasks through a nice web interface. Cockpit features: install and verify system update and enable auto-update (patch process), user management (create/delete/change passwords, lock/superuser rights), disk management (create, edit lvm, create file system mounts), network setup (team, bonding, ip managing, etc.) .), managing systemd-unit-timers.
Interest in Cockpit is due to the release of Centos 8, where Cockpit is already built into the system and you only need to activate it with the “systemctl enable –now cockpit.service” command. Other distributions will require manual installation from the package repository. We will not consider the installation here, see
After installation, we need to go in the browser to port 9090 of the server on which Cockpit is installed (i.e.
We enter the usual login password from a local account and check the box "Reuse my password for privileged tasks" so that it is possible to run some commands on behalf of a privileged user (root). Naturally, your account must be able to execute commands via sudo.
After logging in, you will see a beautiful and clear web interface. First of all, switch the interface language to English, because the translation is just awful.
The interface looks very clear and logical, on the left you will see a navigation bar:
The starting section is called "system", where you can see information on the utilization of server resources (CPU, RAM, Network, Disks):
To view more detailed information, for example, on disks, simply click on the corresponding inscription and you will immediately be taken to another section (storage):
Here you can create lvm:
Choose a name for the vg group and the disks you want to use:
Give a name to lv and choose a size:
And finally, create the filesystem:
Please note that Cockpit will write the required line to fstab and mount the device. You can also write specific mount options:
This is what it looks like on the system:
Here you can expand/compress file systems, add new devices to the vg-group, etc.
In the "Networking" section, you can not only change typical network settings (ip, dns, mask, gateway), but also create more complex configurations, such as bonding or teaming:
This is how the finished configuration looks in the system:
Agree that setting up through vinano would be a little longer and more difficult. Especially for beginners.
In "services" you can manage systemd units and timers: stop them, restart them, remove them from startup. It's also very quick to create your own timer:
The only thing that was done poorly: it is not clear how often the timer starts. You can only see when it ran the last time and when it will run again.
In "Software updates", as you might guess, you can see all available updates and install them:
The system will notify us if a reboot is required:
You can also enable automatic system updates and customize the update installation time:
You can also manage SeLinux in Cockpit, create a sosreport (useful when communicating with vendors when solving technical problems):
User management is implemented as simply and clearly as possible:
By the way, you can add ssh keys.
And finally, you can read system logs and sort by importance:
We went through all the main sections of the program.
Here is a brief overview of the possibilities. Whether or not to use the Cockpit is up to you. In my opinion, Cockpit can solve several problems and reduce the cost of maintaining servers.
The main advantages:
- The threshold for entry into the administration of Linux OS is significantly reduced thanks to such tools. Almost anyone can perform standard and basic actions. Administration can be partially delegated to developers or analysts to reduce the cost of production and speed up work. After all, now you don’t need to type pvcreate, vgcreate, lvcreate, mkfs.xfs in the console, create a mount point, edit fstab and, finally, type mount -a, just click a couple of times
- You can offload Linux administrators and relieve them of routine so that they can focus on more complex tasks.
- You can reduce the number of human errors. Agree that it is more difficult to make a mistake through the web interface than through the console
Drawbacks I found:
- The limitation of the utility. You can only do basic operations. It is impossible, for example, to immediately expand lvm after increasing the disk from the virtualization side, you need to type pvresize in the console and only then continue working through the web interface. You cannot add a user to a specific group, you cannot change the rights of directories, analyze the space used. Would like more functionality
- The "Applications" section did not work correctly
- You can't change the color of the console. For example, I can only work comfortably on a light background with a dark font:
As we can see, the utility has a very good potential. If you expand the functionality, then the implementation of many tasks can become even faster and easier.
upd: it is also possible to manage multiple servers from one web interface by adding the necessary servers to the "Machines dashboard". The functionality, for example, can be useful when mass updating several servers at once. Read more in
Source: habr.com