Skip to content

Latest commit

 

History

History
361 lines (238 loc) · 9.66 KB

webconsole.adoc

File metadata and controls

361 lines (238 loc) · 9.66 KB

Web Console

1. Overview

Web Console is a Red Hat Enterprise Linux 8 web-based graphical user interface designed for managing and monitoring your local system. The Web Console can also be extended to manage multiple servers located in your network.

Features of the Web Console include:

  • Managing user accounts

  • Managing and monitoring system services

  • Configuring network interfaces

  • Configuring firewall rules

  • Reviewing system logs

  • Managing virtual machines

  • Creating diagnostic reports

  • Setting kernel dump configuration

  • Configuring SELinux

  • Installing and Updating software

  • Managing System Subscriptions

  • more…​

The following exercises will cover some of the capabilities of the Web Console on RHEL 8, as well as basic installation and set up.

2. Getting Started

For these exercises, you will be using the host bastion as user root.

Use sudo to elevate your priviledges.

$ sudo -i

Verify that you are on the right host for these exercises.

# workshop-cockpit-checkhost.sh

You are now ready to proceed with these exercises.

3. Installation and Configuration

3.1. Packages and Services

For your convenience, the webconsole has already been installed and configured on bastion host. The steps for installation and setup are pretty simple and outlined below. Remember that this is provided as reference only.

ℹ️

Native command(s) to install and enable the Web Console

yum install -y cockpit cockpit-dashboard firewalld
systemctl enable --now cockpit.socket
firewall-cmd --add-service=cockpit --permanent
firewall-cmd --reload

3.2. Custom Ports

By default, the Web Console listens on port 9090 of a host. To make the system more accessible to students, an additional port of 443 was added to the configuration. This was done by creating a systemd drop-in config:

/etc/systemd/system/cockpit.socket.d/listen.conf
[Socket]
ListenStream=443

This configuration change required a systemctl daemon-reload, selinux update and a firewall rule addition. Remember that this is provided as reference only.

ℹ️

Native command(s) to enable the Web Console on port 443

systemctl daemon-reload
systemctl restart cockpit.socket

semanage port -m -t websm_port_t -p tcp 443

firewall-cmd --add-port=443/tcp
firewall-cmd --add-port=443/tcp --permanent

That completes the installation and configuration of the Web Console.

4. Webconsole Login

Your instructors (or workshop portal) may provide you with a unique link and special instructions to access the web-console on the bastion. It is PREFERRED that you use your local web browser.

Accept the various notifications about insecure ceritificates, and then login in.

Use the following URL:

And the following UserID and Password:

%ssh_username%
%ssh_password%
Cockpit Login

5. Webconsole Overview

After you successfully sign-on, you will land on the overview page which presents various artifacts about your system including:

  • CPU utilization

  • Memory Utilization

  • Disk I/O

  • Network traffic

Also make note that your userid has "Administrative Access", meaning that your userid is configured on the host as part of the "wheel" security group.

Cockpit Overview

6. Enable Persistent Metrics

It’s nice that certain statistics about your system are available for inspection, but by default the webconsole does NOT store statistics long term. For this, you need to install “Performance Co-pilot (pcp)”, the cockpit-pcp plugin and lastly enable "persistent metrics collection" in the webconsole.

Start by clicking on the link "Enable stored metrics".

Cockpit Enable Stored Metrics

If your system has not already had the Performance Copilot packages installed, a dialog box should have appeared to confirm the automatic install. In our case, the software is already installed and you can proceed to view some performance data by selecting "View Details" on the "Usage" card.

View Usage Details

Take a moment to review the available performance information. Since the workshop likely has not be up for very long, there is probably nothing interesting to see yet. Towards the end of the workshop, return to this page and see your performance data.

Performance Charts

To configure and enable stored metrics by hand, you can use follow the commands below.

ℹ️

Native command(s) to enable stored metrics

yum install -y cockpit-pcp
systemctl restart cockpit.socket

7. Change Performance Profile

RHEL 8 comes with several pre-canned performance tuning profiles from Tuned. Since this is a virtual machine, the default profile “virtual-guest” was selected. You can easily switch profile via the Web Console web UI. In this exercise, we will change the profile to “throughput-performance”

Cockpit Perf Profile

A dialog box will appear. Scroll and find "throughput-performance" and select.

Cockpit Perf Throughout

8. View Logs

Under the log section, you can inspect the system’s logs.

Cockpit Logs

Have a look at the search capabilities and notice that you can set criteria by:

  • Date

  • Severity

  • Service

Cockpit Logs Criteria

9. Network Management

Under the networking section, you can monitor and manage current networking activities and devices. You can create a network bond, team, bridge, and vlan all driven by the webconsle GUI.

Due to the nature of workshops, we refrain from making and saving changes to the network at this time but feel free to explore.

Cockpit Network

10. Firewall Management

Also under the networking section, you can configure your firewall rules.

For the next exercise, let’s enable a rule for NTP (Network Time Protocol). Begin by selecting the Networking category and "Edit rules and zones".

Cockpit Firewall

Now you should see a list of active services and ports. Proceed to select "Add services"

Cockpit Firewall Service

In the dialog box enter 'ntp' as the filter, select 'ntp' and hit "Add services".

Cockpit Firewall Dialog

11. Service Management

Now that you enabled a NTP firewall rule, let’s make sure an NTP service provider is enabled and running under the Web Console Services section.

Remember that RHEL 8 uses a provider called 'chrony' for ntp. So you can search for either 'chrony' or 'ntp'.

Cockpit Services

Turns out, chronyd is already enabled and active. Nothing to do here…​

Cockpit Services

12. Remote Node Management

As of RHEL 8.4, the "Web Console Dashboard" plug-in has been deprecated. The core functionality of being able to manage multiple nodes from a single interface has been intergrated into the webconsole base. Now adding additional nodes and selecting one to manage is simple and intuitive.

We begin by selecting the pull-down in the top-left corner.

Cockpit Services

Now it is only a matter of selecting 'Add new host' and entering a few data points.

Cockpit Services

Add the additional systems from your workshop cluster.

node1.example.com
node2.example.com
node3.example.com
Cockpit Add Nodes

Now when you hit the pull-down, you have complete access and managibility of the additional nodes.

Cockpit Remote Nodes

Go ahead and select node1 and then access a terminal session. Very handy!

Cockpit Remote Terminal

13. Conclusion

This concludes a short exercise with Web Console. Feel free to click through and explore other sections:

  • Under Accounts section, you can manage user accounts on your RHEL 8 server

  • Diagnostic Reports allows you to create sosreport for Red Hat support

  • Under Kernel Dump, you can enable/disable kdump

You will get an opportunity to manager Virtual Machines and Build System Images in later exercises.

14. Additional Resources

Red Hat Documentation

End of Unit