Chapter 10. Client entitlement certificate and client configuration RPM
10.1. Create an entitlement certificate
Procedure
On the RHUA, log in to the Red Hat Update Infrastructure Management Tool.
[root@rhua ~]# rhui-manager
In the Red Hat Update Infrastructure Management Tool home screen, press
e
to select create entitlement certificates and client configuration RPMs.-= Red Hat Update Infrastructure Management Tool =- -= Home =- r manage repositories c manage content delivery servers (CDS) l manage HAProxy load-balancer instances s synchronization status and scheduling e create entitlement certificates and client configuration RPMs n manage Red Hat entitlement certificates u manage RHUI users Connected: rhua.example.com
Press
e
to select generate an entitlement certificate.------------------------------------------------------------------------------ -= Red Hat Update Infrastructure Management Tool =- -= Client Entitlement Management =- e generate an entitlement certificate c create a client configuration RPM from an entitlement certificate Connected: rhua.example.com ------------------------------------------------------------------------------ rhui (client) => e
Select which repositories to include in the entitlement certificate by typing the number of the repository at the prompt. Typing the number of a repository places a checkmark next to the name of that repository. Continue until all repositories you want to add have been checked.
ImportantInclude only repositories for a single Red Hat Enterprise Linux version in a single entitlement. Adding repositories for multiple Red Hat Enterprise Linux versions will lead to an unusable yum configuration file.
-
Press
c
at the prompt to confirm. Enter a name for the certificate. This name helps identify the certificate within the Red Hat Update Infrastructure Management Tool and to generate the name of the certificate and key files.
Name of the certificate. This will be used as the name of the certificate file (name.crt) and its associated private key (name.key). Choose something that will help identify the products contained with it:
- Enter a path to save the certificate to. Leave the field blank to save it to the current working directory.
- Enter the number of days the certificate should be valid for. Leave the field blank for 365 days. The details of the repositories to be included in the certificate display.
Press
y
at the prompt to confirm the information and create the entitlement certificate.Repositories to be included in the entitlement certificate: Red Hat Repositories Red Hat Enterprise Linux for SAP (RHEL 6 Server) (RPMs) from RHUI Proceed? (y/n) y .................................................+++ Entitlement certificate created at /root/clientcert/rhuiclientexample.crt ------------------------------------------------------------------------------
10.1.1. Creating an entitlement certificate from the command line interface
Procedure
Use the following command to create an entitlement certificate from the CLI:
# rhui-manager client cert --repo_label rhel-sap-for-rhel-6-server-rhui-rpms --name rhuiclientexample --days 365 --dir /root/clientcert ..........................................................................................+++ ..........+++ Entitlement certificate created at /root/clientcert/rhuiclientexample.crt
NoteUse Red Hat repository labels, not IDs. To get a list of all labels, run the
rhui-manager client labels
command. If you are including a protected custom repository in the certificate, use the repository’s ID instead.
For more a complete list of parameters, see Appendix B, Red Hat Update Infrastructure command line interface.
10.2. Create a client configuration RPM
Procedure
From the Red Hat Update Infrastructure Management Tool home screen, press
e
to select create entitlement certificates and client configuration RPMs.-= Red Hat Update Infrastructure Management Tool =- -= Home =- r manage repositories c manage content delivery servers (CDS) l manage HAProxy load-balancer instances s synchronization status and scheduling e create entitlement certificates and client configuration RPMs n manage Red Hat entitlement certificates u manage RHUI users Connected: rhua.example.com
-
Press
c
to select create a client configuration RPM from an entitlement certificate. Enter the full path of a local directory to save the configuration files to.
Full path to local directory in which the client configuration files generated by this tool should be stored (if this directory does not exist, it will be created): /tmp
Enter the RPM’s name.
clientrpmtest
- Enter the version of the configuration RPM. The default version is 2.0.
- Enter the release of the configuration RPM. The default version is 1.
Enter the full path to the entitlement certificate authorizing the client to access specific channels.
Full path to the entitlement certificate authorizing the client to access specific channels: /root/clientcert/rhuiclientexample.crt
Enter the full path to the private key for the entitlement certificate.
Full path to the private key for the above entitlement certificate: /root/clientcert/rhuiclientexample.key
Select any unprotected custom repositories to be included in the client configuration.
- 1 : unprotected_repo1
Press
c
to confirm selections or?
for more commands.Successfully created client configuration RPM. Location: /tmp/clientrpmtest-2.0/build/RPMS/noarch/clientrpmtest-2.0-1.noarch.rpm
10.2.1. Create a client configuration RPM from the command line interface
Procedure
Use the following command to create an RPM with the rhui-manager CLI:
# rhui-manager client rpm --entitlement_cert /root/clientcert/rhuiclientexample.crt --private_key /root/clientcert/rhuiclientexample.key --rpm_name clientrpmtest --dir /tmp --unprotected_repos unprotected_repo1 Successfully created client configuration RPM. Location: /tmp/clientrpmtest-2.0/build/RPMS/noarch/clientrpmtest-2.0-1.noarch.rpm
NoteUsing the command line you can also specify the URL of the proxy server to use with the RHUI repositories, or _none_ (including the underscores) to override any global yum settings on a client machine. To specify a proxy, use the
--proxy
parameter.
See Appendix B, Red Hat Update Infrastructure command line interface for more a complete list of parameters.
10.3. Install a client RPM
Procedure
Copy the RPM to the client machine and install it:
[client1 ~]# yum localinstall <rpm>
Verify the RPM has been installed:
[client1 ~]# yum list <rpm>
NoteThe rhn-plugin and subscription-manager plugin will be disabled in yum after the client RPM has been installed.
View
yum
repositories to ensure the repository was added and packages are available for installing:[client1 ~]# yum repolist Loaded plugins: search-disabled-repos, security rhui-rhel-sap-for-rhel-6-server-rhui-rpms | 2.0 kB 00:00 rhui-rhel-sap-for-rhel-6-server-rhui-rpms/primary | 26 kB 00:00 rhui-rhel-sap-for-rhel-6-server-rhui-rpms 77/77 repo id repo name status rhui-rhel-sap-for-rhel-6-server-rhui-rpms Red Hat Enterprise Linux for SA 77 repolist: 77
Install a package from that repository:
[client1 ~]# yum install compat-locales-sap
10.4. Working with the EUS channel
By default, clients are set to take content from the main release channel, for example, 7Server or 6Server. If you have synchronized the EUS channel, you need to set the concrete version of the release. After installing the client RPM, the client machine has the rhui-set-release
tool available.
Procedure
To set the yum
releasever
variable toversion
, which creates the/etc/yum/vars/releasever
file, which in turn makes yum use EUS repositories with this particular version, run the following command:rhui-set-release --set <version>
To unset the
releasever
variable (to remove the file), run the following command:rhui-set-release --unset
To print the currently set version, run the following command:
rhui-set-release
NoteIf there is no output, it means no particular version is set.