Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Managing software and services with Cockpit

#1
Managing software and services with Cockpit

<div><p>The Cockpit series continues to focus on some of the tools users and administrators can use to perform everyday tasks within the web user-interface. So far we’ve covered <a rel="noreferrer noopener" aria-label="introducing the user-interface (opens in a new tab)" href="https://fedoramagazine.org/cockpit-and-the-evolution-of-the-web-user-interface/" target="_blank">introducing the user-interface</a>, <a rel="noreferrer noopener" aria-label="storage (opens in a new tab)" href="https://fedoramagazine.org/performing-storage-management-tasks-in-cockpit/" target="_blank">storage</a> and <a rel="noreferrer noopener" aria-label="network management (opens in a new tab)" href="https://fedoramagazine.org/managing-network-interfaces-and-firewalld-in-cockpit/" target="_blank">network management</a>, and <a rel="noreferrer noopener" aria-label="user accounts (opens in a new tab)" href="https://fedoramagazine.org/managing-user-accounts-with-cockpit/" target="_blank">user accounts</a>. Hence, this article will highlight how Cockpit handles software and services.</p>
<p> <span id="more-29637"></span> </p>
<p>The menu options for Applications and Software Updates are available through Cockpit’s PackageKit feature. To install it from the command-line, run:</p>
<pre class="wp-block-preformatted"> sudo dnf install cockpit-packagekit</pre>
<p>For <a rel="noreferrer noopener" aria-label="Fedora Silverblue (opens in a new tab)" href="https://silverblue.fedoraproject.org/" target="_blank">Fedora Silverblue</a>, <a rel="noreferrer noopener" aria-label="CoreOS (opens in a new tab)" href="https://getfedora.org/en/coreos/" target="_blank">Fedora CoreOS</a>, and other ostree-based operating systems, install the <em>cockpit-ostree</em> package and reboot the system:</p>
<pre class="wp-block-preformatted">sudo rpm-ostree install cockpit-ostree; sudo systemctl reboot</pre>
<h2>Software updates</h2>
<p>On the main screen, Cockpit notifies the user whether the system is updated, or if any updates are available. Click the <strong>Updates Available</strong> link on the main screen, or <strong>Software Updates</strong> in the menu options, to open the updates page.</p>
<h3>RPM-based updates</h3>
<p>The top of the screen displays general information such as the number of updates and the number of security-only updates. It also shows when the system was last checked for updates, and a button to perform the check. Likewise, this button is equivalent to the command <strong>sudo dnf check-update</strong>.</p>
<p>Below is the <strong>Available Updates </strong>section, which lists the packages requiring updates. Furthermore, each package displays the name, version, and best of all, the severity of the update. Clicking a package in the list provides additional information such as the CVE, the Bugzilla ID, and a brief description of the update. For details about the CVE and related bugs, click their respective links.</p>
<p>Also, one of the best features about Software Updates is the option to only install security updates. Distinguishing which updates to perform makes it simple for those who may not need, or want, the latest and greatest software installed. Of course, one can always use <a rel="noreferrer noopener" aria-label="Red Hat Enterprise Linux (opens in a new tab)" href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux?intcmp=701f2000001OEGhAAO" target="_blank">Red Hat Enterprise Linux</a> or <a rel="noreferrer noopener" aria-label="CentOS (opens in a new tab)" href="https://www.centos.org/" target="_blank">CentOS</a> for machines requiring long-term support.</p>
<p>The example below demonstrates how Cockpit applies RPM-based updates.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/11/managing-software-and-services-with-cockpit.gif" alt="Running system updates with RPM-based operating systems in Cockpit." class="wp-image-29642" /></figure>
<h3>OSTree-based updates</h3>
<p>The popular article <a rel="noreferrer noopener" aria-label="What is Silverblue (opens in a new tab)" href="https://fedoramagazine.org/what-is-silverblue/" target="_blank">What is Silverblue</a> states:</p>
<blockquote class="wp-block-quote">
<p>OSTree is used by rpm-ostree, a hybrid package/image based system… It atomically replicates a base OS and allows the user to “layer” the traditional RPM on top of the base OS if needed.</p>
</blockquote>
<p>Because of this setup, Cockpit uses a snapshot-like layout for these operating systems. As seen in the demo below, the top of the screen displays the repository (<em>fedora</em>), the base OS image, and a button to <strong>Check for Updates</strong>.</p>
<p>Clicking the repository name (<em>fedora</em> in the demo below) opens the <strong>Change Repository</strong> screen. From here one can <strong>Add New Repository</strong>, or click the pencil icon to edit an existing repository. Editing provides the option to delete the repository, or <strong>Add Another Key</strong>. To add a new repository, enter the name and URL. Also, select whether or not to <strong>Use trusted GPG key</strong>.</p>
<p>There are three categories that provide details of its respective image: Tree, Packages, and Signature. <strong>Tree</strong> displays basic information such as the operating system, version of the image, how long ago it was released, and the origin of the image. <strong>Packages</strong> displays a list of installed packages within that image. <strong>Signature</strong> verifies the integrity of the image such as the author, date, RSA key ID, and status.</p>
<p>The current, or running, image displays a green check-mark beside it. If something happens, or an update causes an issue, click the <strong>Roll Back and Reboot</strong> button. This restores the system to a previous image.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/11/managing-software-and-services-with-cockpit-1.gif" alt="Running system updates with OSTree-based operating systems in Cockpit." class="wp-image-29641" /></figure>
<h2>Applications</h2>
<p>The <strong>Applications</strong> screen displays a list of add-ons available for Cockpit. This makes it easy to find and install the plugins required by the user. At the time of this article, some of the options include the 389 Directory Service, Fleet Commander, and Subscription Manager. The demo below shows a complete list of available Cockpit add-ons.</p>
<p>Also, each item displays the name, a brief description, and a button to install, or remove, the add-on. Furthermore, clicking the item displays more information (if available). To refresh the list, click the icon at the top-right corner.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/11/managing-software-and-services-with-cockpit-2.gif" alt="Managing Cockpit application add-ons and features" class="wp-image-29640" /></figure>
<h2>Subscription Management</h2>
<p>Subscription managers allow admins to attach subscriptions to the machine. Even more, subscriptions give admins control over user access to content and packages. One example of this is the famous <a rel="noreferrer noopener" aria-label="RHEL subscription (opens in a new tab)" href="https://www.redhat.com/en/about/value-of-subscription" target="_blank">Red Hat subscription model</a>. This feature works in relation to the <strong>subscription-manager</strong> command</p>
<p>The Subscriptions add-on can be installed via Cockpit’s Applications menu option. It can also be installed from the command-line with:</p>
<pre class="wp-block-preformatted">sudo dnf install cockpit-subscriptions</pre>
<p>To begin, click <strong>Subscriptions</strong> in the main menu. If the machine is currently unregistered, it opens the <strong>Register System</strong> screen. Next, select the URL. You can choose <strong>Default</strong>, which uses Red Hat’s subscription server, or enter a <strong>Custom URL</strong>. Enter the <strong>Login</strong>, <strong>Password</strong>, <strong>Activation Key</strong>, and <strong>Organization</strong> ID. Finally, to complete the process, click the <strong>Register</strong> button.</p>
<p>The main page for Subscriptions show if the machine is registered, the System Purpose, and a list of installed products.</p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/11/managing-software-and-services-with-cockpit-3.gif" alt="Managing subscriptions in Cockpit" class="wp-image-29639" /></figure>
<h2>Services</h2>
<p>To start, click the <strong>Services</strong> menu option. Because Cockpit uses <em><a href="https://fedoramagazine.org/series/systemd-series/">systemd</a></em>, we get the options to view <strong>System Services</strong>, <strong>Targets</strong>, <strong>Sockets</strong>, <strong>Timers</strong>, and <strong>Paths</strong>. Cockpit also provides an intuitive interface to help users search and find the service they want to configure. Services can also be filtered by it’s state: <strong>All</strong>, <strong>Enabled</strong>, <strong>Disabled</strong>, or <strong>Static</strong>. Below this is the list of services. Each row displays the service name, description, state, and automatic startup behavior.</p>
<p>For example, let’s take <em>bluetooth.service</em>. Typing <em>bluetooth</em> in the search bar automatically displays the service. Now, select the service to view the details of that service. The page displays the status and path of the service file. It also displays information in the service file such as the requirements and conflicts. Finally, at the bottom of the page, are the logs pertaining to that service.</p>
<p>Also, users can quickly start and stop the service by toggling the switch beside the service name. The three-dots to the right of that switch expands those options to <strong>Enable</strong>, <strong>Disable</strong>, <strong>Mask/Unmask </strong>the service</p>
<p>To learn more about <em>systemd</em>, check out the series in the Fedora Magazine starting with <a rel="noreferrer noopener" aria-label="What is an init system? (opens in a new tab)" href="https://fedoramagazine.org/what-is-an-init-system/" target="_blank">What is an init system?</a></p>
<figure class="wp-block-image"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2019/11/managing-software-and-services-with-cockpit-4.gif" alt="Managing services in Cockpit" class="wp-image-29638" /></figure>
<p>In the next article we’ll explore the security features available in Cockpit.</p>
</div>


https://www.sickgaming.net/blog/2019/11/...h-cockpit/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016