Cockpit on Debian 8.2

For a while now, the Cockpit team has been thinking about how to get Cockpit running on Debian. Last weekend at the systemd conference 2015 we had the opportunity to talk with a few Debian maintainers and made some progress.

The good news: it works!

Cockpit on Debian 8.2
Cockpit 0.83 on Debian – System overview

Inside a Debian 8.2 system we managed to download Cockpit from git, then built and ran it. Thanks Michael Biebl!

Building Cockpit 0.83 on Debian 8.2

The steps aren’t really different from setting up a Cockpit build on Fedora, so we can follow HACKING.md.

On Debian, we used these dependencies to be able to compile cockpit:

apt-get install npm autotools autoconf automake intltool libssh-dev \
 libssl-dev zlib1g-dev libkrb5-dev libxslt1-dev docbook-xsl \
 libkeyutils-dev libglib2.0-dev libsystemd-dev libpolkit-agent-1-dev \
 libpcp3-dev gdb libjson-glib-dev libpam-dev xsltproc \
 libpcp-import1-dev libpcp-pmda3-dev nodejs-legacy

There is one more dependency which is related to the documentation and should be installed without its recommended packages, otherwise it will pull in a lot of extra packages:

apt-get --no-install-recommends install xmlto

The package nodejs-legacy has to do with a binary name conflict which needs to be looked at upstream.

Docker

In order to run the docker container management in Cockpit, we only needed to install docker on the target system – this isn’t necessary for the build.

I added deb http://ftp.de.debian.org/debian/ stretch main to  /etc/apt/sources.listand then ran apt-get install docker.io.

What works, issues

A lot of Cockpit seems to work out of the box on Debian. This doesn’t come as a big surprise, since Cockpit heavily utilizes systemd and systemd is part of Debian 8.2. So all parts that rely on systemd aren’t an issue: System overview, changing the hostname, datetime settings (manual or use an ntp service), shutdown/restart, journal, services. We can also use the terminal (console in the browser with a full shell session), configure networking (interfaces with ip addresses, bridges, bonds, vlans, et cetera) and work with docker containers if docker is installed. Awesome!

Cockpit Networking
Cockpit 0.83 on Debian – Networking
Cockpit Services
Cockpit 0.83 on Debian – Services
Cockpit Journal
Cockpit 0.83 on Debian – Journal
Cockpit 0.83 on Debian - Docker
Cockpit 0.83 on Debian – Docker

Account management seems to work (including managing the ssh keys) with only a cosmetic issue: the real names for an account aren’t parsed/displayed correctly. It would be great to have a dbus api for local accounts instead of having to touch files on the disk directly!

Privilege escalation seems to work differently, so we’ll need to take a closer look at non-root use of Cockpit on Debian. The way Cockpit checks for permissions is described in the documentation.

The storage panel doesn’t work at all on Debian, since storaged currently isn’t supported on Debian. I’m not sure how much effort it would be to get that working.

What next?

The Cockpit build system requires a few changes, since it currently only supports rpm-based distributions. What all this should lead to is continuous integration and continuous delivery into Debian unstable. Once we can build packages and run the integration tests, Debian should be one of the checks that are run on all pull requests before they are merged into master.

It would also be great to have a package maintainer for Cockpit releases, who can also keep an eye on the feature roadmap (see the trello board) to be aware of possible dependency conflicts early in the development process. Actual packaging shouldn’t be difficult, considering Cockpit automates as much as possible on that front.