Feature: Subscriptions - cockpit-project/cockpit GitHub Wiki
Goal
Subscribe a RHEL system to be able to receive OS updates (security and otherwise).
- Long term goal: provide at least the functionality provided by subscription-manager GUI
- See current subscription state
- Modify subscriptions and registration
- Work with pools (view+filter, attach, remove)
- Related: Enable/disable software repositories
User stories:
-
Sarah is a developer, but got tossed the "sysadmin hat" at the 20 people IT company she works at. They are currently in the process to migrate their 3 servers from Windows 2012 to RHEL.
-
Kathy works as a sysadmin consultant for several different customers. At one of her customers she needs to set up two new machines with no connection to the internet. The machine can however talk to the local SAM server.
Workflows:
Sarah: Sarah has bought 3 self-service subscriptions for RHEL. She downloads RHEL Server from the customer portal and installs the machines.
After she's done with the installation of each machine, she reboots that system and fires up her web browser on her laptop and launches Cockpit via the https://IPADDRESS:9090
The system is currently not subscribed, so it alerts Sarah that she needs to subscribe the machines in order to receive updates.
She inputs her Customer Portal ID and password. The system is registered and a subscription automatically added. The system notifies her that the system is now successfully subscribed. She then goes on to install the next machines and repeats the steps there.
Kathy: Installs RHEL from a USB stick and boots the first machine up. After accessing the machine in a web browser. Kathy fires up the subscription UI and points it at the internal SAM server and attaches a self-service subscription using an activation key rather than her username and password.
When she tries to do the same on the second machine, the registration fails with an error message telling her that the server couldn't be reached. On checking the machine's network settings she quickly finds the error and corrects it. She navigates back to the subscriptions page, where the registration dialog retained her previous settings and she only has to enter her password again. The second attempt is successful.
Design
[https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/subscriptions/subscriptions.png ](https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/subscriptions/subscriptions.png)
Error handling:
[https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/subscriptions/subscriptions-errors.png ](https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/subscriptions/subscriptions-errors.png)
Activation keys, organization: [https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/subscriptions/subscriptions-keys-v2.png ](https://raw.githubusercontent.com/cockpit-project/cockpit-design/master/subscriptions/subscriptions-keys-v2.png)
Implementation
- https://trello.com/c/szxKULKA/116-basic-rhel-subscriptions
- https://trello.com/c/ocNp1IlO/338-subscriptions-interact-with-pools
- https://trello.com/c/HIPgedLN/246-subscriptions-guided-repo-enabling
- https://trello.com/c/CVKjHpVa/247-subscriptions-exposed-detailed-entitlement-information
- https://trello.com/c/0LwsHGxs/331-subscriptions-overall-status-on-system-page
- Currently there's just one subscription-manager DBus Signal in RHEL: http://www.candlepinproject.org/docs/subscription-manager/dbus.html, API is under development
- Note that the Property documented on that page is not available in RHEL as of 7.2.x, just the
entitlement_status
signal andcheck_status
method.
- Note that the Property documented on that page is not available in RHEL as of 7.2.x, just the
- Whenever the subscription status changes (notification via DBus signal), the actual status is read via
subscription-manager list
. - When loading the subscription page and Cockpit doesn't have information on the current subscription status, Cockpit calls the DBus
check_status
method, which in turn will trigger the update. - The system will be subscribed via
subscription-manager register --auto-attach
, with parameters that the user can provide input for: - serverurl (optional)
- username and password
- organization
- activation key(s)
- proxy
- For a subscribed system, Cockpit shows details from
subscription-manager list
output.
Future Work or Out of Scope
- In order to implement more features than just these simple workflows, we would need a proper subscription-manager DBus API. Rough idea: https://gist.github.com/stefwalter/62c4a5aaedd120e9834b
- Separate Register and Attach concepts.
- Service levels