Server administration with Cockpit

Fly by Sight

System Insights

The dashboard (Figure 1) provides a quick overview of CPU usage, memory consumption, and the status of other hardware components. Here, you can add more servers or edit the existing ones by clicking the plus symbol. You can toggle back and forth between the configured servers quite quickly. If no user name is specified, Cockpit prompts you for one during the login process. If errors occur, messages to that effect are displayed.

Figure 1: Cockpit gives admins a useful overview of multiple servers and their hardware components.

On the left side, the Cockpit's graphical web interface lists the existing or installed services and applications. Admins can see a wide variety of parameters. The Logs section contains error messages from the connected machines. You can filter error messages by Severity , with a choice of Everything , Critical , Notice , or Debug . When you click on such a message, additional details are displayed.

The Storage entry takes you to a central display that you can use to keep track of hard drive read and write speeds. You can also check out an overview of mounted mass storage devices with their partitions and remaining capacity. Another area shows data about existing NFS mounts. This section also usefully provides logfiles from the mounted storage systems.

In the Networking section, Cockpit tells you about the current network throughput on a server, also detailing the configured firewall rules, which you can edit. The network interfaces are also shown, including details about MTUs or IPv4 and IPv6 support.

New: Virtual Machines

One of the new features in Cockpit since the last article is the Virtual Machines option, where you can create and manage virtual machines. Under the hood, Cockpit relies on KVM/Qemu, and Libvirt. To use this feature, you also need to install the cockpit-machines package and set up the Libvirt daemon:

# dnf install libvirt cockpit-machines
# systemctl enable libvirtd --now
# systemctl enable cockpit.socket --now

Once the service is running, you can set up a new virtual machine by pressing the Create New VM button. Managing virtual machines in Cockpit offers a central advantage over the Virtual Machine Manager (virt-manager): You do not need a graphical interface on the server, which is probably one of the reasons Cockpit replaced virt-manager in Fedora, RHEL, and CentOS [7].

In the Pod

Wherever you find virtual machines, you normally don't have to look hard to find containers. The Podman Container section (Figure 2) is where Cockpit groups various options for Red Hat's variant of Docker. Unlike Docker, Podman doesn't use root privileges or a central daemon; otherwise, it is compatible with Docker.

Figure 2: Instead of Docker, Cockpit uses Podman as a container manager.

The user interface in Cockpit makes using Podman even easier. Pressing the Get new image link provisions Docker images from the official repository. In the example in Figure 2, I installed the Nextcloud image from Own Your Bits [8].

Various services can be started and stopped from the Services sidebar item. Updates lets you check for new updates for the packages that make up Cockpit; further modules for Cockpit can be installed in Applications . The tools include the Image builder extension [9], which admins should be able to use to create image files (e.g., an Anaconda boot image or Live CDs). For reasons hitherto unknown, this feature did not work in our lab.

Even though admins can complete some tasks in the intuitively designed interface, you still have to switch to a terminal from time to time. Thankfully, Cockpit also comes with a terminal, found in the Terminal section on the left side of the web interface.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Server administration using Cockpit
    Cockpit makes it easy to manage Linux servers: Four mouse clicks in the browser restart the crashed web server, and four more interconnect the server's network interfaces. Pilots flying in this cockpit, though, have to cope with a few limitations.
  • Fedora 22 Server Edition (64-bit)
    Warning: Fedora 22 Server is not a Live distribution. Please run in a virtual environment for test purposes.

    The Fedora community unveils Fedora 22 Server, an operating system designed with various data center technologies to assist you in controlling your infrastructure and services. Server roles allow deployment and management of prepared roles with the Rolekit tool. DNF (Dandified Yum) replaces Yum as the default packaging tool. The web-based Cockpit server manager lets you access various subsystems across multiple servers from a single interface. Cockpit features include:

    • systemd service management
    • Journal log viewer
    • Storage configuration, including LVM
    • Docker container management
    • Basic network configuration
    • local user management
  • Fedora 33 Server (full install)
    Fedora Server is an open source short-lifecycle server operating system sponsored by Red Hat and supported by a robust community.
  • Fedora 21 Server Edition
    The Fedora Project is a free software community sponsored by Red Hat. With Fedora's rapid release schedule, you get the latest in virtualization, networking, and other technologies. The 64-bit Server version on this DVD is aimed at system administrators and is not a Live distro.
  • Monitoring containers
    A monitoring system helps avoid unpleasant surprises during operations, but admins need to modify existing solutions to fit a containerized world.
comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=