Exercise 1.0 - Intro to Cockpit

Return to Workshop

cockpit

Cockpit

A remote manager for GNU/Linux servers

Cockpit is a server manager that makes it easy to administer your GNU/Linux servers via a web browser.

Cockpit makes it easy for any sysadmin to perform simple tasks, such as administering storage, inspecting journals and starting and stopping services.

Jumping between the terminal and the web tool is no problem. A service started via Cockpit can be stopped via the terminal. Likewise, if an error occurs in the terminal, it can be seen in the Cockpit journal interface.

You can monitor and administer several servers at the same time. Just add them with a single click and your machines will look after its buddies.

Cockpit and Docker

Cockpit also makes it easy to monitor and administer Docker containers running on Cockpit-managed servers such as Project Atomic hosts.

  • Monitor resources consumed by containers

  • Adjust resources available to containers

  • Resource limits enforced by the CGroup subsystem in the Linux kernel

  • Adjust CPU shares

  • Assign memory limits

  • More CGroup policy controls to come

  • Stop, Start, Delete and Commit container instances

  • Run and Delete container images

Cockpit

Step 0:

Accessing the Cockpit web UI

Use this URL to access the Cockpit console on your node, just change the <workshop name> and <student number>. Ask your instructor for these values once the workshop lab begins.

https://example.0.redhatgov.io:9090
Login to Cockpit
Login to Cockpit
Username: ec2-user

Password: <to be provided>

After logging in, you should see the Cockpit web UI.

Step 1:

System: Shows information about the system that Cockpit is running on. This includes CPU usage, memory usage, disk I/O, and network traffic, as well as hardware and operating system details.

Click:  Show Fingerprints | System Time | Power Options | Performance Profile
System

Step 2:

Services: Shows the systemd services running on the Cockpit server. You can see which are active/enabled or inactive. You can also see other systemd features: Targets, sockets, timers, and paths.

Click:  Targets | System Services | Sockets | Timers | Paths
Services

Step 3:

Containers: Lists all images available on the system, all running and non-running containers, combined CPU & memory usage graphs, and a storage usage bar.

Click to Launch a image
Click: Get new image
Containers

Step 4:

Search & Download for Fedora

Search: fedora -> download
Search for Fedora

Step 5:

Run the Fedora image

Click: Run
Run the Fedora image

Add a command to run the image. Sleep is generic enough command.

Command: sleep 999
Run with options

Step 6:

Click on the newly created container [>]

Image Detail

Expand the view and see all of the metadata about the container. Shows the state, the command executed, the container’s and image’s IDs, a timestamp, as well as the container’s own terminal:

Image Detail

Step 7:

Tools: (Terminal)
Subscriptions: Displays what Red Hat products are installed and subscribed.
Accounts: Shows which administrative (root) and other users have accounts on the system.
Diagnostic report: Collects system configuration and diagnostics information and prepares a report in an XZ format.
Terminal: Opens a Terminal (command line) session to the Cockpit system. From there, you can run any commands available to the user you are logged in as. For example, as cockpit, you could run docker commands.

Command:  sudo docker ps -a
Terminal

Step 8:

When your done taking a look around go ahead and stop & delete the container.

Click:  Stop
Stop
Drop Down: Select Everything to Refresh the page and display the exited container image
Refresh
Select the [Trash] icon to remove the image
Trash
Confirm the delete
Delete

Workshop Details

Domain Red Hat Logo
Workshop
Student ID

Return to Workshop