Using Cockpit on CentOS

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

Cockpit is a new tool shipped with CentOS 8 that allows server management, including container management. This lab will allow you to become more familiar with the tool and think about its use cases.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install Cockpit

Given that we have a bare CentOS system, we need to install cockpit. Run the following to get the right software on the system:

yum install cockpit -y
Create the Required User

Add the user trevor with the following information:

Full Name: Trevor McTavish
User Name: trevor
Password: P1n3h34d!!

Ensure the user is a member of the wheel group.

Install the Required Plugin to Manage Containers in Cockpit

The package required is cockpit-podman, so we can install it by running:

yum install podman cockpit-podman -y

Once installed, we need to restart cockpit to make sure the new software is recognized:

systemctl restart cockpit
Start an `rsyslog` Container

Find the docker.io/camptocamp/rsyslog-bin container, download it, and start the image.

Additional Resources

You've been tasked with using Cockpit to set up a new server in your environment. Obviously the first thing you need to do is install Cockpit. Once that's complete, you need to add Trevor McTavish to the server so he can help manage your container environment. Speaking of containers, go ahead and start a rsyslog container so new containers can use it for remote logging.

Here are the values to use for our trevor user:

  • Full Name: Trevor McTavish
  • User Name: trevor
  • Password: P1n3h34d!!

Since he is going to help manage containers, add him as an administrator.

IMPORTANT: Please allow a few extra minutes for the lab to provision fully before connecting in via ssh. The server has been modified to serve cockpit on port 443, so just access it using https:<IP_ADDRESS>.

  • Choose Advanced..., then Accept the Risk and Continue.. Once logged in, clickTurn on administrative access.
  • When you first go into the Podman containers section, you will be prompted to "Start podman." After that, you'll have to refresh the page.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?