Red Hat Update Infrastructure-3.1-System Administrators Guide-en-US
Red Hat Update Infrastructure-3.1-System Administrators Guide-en-US
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift,
Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States
and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the
official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other
countries and are used with the OpenStack Foundation's permission. We are not affiliated with,
endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
The Red Hat Update Infrastructure 3.1 System Administrator's Guide provides requirements and
instructions to help cloud providers implement and configure Red Hat Update Infrastructure. It also
provides step-by-step instructions for performing administrative tasks, such as adding or removing
content delivery servers, load balancers, and custom repositories.
Table of Contents
Table of Contents
.CHAPTER
. . . . . . . . . . 1.. .ABOUT
. . . . . . . .RED
. . . . .HAT
. . . . .UPDATE
. . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . . .
1.1. NEW FEATURES IN THIS RED HAT UPDATE INFRASTRUCTURE RELEASE 7
1.2. INSTALLATION OPTIONS 7
1.2.1. Option 1: Full Installation 8
1.2.2. Option 2: Installation with an Existing Storage Solution 8
1.2.3. Option 3: Installation with an Existing Load Balancing Solution 8
1.2.4. Option 4: Installation with Existing Storage and Load Balancing Solutions 9
1.3. RED HAT UPDATE INFRASTRUCTURE COMPONENTS 10
1.3.1. Red Hat Update Appliance 10
1.3.2. Content Delivery Server 11
1.3.3. HAProxy 12
1.3.4. Repositories, Containers, and Content 14
1.4. CONTENT PROVIDER TYPES 14
1.5. UTILITY AND COMMAND-LINE INTERFACE COMMANDS 14
1.6. COMPONENT COMMUNICATIONS 14
. . . . . . . . . . . 2.
CHAPTER . . INFORMATION
. . . . . . . . . . . . . . . . REQUIRED
. . . . . . . . . . . .FOR
. . . . .INSTALLATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
..............
. . . . . . . . . . . 3.
CHAPTER . . PREREQUISITES
. . . . . . . . . . . . . . . . . .FOR
. . . . .INSTALLING
. . . . . . . . . . . . . RED
. . . . . HAT
. . . . . UPDATE
. . . . . . . . . INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
..............
.CHAPTER
. . . . . . . . . . 4.
. . .REGISTER
. . . . . . . . . . .RED
. . . . .HAT
. . . . UPDATE
. . . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . .AND
. . . . .ATTACH
. . . . . . . . . SUBSCRIPTIONS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
..............
4.1. INSTALL RED HAT ENTERPRISE LINUX 21
4.2. REGISTER RED HAT UPDATE INFRASTRUCTURE 21
4.3. ATTACH A SUBSCRIPTION TO THE RED HAT UPDATE APPLIANCE 22
4.4. ATTACH A SUBSCRIPTION TO THE CDS NODES 23
4.5. ATTACH A SUBSCRIPTION TO THE HAPROXY NODES 23
4.6. ENABLE THE REQUIRED REPOSITORIES 23
.CHAPTER
. . . . . . . . . . 5.
. . SHARED
. . . . . . . . . .STORAGE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
..............
5.1. GLUSTER STORAGE 26
5.1.1. Create Shared Storage 26
5.1.2. Extend the Storage Volume 28
5.2. CREATE NFS STORAGE 28
.CHAPTER
. . . . . . . . . . 6.
. . .INSTALL
. . . . . . . . . RED
. . . . .HAT
. . . . .UPDATE
. . . . . . . . . INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
..............
6.1. GENERATE AN RSA KEY PAIR 31
6.1.1. RSA Key Pair for Version 2 of the SSH Protocol 31
6.1.2. ECDSA Key Pair for Version 2 of the SSH Protocol 32
6.2. APPLY UPDATES 33
6.3. MOUNT RED HAT UPDATE INFRASTRUCTURE ISO 33
6.4. RUN THE SETUP_PACKAGE_REPOS SCRIPT 33
6.5. INSTALL THE RHUI-INSTALLER SCRIPT 34
6.6. RUN THE RHUI-INSTALLER 34
6.7. CHANGE THE INITIAL PASSWORD 35
6.8. REGISTER A RED HAT SUBSCRIPTION IN RHUI 36
6.9. ENABLE AUTOMATIC ENTITLEMENT CERTIFICATE UPDATES 37
6.10. INSTALL ADDITIONAL PACKAGES 38
6.10.1. Qpid Persistence Extension 38
.CHAPTER
. . . . . . . . . . 7.
. . ADD
. . . . . .OR
. . . DELETE
. . . . . . . . .A. .CONTENT
. . . . . . . . . . . DELIVERY
. . . . . . . . . . . SERVER
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
..............
7.1. ADD A CONTENT DELIVERY SERVER 39
7.2. UNREGISTER A CONTENT DELIVERY SERVER 40
7.3. CONFIGURE A CONTENT DELIVERY SERVER TO ACCEPT LEGACY CAS 41
1
Red Hat Update Infrastructure 3.1 System Administrator's Guide
. . . . . . . . . . . 8.
CHAPTER . . .ADD
. . . . .AN
. . . HAPROXY
. . . . . . . . . . . LOAD
. . . . . . .BALANCER
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
..............
.CHAPTER
. . . . . . . . . . 9.
. . .CREATE
. . . . . . . . .AND
. . . . .SYNCHRONIZE
. . . . . . . . . . . . . . . .A. .RED
. . . . .HAT
. . . . .REPOSITORY
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
..............
9.1. CREATE A REPOSITORY 45
9.2. SYNCHRONIZE A REPOSITORY 46
9.3. CHECK REPOSITORY SYNCHRONIZATION 47
. . . . . . . . . . . 10.
CHAPTER . . . CLIENT
. . . . . . . . .ENTITLEMENT
. . . . . . . . . . . . . . . CERTIFICATE
. . . . . . . . . . . . . . .AND
. . . . .CLIENT
. . . . . . . . CONFIGURATION
. . . . . . . . . . . . . . . . . . . RPM
. . . . . . . . . . . . . . . . . . . . . . . 51
..............
10.1. CREATE AN ENTITLEMENT CERTIFICATE 51
10.1.1. Creating an Entitlement Certificate from the Command line 52
10.2. CREATE A CLIENT CONFIGURATION RPM 52
10.2.1. Create a Client Configuration RPM from the Command line 54
10.3. INSTALL A CLIENT RPM 54
10.4. WORKING WITH THE EUS CHANNEL 55
.CHAPTER
. . . . . . . . . . 11.
. . .CREATE
. . . . . . . . .CLIENT
. . . . . . . .PROFILES
. . . . . . . . . . .FOR
. . . . .THE
. . . . .RED
. . . . .HAT
. . . . .UPDATE
. . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . .SERVERS
. . . . . . . . . . . . . . . . .56
..............
11.1. GENERATE GPG KEYS 56
11.2. SET UP CUSTOM REPOSITORIES 57
11.3. INSTALL THE CLIENT CONFIGURATION RPM ON A CLIENT NODE 60
. . . . . . . . . . . 12.
CHAPTER . . . CREATE
. . . . . . . . . CLIENT
. . . . . . . . IMAGES
. . . . . . . . . AND
. . . . . .TEMPLATES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
..............
12.1. IMAGE REQUIREMENTS 61
12.2. RED HAT UPDATE INFRASTRUCTURE INTEGRATION 61
12.3. TEMPLATE PREPARATION 61
. . . . . . . . . . . 13.
CHAPTER . . . CERTIFIED
. . . . . . . . . . . .CLOUD
. . . . . . . . AND
. . . . . SERVICE
. . . . . . . . . .PROVIDER
. . . . . . . . . . . CERTIFICATION
. . . . . . . . . . . . . . . . . WORKFLOW
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
..............
. . . . . . . . . . . 14.
CHAPTER . . . MANAGE
. . . . . . . . . . CONTENT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
..............
14.1. AVAILABLE CHANNELS 65
14.2. MANAGE THE LINUX SOFTWARE REPOSITORIES 65
14.2.1. List the Available Repositories 65
14.2.2. Display the Repository Information 66
14.2.3. Add a Red Hat Repository 66
14.2.4. Delete a Red Hat Repository 66
14.2.5. List the RPM Packages in a Repository 67
14.2.6. Create a Custom Repository 67
14.2.7. Upload Packages to a Custom Repository 69
14.2.8. Delete Packages from a Custom Repository 69
14.2.9. Import Errata Metadata to a Custom Repository 71
14.2.10. Import Package Group Metadata (comps) to a Custom Repository 71
14.2.11. Create an Alternate Content Source Configuration RPM 72
14.3. ORPHANED CONTENT UNITS 72
14.4. MANAGE THE CONTENT DELIVERY SERVER NODES 73
14.5. WORKING WITH CONTAINERS 74
14.6. MANAGE THE CONTENT DELIVERY SERVER DOCKER CONTENT 75
14.6.1. Docker Content in Red Hat Update Infrastructure 75
14.6.2. Add a Container to Red Hat Update Infrastructure 75
14.6.3. Synchronize the docker Repository 78
14.6.4. Generate the docker Client Configuration 79
14.6.5. Install an RPM on the Client 79
14.6.6. Test the docker pull Command on the Client 80
14.7. ATOMIC HOST AND OSTREE CONTENT 81
14.7.1. Add an Atomic Host Repository 82
14.7.2. Synchronize the OSTree Repository 82
14.7.3. Generate a Client Configuration Package on the RHUA 83
2
Table of Contents
. . . . . . . . . . . 15.
CHAPTER . . . MANAGE
. . . . . . . . . . CERTIFICATES
. . . . . . . . . . . . . . . .AND
. . . . . KEYS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
..............
15.1. RED HAT UPDATE APPLIANCE CERTIFICATES 85
15.2. CONTENT DELIVERY SERVER CERTIFICATES 85
15.3. CLIENT CERTIFICATES 85
15.4. DISPLAY AND MANAGE CERTIFICATES 86
15.4.1. List the Entitled Products for a Certificate 86
15.4.2. List Custom Repository Entitlements 87
15.4.3. Upload a Content Certificate 87
CHAPTER 16. RED HAT UPDATE INFRASTRUCTURE 3.1 STATUS CODES, LOG FILES, AND CONFIGURATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
FILES ..............
. . . . . . . . . . . 17.
CHAPTER . . . BACK
. . . . . . .UP
. . .AND
. . . . . RESTORE
. . . . . . . . . . .RED
. . . . .HAT
. . . . .UPDATE
. . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
..............
17.1. BACK UP THE RED HAT UPDATE APPLIANCE 91
17.2. RESTORE THE RED HAT UPDATE APPLIANCE 92
17.3. BACK UP A CONTENT DELIVERY SERVER 92
17.4. RESTORE A CONTENT DELIVERY SERVER 93
17.5. BACK UP AN HAPROXY SERVER 94
17.6. RESTORE AN HAPROXY SERVER 94
CHAPTER 18. MIGRATE TO A NEW LOAD BALANCER, OR CHANGE THE NAME OF AN EXISTING LOAD
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
BALANCER ..............
. . . . . . . . . . . .A.
APPENDIX . . RED
. . . . . HAT
. . . . . UPDATE
. . . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . MANAGEMENT
. . . . . . . . . . . . . . . . .TOOL
. . . . . . MENUS
. . . . . . . . .AND
. . . . .COMMANDS
. . . . . . . . . . . . . . . . . .97
..............
. . . . . . . . . . . .B.
APPENDIX . . RED
. . . . . HAT
. . . . . UPDATE
. . . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . COMMAND-LINE
. . . . . . . . . . . . . . . . . . .INTERFACE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
...............
B.1. CERT 100
B.2. PACKAGES 101
B.3. REPO 101
B.4. STATUS 102
B.5. CLIENT 103
B.6. SUBSCRIPTIONS 104
. . . . . . . . . . . .C.
APPENDIX . . .RESOLVE
. . . . . . . . . . COMMON
. . . . . . . . . . .PROBLEMS
. . . . . . . . . . . . .IN
. . RED
. . . . . HAT
. . . . .UPDATE
. . . . . . . . . INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
...............
. . . . . . . . . . . .D.
APPENDIX . . .API
. . . .REFERENCE
. . . . . . . . . . . . .IN
. . .RED
. . . . HAT
. . . . . UPDATE
. . . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . .3.1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
...............
D.1. REPOSITORY APIS 110
D.1.1. Creation, Deletion, and Configuration 110
D.1.1.1. Create a Repository 110
D.1.1.2. Update a Repository 111
D.1.1.3. Associate an Importer to a Repository 113
D.1.1.4. Associate a Distributor with a Repository 114
D.1.1.5. Update an Importer Associated with a Repository 116
D.1.1.6. Disassociate an Importer from a Repository 117
D.1.1.7. Update a Distributor Associated with a Repository 117
D.1.1.8. Disassociate a Distributor from a Repository 118
D.1.1.9. Delete a Repository 119
D.1.2. Retrieval 120
D.1.2.1. Retrieve a Single Repository 120
D.1.2.2. Retrieve All Repositories 121
D.1.2.3. Advanced Search for Repositories 122
D.1.2.4. Retrieve Importers Associated with a Repository 125
3
Red Hat Update Infrastructure 3.1 System Administrator's Guide
. . . . . . . . . . . .E.
APPENDIX . . GNU
. . . . . .GENERAL
. . . . . . . . . . .PUBLIC
. . . . . . . .LICENSES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
...............
E.1. GNU GENERAL PUBLIC LICENSE VERSION 2.0 147
E.2. GNU GENERAL PUBLIC LICENSE VERSION 3.0 151
. . . . . . . . . . . .F.
APPENDIX . . UPGRADING
. . . . . . . . . . . . . .RED
. . . . .HAT
. . . . .UPDATE
. . . . . . . . .INFRASTRUCTURE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
...............
F.1. UPGRADING THE RHUA NODE 162
F.1.1. Upgrading CDS Nodes 163
F.1.2. Upgrading the HAProxy Node 164
F.1.3. Configuring New Red Hat Update Infrastructure Features 164
F.1.3.1. Entitlement Certificate Refresh 164
F.1.3.2. Container Registry Credentials 164
F.1.3.3. Additional Packages 165
. . . . . . . . . . . .G.
APPENDIX . . .MIGRATING
. . . . . . . . . . . . .FROM
. . . . . . RHUI
. . . . . . 2. .TO
. . . RHUI
. . . . . .3.1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166
...............
4
Table of Contents
5
Red Hat Update Infrastructure 3.1 System Administrator's Guide
The Red Hat Update Infrastructure 3.1 System Administrator’s Guide will help system administrators
prepare their infrastructure for participation in the Red Hat Certified Cloud and Service Provider
program.
This guide documents the steps necessary to install and configure the Red Hat Update Appliance
(RHUA), content delivery servers (CDSs), repositories, shared storage, and load balancing. Experienced
RHEL system administrators are the target audience. System administrators with limited Red Hat
Enterprise Linux skills should consider engaging Red Hat Consulting to provide a Red Hat Certified
Cloud Provider Architecture Service.
The Red Hat Update Infrastructure 3.1 System Administrator’s Guide also provides guidance to system
administrators when configuring, managing, and updating RHUI. This guide discusses:
utility commands
certificate management
content management.
See Appendix A, Red Hat Update Infrastructure Management Tool Menus and Commands for a list of all
of the available menus and commands in the Red Hat Update Infrastructure Management Tool.
See Appendix B, Red Hat Update Infrastructure Command-Line Interface for a list of the functions that
can also be run from a standard shell prompt.
See Appendix C, Resolve Common Problems in Red Hat Update Infrastructure for some of the common
known issues and possible solutions.
See Appendix D, API Reference in Red Hat Update Infrastructure 3.1 for a list of the Pulp APIs used in
Red Hat Update Infrastructure.
See the following resources for more information on the various Red Hat Update Infrastructure
components.
HAProxy
6
CHAPTER 1. ABOUT RED HAT UPDATE INFRASTRUCTURE
Pulp
Docker
Puppet
code rebased to Pulp 2.18 to be consistent with the code base in Red Hat Satellite 6.
default use of Red Hat Gluster Storage as shared storage to speed up content availability at the
CDS and eliminate the need for synchronization.
high-availability deployment to reduce the error of one CDS not being synchronized with
another CDS.
a load balancer/HAProxy node that is client-facing. (This functionality was integrated previously
into the CDS logic.)
7
Red Hat Update Infrastructure 3.1 System Administrator's Guide
At a high level, this guide describes how to perform the following installation tasks.
Attach a Red Hat Update Infrastructure subscription RHUA, CDS, and HAProxy
Mount the Red Hat Update Infrastructure ISO (optional) RHUA, CDS, and HAProxy
Run the setup_package_repos script (optional if using the RHUI RHUA, CDS, and HAProxy
3 ISO)
There are several scenarios for setting up your cloud environment. This guide documents Option 1: Full
Installation and includes notes and remarks about how to alter the installation for other scenarios.
8
CHAPTER 1. ABOUT RED HAT UPDATE INFRASTRUCTURE
1.2.4. Option 4: Installation with Existing Storage and Load Balancing Solutions
A RHUA
The following figure depicts a high-level view of how the various RHUI components interact with each
other.
NOTE
You can use the ISO to install Red Hat Update Infrastructure 3.1, or you can connect to
the Red Hat Customer Portal to download Red Hat Update Infrastructure 3.1.
Install the RHUA and CDS nodes on separate _X86 servers (bare metal or virtual machines). You cannot
install Red Hat Update Infrastructure without the RHUI ISO and an appropriate content certificate,
provided by Red Hat. Ensure all _X86 servers (bare metal or virtual machines) and networks that
connect to RHUI can access the ISO.
NOTE
9
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
Despite its name, the RHUA is not actually shipped as an appliance; it is an RPM
installed on an instance in the cloud.
See the Release Notes before setting up Red Hat Update Infrastructure 3.1.
The RHUA:
downloads new packages from the Red Hat content delivery network (CDN). The RHUA is the
only RHUI component that connects to Red Hat, and you can configure the RHUA’s
synchronization schedule.
verifies the RHUI installation’s health and writes the results to a file located on the RHUA.
Monitoring solutions use this file to determine the RHUI installation’s health.
provides a human-readable view of the RHUI installation’s health through a CLI tool.
The RHUI uses two main configuration files: /etc/rhui/rhui-tools.conf and /etc/rhui-
installer/answers.yaml.
The /etc/rhui/rhui-tools.conf configuration file contains general options used by the RHUA, such as the
default file locations for certificates, and default configuration parameters for the Red Hat CDN
synchronization. This file normally does not require editing.
The Red Hat Update Infrastructure Management Tool generates the /etc/rhui-installer/answers.yaml
configuration file based on user-inputted values. It contains all the information that drives the running of
a RHUA in a particular region. An example configuration includes the destination on the RHUA to
download packages and a list of CDS nodes (host names) in the RHUI installation.
The RHUA employs several services to synchronize, organize, and distribute content for easy delivery:
Pulp: The service that oversees management of the supporting services, providing a user
interface for users to interact with.
Qpid: An Apache-based messaging broker system that allows the RHUA to interact securely
with the CDSs to inform them of desired actions against the RHUA (synchronize, remove, adjust
repositories, and so on). This allows for full control over the RHUI appliance from just the RHUA
system.
10
CHAPTER 1. ABOUT RED HAT UPDATE INFRASTRUCTURE
MongoDB’s files appear to take up a large amount of room on the file system and are
sometimes larger than the database content itself. This is normal behavior based on Mongo’s
allocation method. For more information, see RHUIs mongodb files are larger than the actual
database contents.
If MongoDB fails to start, clearing database locks and performing a repair is often effective as
outlined in Red Hat Update Infrastructure fails to start due to a MongoDB startup error .
The CDSs host content to end-user RHEL systems. While there is no required number of systems, the
CDS works in a round-robin style load-balanced fashion (A, B, C, A, B, C) to deliver content to end-user
systems. The CDS uses HTTP to host content to end-user systems via httpd-based yum repositories.
During configuration, you specify the CDS’s directory where packages are synchronized. Similar to the
RHUA, the only requirement is that you mount the directory on the CDS. It is up to the cloud provider to
determine the best course of action when allocating the necessary devices. The Red Hat Update
Infrastructure Management Tool configuration RPM takes care of linking the package directory with the
Apache configuration to serve it.
If NFS is used, rhui-installer can configure an NFS share on the RHUA to store the content as well as a
directory on the CDSs to mount the NFS share. The following rhui-manager options control these
settings:
--remote-fs-mountpoint is the file system location where the remote file system share should
be mounted (default: /var/lib/rhui/remote_share)
--remote-fs-server is the remote mount point for a shared file system to use, for example,
nfs.example.com:/path/to/share (default: nfs.example.com:/export)
If these default values are used, the /export directory on the RHUA and the /var/lib/rhui/remote_share
directory on each CDS are identical. For example, the published subdirectory has the following structure
if Yum, Docker, and OSTree repositories are already synchronized.
The expected usage is that each CDS will keep its own copy of the packages. It is possible the cloud
provider will use some form of shared storage (such as Gluster Storage) that the RHUA writes packages
to and each CDS reads from.
NOTE
The storage solution must provide an NFS endpoint for mounting on the RHUA and
CDSs. If local storage is implemented, shared storage is needed for the cluster to work. If
you want to provide local storage to the RHUA, configure the RHUA to function as the
NFS server with a rhua.example.com:/path/to/nfs/share endpoint configured.
The only nonstandard logic that takes place on each CDS is the entitlement certificate checking. This
11
Red Hat Update Infrastructure 3.1 System Administrator's Guide
The only nonstandard logic that takes place on each CDS is the entitlement certificate checking. This
checking ensures that the client making requests on the Yum or OSTree repositories is authorized by
the cloud provider to access those repositories. The check ensures:
that the entitlement certificate was signed by the cloud provider’s Certificate Authority (CA)
Certificate. The CA Certificate is installed on the CDS as part of its configuration to facilitate
this verification.
the requested URI matches an entitlement found in the client’s entitlement certificate.
If the CA verification fails, the client will see an SSL error. See the CDS’s Apache logs under
/var/log/httpd/ for more information.
IMPORTANT
1.3.3. HAProxy
If more than one CDS is used, a load-balancing solution must be in place to spread client HTTPS
requests across all servers. RHUI ships with HAProxy, but it is up to you to choose what load-balancing
solution (for example, the one from the cloud provider) to use during the installation. If HAProxy is used,
you must also decide how many nodes to bring in. See HAProxy Configuration for more information.
Clients are not configured to go directly to a CDS; their repository files are configured to point to
HAProxy, the RHUI load balancer. HAProxy is a TCP/HTTP reverse proxy particularly suited for high-
availability environments. HAProxy:
spreads the load among several servers while assuring server persistence through the use of
HTTP cookies.
12
CHAPTER 1. ABOUT RED HAT UPDATE INFRASTRUCTURE
persists client connections to the correct application server depending on application cookies.
reports detailed status as HTML pages to authenticated users from a URI intercepted from the
application.
With RHEL 7, the load balancer technology is included in the base operating system. The load balancer
must be installed on a separate node.
NOTE
If you are using an existing load balancer, ensure ports 5000 and 443 are configured in
the load balancer for the cds-lb-hostname forwarded to the pool and that all CDSs in the
cluster are in the load balancer’s pool. You do not need to follow the steps in Chapter 8,
Add an HAProxy Load Balancer .
The exact configuration depends on the particular load balancer software you use. See the following
configuration, taken from a typical HAProxy setup, to understand how you should configure your load
balancer:
defaults
log global
maxconn 8000
option redispatch
retries 3
stats enable
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
listen crane00
bind 10.13.153.2:5000
balance roundrobin
option tcplog
option ssl-hello-chk
server cds3-2.usersys.redhat.com cds3-2.usersys.redhat.com:5000 check
server cds3-1.usersys.redhat.com cds3-1.usersys.redhat.com:5000 check
listen https00
bind 10.13.153.2:443
balance roundrobin
13
Red Hat Update Infrastructure 3.1 System Administrator's Guide
option tcplog
option ssl-hello-chk
server cds3-2.usersys.redhat.com cds3-2.usersys.redhat.com:443 check
server cds3-1.usersys.redhat.com cds3-1.usersys.redhat.com:443 check
See the Load Balancer Administration Guide for Red Hat Enterprise Linux 7 for detailed descriptions of
the individual global, default, and "listen" settings.
Keep in mind that when clients fail to connect successfully, it is important to review the httpd logs on the
CDS under /var/log/httpd/ to ensure that any requests reached the CDS. If not, issues such as DNS or
general network connectivity may be at fault.
RHEL 7 implements Linux containers using core technologies such as control groups (cgroups) for
resource management, namespaces for process isolation, and SELinux for security, enabling secure
multiple tenancy and reducing the potential for security exploits. Linux containers enable rapid
application deployment, simpler testing, maintenance, and troubleshooting while improving security.
Using RHEL 7 with Docker allows you to increase staff efficiency, deploy third-party applications faster,
enable a more agile development environment, and manage resources more tightly.
There are two general scenarios for using Linux containers in RHEL 7. You can work with host containers
as a tool for application sandboxing, or you can use the extended features of image-based containers.
When you launch a container from an image, a writable layer is added on top of this image. Every time
you commit a container (using the docker commit command), a new image layer is added to store your
changes.
Content, as it relates to RHUI, is the software (such as RPMs) that you download from the Red Hat CDN
for use on the RHUA and the CDS nodes. The RPMs provide the files necessary to run specific
applications and tools. Clients are granted access by a set of SSL content certificates and keys provided
by an rpm package, which also provides a set of generated yum repository files.
See What Channels Can Be Delivered at Red Hat’s Certified Certified Cloud & Service Provider (CCSP)
Partners? for more information.
See Appendix B, Red Hat Update Infrastructure Command-Line Interface for a list of the functions that
can also be run from a standard shell prompt.
14
CHAPTER 1. ABOUT RED HAT UPDATE INFRASTRUCTURE
All RHUI components use the HTTPS communication protocol over port 443.
Red Hat Update Red Hat Content HTTPS Downloads packages from
Appliance Delivery Network Red Hat
Load Balancer Content Delivery Server HTTPS Forwards the client’s yum,
docker or ostree request
Report a bug
15
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Proxy for access to the Red Hat Proxy settings for Red Hat
content delivery network Update Infrastructure set
automatically during the
installation. They are set on the
CDS nodes in the /etc/yum.conf
files, where you configure the
repositories.
Content Repository Size Storage space for the RPM See Storage Requirements in the
packages required by Red Hat Red Hat Satellite 6.7 Installation
Update Infrastructure* Guide for specific storage
requirements.
*All repositories are placed in the /var/lib/pulp directory. Create this directory only if you need to create
a new mount point for it; otherwise, the system creates it automatically during the installation process.
NOTE
Consider using a separate storage volume for the installation if you expect to store a large
amount of data.
NOTE
16
CHAPTER 2. INFORMATION REQUIRED FOR INSTALLATION
NOTE
Each RHUI server (RHUA node or CDS node) requires a separate file system of the
required size. It is important to use technologies such as LVM, SAN, or NAS storage that
allow the content repository to grow if needed. The current rhel-7-server-rpms
repository is 12 GB, and the current rhel-6-server-rpms repository is 29 GB. These
repositories will grow as the product does. These repositories are examples of the large
sizes needed to hold all of the packages in any given environment.
Report a bug
17
Red Hat Update Infrastructure 3.1 System Administrator's Guide
1. completion of the initial stages of the Red Hat Certified Cloud & Service Provider (CCSP)
certification, including review of the client’s :
a. virtualization, image creation, and instance provisioning technologies, tools, and processes.
b. proposed process for measuring and reporting consumption of Red Hat software.
c. proposed process for notifying customers of errata updates to Red Hat software.
d. proposed process for making images that include Red Hat software available to customers,
including image life-cycle management and retiring outdated images.
See Product Documentation for Red Hat Certified Cloud and Service Provider Certification
Browse Knowledgebase for more information.
2. Self-signed certificates are typically used for Red Hat Update Infrastructure (RHUI)
deployment. If SSL certificates signed by a third-party certificate authority will be used, they
have been obtained by the client and reviewed by Red Hat.
NOTE
The Red Hat Consultant can assist with the development of self-signed
certificates, and their use will not affect the user experience of the client’s
customers.
3. The client will provide systems, virtual machines, or tenant instances for installation of all Red
Hat Update Appliances (RHUAs), external load balancers, and content delivery servers (CDSs),
configured as described below.
4. Make sure access to RHEL 7 and the RHUI bits (by ISO or subscription) are available.
5. A minimal RHUI installation includes four required servers: one RHUA, one load balancer, and
two CDSs (physical or virtual) configured as follows:
a. Red Hat Enterprise Linux (RHEL) 7.6 or greater with Minimal installation recommended
b. SELinux on
d. 4 GB memory minimum (16 GB memory minimum for CDSs if Gluster Storage is used)
g. Each CDS node with a 500 GB local block device dedicated to the GlusterFS brick (if
Gluster Storage is used)
h. 50 GB for MongoDB (100 GB if you plan to keep a large number of RHEL repositories in
RHUI). Either add this capacity to the root file system, or attach a volume of this capacity
and mount it at /var/lib/mongodb.
18
CHAPTER 3. PREREQUISITES FOR INSTALLING RED HAT UPDATE INFRASTRUCTURE
6. Certification generation using openssl requires one server, new or existing, configured as follows:
b. SELinux enabled
d. 2 GB memory
b. iptables on
c. SELinux enabled
e. Default logging on
a. IP addresses must be allocated for all RHUAs, CDSs, and external load balancers (if any).
b. DNS records (forward and reverse) have been created for all IP addresses. Example:
rhua.company.com, cds1.company.com, cds2.company.com, and certs.company.com
NOTE
If the server has multiple network interface cards (NICs), the fully qualified
domain name of the RHUA and the CDSs must be resolved to the IP of the
NIC that is used to communicate between the RHUA and the CDSs.
RHUI uses DNS to reach the CDN. In most cases, your instance should be
preconfigured to talk to the proper DNS servers hosted as part of the cloud’s
infrastructure. If you run your own DNS servers or update your client DNS
configuration, there is a chance you will see errors similar to yum Could not
contact any CDS load balancers. In these cases, check that your DNS server
is forwarding to the cloud’s DNS servers for the request or that your DNS
client is configured to fall back to the cloud’s DNS server for name
resolution.
Using more than one HAProxy node requires a round-robin DNS entry for the
host name used as the value of the --cds-lb-hostname parameter when rhui-
installer is run (cds.example.com in this guide) that resolves to the IP
addresses of all HAProxy nodes. This Knowledgebase solution presents one
way to configure a round-robin DNS. In the context of RHUI, these will be the
IP addresses of the HAProxy nodes, and they are to be mapped to the host
name specified as --cds-lb-hostname while calling rhui-installer.
19
Red Hat Update Infrastructure 3.1 System Administrator's Guide
10. Network proxy settings between RHUA and the Red Hat CDN are configured appropriately.
11. Network proxy settings between the CDSs and the clients via yum.conf are configured
appropriately.
12. A round-robin DNS entry if more than one HAProxy node is used
Report a bug
20
CHAPTER 4. REGISTER RED HAT UPDATE INFRASTRUCTURE AND ATTACH SUBSCRIPTIONS
NOTE
Later during the installation and subscription registration process, you will attach an
appropriate subscription to each node. See Chapter 6 of the Red Hat Enterprise Linux 7
System Administrator’s Guide for subscription details.
NOTE
If you are using a system as the RHUA that has already been registered, and the
RHUA already has an attached subscription, you will see This system is already
registered. Use --force to override when you try to register it using #
subscription-manager register --type=rhui. If that occurs, you can override the
subscription by adding --force to the command line argument.
2. Register each CDS node that will be used unless existing, external, already registered systems
are used.
3. Register each HAProxy node that will be used unless existing, external, already registered
systems are used.
21
Red Hat Update Infrastructure 3.1 System Administrator's Guide
The new system will be available on the Customer Portal, and the new RHUA instance will not
have any subscriptions applied to it.
Subscription Name: Red Hat Update Infrastructure and RHEL Add-Ons for
Providers
Provides: dotNET on RHEL (for RHEL Server) from RHUI
Red Hat Enterprise Linux Server from RHUI
Red Hat Software Collections (for RHEL Server) from RHUI
Red Hat Enterprise Linux for SAP from RHUI
Red Hat Enterprise Linux Resilient Storage (for RHEL
Server) from RHUI
Red Hat Enterprise Linux Scalable File System (for RHEL
Server) from RHUI
Red Hat Enterprise Linux Server - Extended Update Support
from RHUI
dotNET on RHEL Beta (for RHEL Server) from RHUI
Red Hat Enterprise Linux for SAP Hana from RHUI
RHEL Software Test Suite (for RHEL Server) from RHUI
Red Hat Enterprise Linux High Availability (for RHEL
Server) from RHUI
Red Hat Update Infrastructure
Red Hat Enterprise Linux Load Balancer (for RHEL Server)
from RHUI
SKU: RC1116415
Contract: 11314314
Pool ID: 8a85f9815a71f0bd015a72445adf0223
Provides Management: No
Available: 20
Suggested: 1
Service Level: Premium
Service Type: L1-L3
22
CHAPTER 4. REGISTER RED HAT UPDATE INFRASTRUCTURE AND ATTACH SUBSCRIPTIONS
2. Use the Pool ID for your subscription to attach the subscription. Because there are two SKUs
and two subscription names, you need to run subscription-manager attach --pool=<Pool ID>
for each <Pool ID>.
2. Use the Pool ID of Red Hat Update Infrastructure and RHEL Add-Ons for Providers
subscription. This subscription provides access to Red Hat Enterprise Linux and Gluster
Storage.
2. Use the Pool ID of Red Hat Update Infrastructure and RHEL Add-Ons for Providers
subscription. This subscription provides access to Red Hat Enterprise Linux and HAProxy.
NOTE
23
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
The rhel-7-server-rhui-rpms repository is the base Red Hat Enterprise Linux repository
and should provide the necessary packages. The rhel-7-server-rhui-rpms is the same as
the rhel-7-server-rpms repository and is used automatically when you register the system
with --type=rhui.
The RHUA and CDS nodes require Red Hat Enterprise Linux installations with the base packages and
with all repositories disabled except for rhel-7-server-rpms. This requirement also means any third-party
configurations or software that is not directly necessary for the direct operation of the server cannot be
installed. This restriction includes hardening or other non-Red Hat security software.
1. List the enabled repositories to verify that your system is correctly subscribed.
2. Disable all repositories for the RHUA and enable the relevant repository by using the following
command.
4. Disable all repositories for the CDS nodes and enable the relevant by using the following
command.
6. Disable all repositories for the HAProxy nodes and enable the relevant repository by using the
following command.
24
CHAPTER 4. REGISTER RED HAT UPDATE INFRASTRUCTURE AND ATTACH SUBSCRIPTIONS
Report a bug
25
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
See the Red Hat Gluster Storage documentation for installation and administration details. In particular,
see Section 11.15 of the Red Hat Gluster Storage 3.4 Administration Guide for split-brain management.
WARNING
As of Red Hat Gluster Storage 3.4, two-way replication without arbiter bricks is
considered deprecated. Existing volumes that use two-way replication without
arbiter bricks remain supported for this release. New volumes with this configuration
are not supported. Red Hat no longer recommends the use of two-way replication
without arbiter bricks and plans to remove support entirely in future versions of Red
Hat Gluster Storage. This change affects both replicated and distributed-replicated
volumes that do not use arbiter bricks.
Two-way replication without arbiter bricks is being deprecated because it does not
provide adequate protection from split-brain conditions. Even in distributed-
replicated configurations, two-way replication cannot ensure that the correct copy
of a conflicting file is selected without the use of a tie-breaking node.
One concern regarding shared storage is the inability to expand block storage size if the disk usage
approaches 100% because of raw disk. Gluster Storage usually works on a physical server, and its bricks
are internal storage. With a physical server, the disks of bricks cannot be extended if they are assigned to
an entire physical internal disk. According to general storage practice, the brick should be placed on the
Logical Volume Manager (LVM.)
The following steps describe how to create a shared volume on LVM using Gluster Storage of three
nodes and install required packages. Refer to the product documentation if you are using a different
storage solution.
1. Run the following steps on all CDS nodes. The example shows cds1.
26
CHAPTER 5. SHARED STORAGE
# pvcreate /dev/vdb
6. Create a mount directory, mount the disk, enable glusterd, and start glusterd.
8. Run the following steps on only one CDS node, for example, cds1.
NOTE
Make sure DNS resolution is working. A bad name resolution error is shown
below.
IMPORTANT
The Gluster peer probe might also fail with peer probe: failed: Probe returned
with Transport endpoint is not connected when there is a communication or
port issue. A workaround to this failure is to disable the firewalld service. If you
prefer not to disable the firewall, you can allow the correct ports as described in
Section 3.1, Verifying Port Access of the Red Hat Gluster Storage Administration
Guide 3.4.
27
Red Hat Update Infrastructure 3.1 System Administrator's Guide
9. Before proceeding, verify that the peer connections were successful. You should see a similar
output.
# pvcreate /dev/vdc
3. Extend the logical volume itself by the amount of free disk space on the new physical volume.
# xfs_growfs /dev/mapper/vg_gluster-lv_brick1
5. Run df on the RHUA node to confirm that the mounted Gluster Storage volume has the
expected new size.
IMPORTANT
28
CHAPTER 5. SHARED STORAGE
IMPORTANT
Using a dedicated machine allows CDS nodes, and mainly your RHUI clients, to continue
to work if something happens to the RHUA node. Red Hat recommends that you set up
an NFS server on a dedicated machine.
1. Install the nfs-utils package on the node hosting the NFS server, on the RHUA node (if it
differs), and also on all your CDS nodes.
2. Edit the /etc/exports file on the NFS server. Choose a suitable directory to hold the RHUI
content and allow the RHUA node and all your CDS nodes to access it. For example, to use the
/export directory and make it available to all systems in the example.com domain, put the
following line to /etc/exports.
/export *.example.com(rw,no_root_squash)
# mkdir /export
NOTE
If you are using an existing NFS server and the NFS service is already running, use
restart instead of start.
5. Test your setup. On a CDS node, run the following commands, which assume that the NFS
server has been set up on a machine named filer.example.com.
# mkdir /mnt/nfstest
# mount filer.example.com:/export /mnt/nfstest
# touch /mnt/nfstest/test
6. To clean up after this test, remove the test file, unmount the remote share, and remove the
test directory.
# rm /mnt/nfstest/test
# umount /mnt/nfstest
# rmdir /mnt/nfstest
Your NFS server is now set up. See Section 8.7. NFS Server Configuration for more information
on NFS server configuration for RHEL 7.
29
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Report a bug
30
CHAPTER 6. INSTALL RED HAT UPDATE INFRASTRUCTURE
IMPORTANT
It is necessary to generate the RSA key pair on the Red Hat Update Appliance (RHUA)
node and copy the public key to content delivery server (CDS) and HAProxy nodes so
rhui-manager can set up the CDS and HAProxy nodes.
2. Press Enter to confirm the default location, ~/.ssh/id_rsa, for the newly created key.
3. Leave the passphrase field blank. The CDS installation and registration will fail if a passphrase is
provided while generating the key pair.
4. By default, the permissions of the ~/.ssh/ directory are set to rwx------ or 700 expressed in
octal notation. This is to ensure that only <$USER> can view the contents. If required, this can be
confirmed with the following command.
31
Red Hat Update Infrastructure 3.1 System Administrator's Guide
This command copies the most recently modified ~/.ssh/id*.pub public key if it is not yet
installed. Alternatively, specify the public key’s file name.
This command copies the content of ~/.ssh/id_rsa.pub into the ~/.ssh/authorized_keys file on
the machine to which you want to connect. If the file already exists, the keys are appended to its
end.
2. Press Enter to confirm the default location, ~/.ssh/id_ecdsa, for the newly created key.
3. Leave the passphrase field blank. The CDS installation and registration will fail if a passphrase is
provided while generating the key pair.
[USER@rhua ~]$
Your identification has been saved in /home/USER/.ssh/id_ecdsa.
Your public key has been saved in /home/USER/.ssh/id_ecdsa.pub.
The key fingerprint is:
fd:1d:ca:10:52:96:21:43:7e:bd:4c:fc:5b:35:6b:63 [email protected]
The key's randomart image is:
+--[ECDSA 256]---+
| .+ +o |
| . =.o |
| o o + ..|
| + + o +|
| S o o oE.|
| + oo+.|
| +o |
| |
| |
+-----------------+
4. By default, the permissions of the ~/.ssh/ directory are set to rwx------ or 700 expressed in octal
notation. This is to ensure that only <$USER> can view the contents. If required, this can be
confirmed.
32
CHAPTER 6. INSTALL RED HAT UPDATE INFRASTRUCTURE
This command copies the most recently modified ~/.ssh/id*.pub public key if it is not yet
installed. Alternatively, specify the public key’s file name.
WARNING
Make sure the host name of the RHUA is set correctly. If the host name is
unset and its value is reported as localhost.localdomain or localhost, you
will not be able to proceed.
NOTE
This section is optional and can be skipped if you are using a subscription to install Red
Hat Update Infrastructure 3.1.
To install the RHUI packages on the RHUA node, CDS nodes, and HAProxy nodes, mount the ISO to a
suitable directory (or burn the ISO to a CD, insert the CD, and mount the ISO), and enter the mount
point.
NOTE
This section is optional and can be skipped if you are using a subscription to install Red
Hat Update Infrastructure 3.1.
The setup_package_repos script is provided in the root directory of the RHUI ISO image.
IMPORTANT
33
Red Hat Update Infrastructure 3.1 System Administrator's Guide
IMPORTANT
The setup_package_repos script creates a Yum configuration entry that requires the
RHUI packages to be signed with the Red Hat Release key.
Perform the following step on the RHUA node, CDS nodes, and HAProxy nodes to install the RHUI
packages.
1. Execute the script from the mount point for the applicable system component.
This script will install the RHUI packages on the current machine.
- Ensuring we are in an expected directory.
- Copying installation files.
- Creating a Repository File
- Importing the gpg key.
- Installation repository will remain configured for future package installs.
- Installation media can now be safely unmounted.
Installation packages are now available on this system. If you are installing a RHUA, please
run yum install -y rhui-installer; rhui-installer.
If you are installing a CDS, please log into the RHUA and run rhui-manager to begin the
installation. Do not run rhui-installer to install a CDS.
[..............................................................................]
Success!
The initial credentials are admin / <system-generated password>
34
CHAPTER 6. INSTALL RED HAT UPDATE INFRASTRUCTURE
NOTE
--remote-fs-type=glusterfs --remote-fs-server=cds1.example.com:rhui_content_0
specify the NFS server name and the exported directory, joined by the colon sign, as the
parameter of the --remote-fs-server option. For example:
--remote-fs-server=filer.example.com:/export
NOTE
Rerunning the rhui-installer will not update the rhui-manager login password.
1. Navigate to the Red Hat Update Infrastructure Management Tool home screen.
35
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Previous authentication credentials could not be found. Logging into the RHUI.
If this is the first time using the RHUI, it is recommended to change the user's password in
the User Management section of RHUI Tools.
2. Enter the RHUI Username (admin) and RHUI Password (provided by the rhui-installer output).
The initial password is also stored in /etc/rhui-installer/answers.yaml.
3. After successfully logging in for the first time, you should change the password. Press u on the
Red Hat Update Infrastructure Management Tool home screen to select manage RHUI users.
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
------------------------------------------------------------------------------
= Red Hat Update Infrastructure Management Tool =
= User Manager =
Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (users) => p
Warning: After password change you will be logged out.
Use ctrl-c to cancel password change.
Username: admin
5. Enter the new password and press Enter. Re-enter the new password and press Enter.
New Password:
Re-enter Password:
36
CHAPTER 6. INSTALL RED HAT UPDATE INFRASTRUCTURE
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
-= Subscriptions Manager =-
Connected: rhua.example.com
4. Register the subscriptions by entering the number beside each subscription that you want to
include, or enter a to select all of them.
5. Press c when your are finished selecting the subscriptions. The Red Hat Update Infrastructure
Management Tool displays the subscriptions to be registered and prompts for confirmation.
7. Check that the correct subscriptions have been registered by pressing l to access the list
registered Red Hat subscriptions screen.
Report a bug
37
Red Hat Update Infrastructure 3.1 System Administrator's Guide
RHUA node checks the validity of the certificate hourly. To ensure that the automatic update service
works properly, make sure your /rhui-manager/ user name and password are set in the /etc/rhui/rhui-
subscription-sync.conf file. By default, this file contains the following configuration:
[auth]
username = admin
password =
If you changed the password, as described in Section 6.7, “Change the Initial Password” , your new
password has been saved in the /etc/rhui/rhui-subscription-sync.conf file. If you did not change the
password, or if your rhui-manager user name is not admin, edit this file to set your rhui-manager
password.
IMPORTANT
The subscription synchronization service only works if your contract with Red Hat is still
valid and your subscription is still active. The service can renew entitlement certificates,
but not the subscription itself.
NOTE
To prevent this, do not reboot or restart Qpid while there are some waiting tasks. If you often have to do
so anyway, you can keep at least the waiting tasks by installing the Qpid persistence extension:
From now on, waiting tasks will be saved on the disk and resumed after rebooting.
38
CHAPTER 7. ADD OR DELETE A CONTENT DELIVERY SERVER
1. Make sure sshd is running on the CDS node and that ports 443 and 5000 are open.
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
------------------------------------------------------------------------------
= Red Hat Update Infrastructure Management Tool =
Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (cds) => a
39
Red Hat Update Infrastructure 3.1 System Administrator's Guide
6. Enter the user name that will have SSH access to the CDS and have sudo privileges.
7. Enter the absolute path to the SSH private key for logging in to the CDS and press Enter.
Hostname: <cds1.example.com>
SSH Username: root
SSH Private Key: /root/.ssh/id_rsa
8. If adding the content delivery server fails, check that the firewall rules permit access between
the RHUA and the CDS.
10. After successful configuration, repeat these steps for any remaining CDSs. You can also add a
CDS using the command-line interface.
-= Home =-
r manage repositories
c manage content delivery servers (CDS)
l manage HAProxy load-balancer instances
40
CHAPTER 7. ADD OR DELETE A CONTENT DELIVERY SERVER
Connected: rhua.example.com
------------------------------------------------------------------------------
= Red Hat Update Infrastructure Management Tool =
Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (cds) => d
# cat /etc/haproxy/haproxy.cfg
Report a bug
1. Make sure all your RHUI nodes are running version 3.1 or later. If you have originally installed
RHUI from an older version, you also have to reinstall your CDS nodes in rhui-manager first.
2. Transfer your legacy CA certificate to your CDS nodes and save it in the /etc/pki/rhui/legacy-
ca/ directory.
3. Get the subject hash value from the certificate and keep it in a shell variable:
41
Red Hat Update Infrastructure 3.1 System Administrator's Guide
4. Create a symbolic link to the certificate file in the /etc/pki/tls/certs/ directory with the hash
and an unused number, starting from 0, as the symbolic link name:
NOTE
If you decide to stop accepting the certificate, delete the symbolic link and the
certificate file, and restart the httpd service.
42
CHAPTER 8. ADD AN HAPROXY LOAD BALANCER
1. Make sure sshd is running on the HAProxy node and that ports 443 and 5000 are open.
2. Navigate to the Red Hat Update Infrastructure Management Tool home screen.
3. In the Red Hat Update Infrastructure Management Toolhome screen, press l to select
manage HAProxy load-balancer instances.
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
------------------------------------------------------------------------------
= Red Hat Update Infrastructure Management Tool =
Connected: rhua.example.com
------------------------------------------------------------------------------
6. Enter the user name that will have SSH access to the HAProxy load balancer and have sudo
43
Red Hat Update Infrastructure 3.1 System Administrator's Guide
6. Enter the user name that will have SSH access to the HAProxy load balancer and have sudo
privileges.
7. Enter the absolute part to the SSH private key for logging in to the HAProxy load balancer and
press Enter.
Hostname: <haproxy1.example.com>
SSH Username: root
8. After successful configuration, repeat these steps for any remaining HAProxy load balancers.
You can also add an HAProxy load balancer through the command-line interface.
Report a bug
44
CHAPTER 9. CREATE AND SYNCHRONIZE A RED HAT REPOSITORY
2. In the Red Hat Update Infrastructure Management Tool home screen, press r to select manage
repositories.
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
----------------------------------------------------------------------------------
-= Red Hat Update Infrastructure Management Tool =-
= Repository Management =-
Connected: rhua.example.com
------------------------------------------------------------------------------
4. Wait for the Red Hat Update Infrastructure Management Tool to determine the entitled
repositories. This might take several minutes.
Connected: rhua.example.com
45
Red Hat Update Infrastructure 3.1 System Administrator's Guide
------------------------------------------------------------------------------
5. The Red Hat Update Infrastructure Management Tool prompts for a selection method.
Import Repositories:
1 - All in Certificate
2 - By Product
3 - By Repository
7. Add Red Hat repositories to the RHUA by entering the number beside each repository that you
want to include. The only repositories that will display are Red Hat repositories that are included
in your entitlement certificate but have not yet been added.
8. Press c when your are finished selecting the repositories. The Red Hat Update Infrastructure
Management Tool displays the repositories to be deployed and prompts for confirmation.
10. Check that the correct repositories have been installed by pressing l to access the list
repositories currently managed by the RHUI screen.
1. Navigate to the Red Hat Update Infrastructure Management Tool home screen.
-= 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
46
CHAPTER 9. CREATE AND SYNCHRONIZE A RED HAT REPOSITORY
Connected: rhua.example.com
------------------------------------------------------------------------------
-= Red Hat Update Infrastructure Management Tool =-
-= Synchronization Status =-
Connected: rhua.example.com
------------------------------------------------------------------------------
5. Press y to proceed.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Red Hat Enterprise Linux 7 Server - Extras from RHUI (RPMs) (x86_64)
Connected: rhua.example.com
------------------------------------------------------------------------------
47
Red Hat Update Infrastructure 3.1 System Administrator's Guide
2. If you see a running job, as shown below, do not reboot. Wait until the result is something other
than Running.
Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs) from RHUI (7Server-
x86_64) Running
3. If you must reboot, or if the system was rebooted for a reason beyond your control, check the
output of rhui-manager status when the system is up. You can also check the Pulp task list with
the following command.
4. Use the actual password of the admin user after the -p switch. If you see No tasks found, then
the synchronization process was safely interrupted. You can now synchronize the repository
manually in rhui-manager, or you can wait for the next available time slot, during which the
repository will synchronize automatically.
NOTE
In addition, you can avoid losing tasks that are in the waiting state when the
system reboots by installing the Qpid persistence extension as described in
Section 6.10.1, “Qpid Persistence Extension” .
Sometimes an attempt to synchronize a repository whose synchronization was interrupted can fail. The
state is Running, and there is also a running Pulp task, but nothing is being transferred. If the status has
been Running for an excessive amount of time, check whether there is an issue by examining the
repository synchronization status. . Find out the name of the repository in the Pulp task list. For
example,
Operations: sync
Resources: rhel-x86_64-6-rhui-2-rpms-6Server-x86_64 (repository)
State: Running
Start Time: 2017-05-24T08:16:48Z
Finish Time: Incomplete
Task Id: 6e44a32d-2e11-41f2-bbe6-996531c5cda0
Operations: publish
Resources: rhel-x86_64-6-rhui-2-rpms-6Server-x86_64 (repository)
State: Waiting
48
CHAPTER 9. CREATE AND SYNCHRONIZE A RED HAT REPOSITORY
1. Check the synchronization status. If you see the following output, there is a problem.
[root@rhua ~]# pulp-admin -u admin -p admin rpm repo sync status --repo-id rhel-x86_64-6-
rhui-2-rpms-6Server-x86_64
+----------------------------------------------------------------------+
Repository Status [rhel-x86_64-6-rhui-2-rpms-6Server-x86_64]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Downloading metadata...
[-]
... completed
... completed
Importing errata...
[-]
... completed
2. You have to cancel the open Pulp tasks and try synchronizing the affected repository again to
resolve the problem and ensure that the repository is available on the RHUA. Use pulp-admin
again as follows to view the task IDs.
Operations: sync
Resources: rhel-x86_64-6-rhui-2-rpms-6Server-x86_64 (repository)
49
Red Hat Update Infrastructure 3.1 System Administrator's Guide
State: Running
Start Time: 2017-05-24T08:16:48Z
Finish Time: Incomplete
Task Id: 6e44a32d-2e11-41f2-bbe6-996531c5cda0
Operations: publish
Resources: rhel-x86_64-6-rhui-2-rpms-6Server-x86_64 (repository)
State: Waiting
Start Time: Unstarted
Finish Time: Incomplete
Task Id: 13f5d531-2f0d-4a73-9d27-b4fd126b6f13
5. Try synchronizing the repository again in rhui-manager. Use the same pulp-admin commands as
earlier to monitor the progress. If you run into the same problem again, the repository is likely in
an irreparable state and will have to be removed from RHUA and added again.
9. In edge cases, the repository cannot be removed because rhui-manager reports: "Task deletion
is still occurring, any actions taken while this is not complete can result in errors." If that happens,
restart the Pulp services.
a. For RHEL 6:
b. For RHEL 7:
10. Replace restart with status in the above commands to verify each service has restarted.
Report a bug
50
CHAPTER 10. CLIENT ENTITLEMENT CERTIFICATE AND CLIENT CONFIGURATION RPM
2. In the Red Hat Update Infrastructure Management Tool home screen, press e to select create
entitlement certificates and client configuration RPMs.
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
------------------------------------------------------------------------------
-= Red Hat Update Infrastructure Management Tool =-
Connected: rhua.example.com
------------------------------------------------------------------------------
4. 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.
IMPORTANT
Include 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.
51
Red Hat Update Infrastructure 3.1 System Administrator's Guide
6. 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:
7. Enter a path to save the certificate to. Leave the field blank to save it to the current working
directory.
8. 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.
9. Press y at the prompt to confirm the information and create the entitlement certificate.
Red Hat Enterprise Linux for SAP (RHEL 6 Server) (RPMs) from RHUI
Proceed? (y/n) y
.................................................+++
Entitlement certificate created at /root/clientcert/rhuiclientexample.crt
------------------------------------------------------------------------------
NOTE
Use Red Hat repository labels, not IDs. To get a list of all labels, run rhui-manager client
labels. 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.
52
CHAPTER 10. CLIENT ENTITLEMENT CERTIFICATE AND CLIENT CONFIGURATION RPM
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
3. 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
clientrpmtest
5. Enter the version of the configuration RPM. The default version is 2.0.
7. Enter the full path to the entitlement certificate authorizing the client to access specific
channels.
8. 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
- 1 : unprotected_repo1
53
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
Using 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.
For more a complete list of parameters, see Appendix B, Red Hat Update Infrastructure Command-Line
Interface.
NOTE
The rhn-plugin and subscription-manager plugin will be disabled in yum after the
client RPM has been installed.
3. View yum repositories to ensure the repository was added and packages are available for
installing.
54
CHAPTER 10. CLIENT ENTITLEMENT CERTIFICATE AND CLIENT CONFIGURATION RPM
1. To set the yum releasever variable to version, which creates the /etc/yum/vars/releasever file,
which in turn makes yum use EUS repositories with this particular version, run the following
command.
2. To unset the releasever variable (to remove the file), run the following command.
rhui-set-release --unset
rhui-set-release
NOTE
Report a bug
55
Red Hat Update Infrastructure 3.1 System Administrator's Guide
A 4,096-bit RSA key is used because this profile will be used for RHUI servers that run on
Red Hat Enterprise Linux (RHEL) 6 or RHEL 7. Gathering sufficient random data to
generate a 4,096-bit key may take a significant amount of time, particularly if the Red Hat
Update Appliance (RHUA) is a virtual machine. The disk activity created by a repository or
content delivery server (CDS) synchronization may speed up the process.
The name of the client profile RPM (in this case, rhui-client-rhui), which will be created in a
later step, is used as the comment portion of the user ID. It is recommended that a different
signing key be used for each client profile; the client profile name is used to distinguish the
user IDs of the different keys.
# gpg --gen-key
gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
Your selection? 4
Is this correct? y
56
CHAPTER 11. CREATE CLIENT PROFILES FOR THE RED HAT UPDATE INFRASTRUCTURE SERVERS
Comment: rhui-client-rhui
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
Key fingerprint = 1139 932A 26E2 981A 1341 D636 0DDB B5F6 EDD0 925F4
Note that this key cannot be used for encryption. You may want to use the command “--edit-
key” to generate a subkey for this purpose.
3. Create a second key. This time choose option 3, DSA (sign only), as the key type and enter 1024
bits as the key size. These options create a key that can be used to sign RPMs for both RHEL 6
and RHEL 7. Use rhui-client-all as the comment portion of the user ID.
# mkdir /root/rpm-gpg
# gpg --export --armor rhui-client-rhui >> /root/rpm-gpg/rhui-client-rhui
# gpg --export --armor rhui-client-all >> /root/rpm-gpg/rhui-client-all
GPG defaults to substring matching when searching for keys. It is only necessary to specify the
unique portion of the user ID (the client profile RPM name in this case). The traditional RPM-
GPG-KEY- prefix will be added to the GPG key file names when the Red Hat Update
Infrastructure Management Tool creates client configuration packages.
57
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Like Red Hat content repositories, all of which are protected, protected custom repositories that differ
only in processor architecture (i386 versus AMD64) are consolidated into a single entitlement within an
entitlement certificate, using the $basearch yum variable.
In the event of certificate problems, an unprotected repository for RHUI servers can be used as a
fallback method for distributing updated RPMs to the RHUI servers.
1. Navigate to the Red Hat Update Infrastructure Management Tool home screen.
2. From the Repository Management screen, press c to select create a new custom repository
(RPM content only).
------------------------------------------------------------------------------
-= Red Hat Update Infrastructure Management Tool =-
-= Repository Management =-
Connected: rhua.example.com
------------------------------------------------------------------------------
3. Enter a unique ID for the repository. Only alphanumeric characters, _ (underscore), and -
(hyphen) are permitted. You cannot use spaces in the unique ID. For example, repo1, repo_1, and
repo-1 are all valid entries.
4. Enter a display name for the repository. This name is used to identify the repository within the
Red Hat Update Infrastructure Management Tool.
5. Specify the path that will host the repository. The path must be unique across all repositories
hosted by RHUI. For example, if you specify the path at this step as some/unique/name, then
the repository will be located at //server/pulp/repos/some/unique/name.
6. Select sha256 as the checksum type to be used for the repository metadata.
NOTE
Use sha256 when you create a custom repository for RHEL 6 or RHEL 7. Use
sha1 if you create repositories for RHEL 5 client.
7. Choose whether to protect the new repository. If you answer no to this question, any client can
58
CHAPTER 11. CREATE CLIENT PROFILES FOR THE RED HAT UPDATE INFRASTRUCTURE SERVERS
7. Choose whether to protect the new repository. If you answer no to this question, any client can
access the repository. If you answer yes, only clients with an appropriate entitlement certificate
can access the repository.
NOTE
If you choose to protect the new repository, the Red Hat Update Infrastructure Management
Tool will ask for the entitlement path. It will also suggest the entitlement path based on the
repository’s relative path.
Client entitlement certificates contain the download URLs that they are allowed to access. The
RHUI analyzes the contents of the certificate to determine if the repository requested matches
any of the permitted URLs, which determines whether to allow the client to authenticate. For
example, if an entitlement certificate grants access to /some/unique/name and the request is
made to a repository located at //server/pulp/repos/some/unique/name/os/repodata, the
RHUI will approve the request and grant the authentication because the path begins with one of
the entitled download URLs. The URL only needs to begin with the correct information; it does
not need to match exactly.
NOTE
Entitlements can also contain variables, as long as yum knows the value for the variable. The two
most common variables to use are $basearch and $releasever, which are populated with
details of the client making the request. For example, if an entitlement certificate grants access
to /unique-name/$basearch/bar and the request is made to a repository located at
//server/pulp/repos/unique-name/x86_64/bar, the RHUI will approve the request and grant the
authentication because the path matches when the variable is populated.
The Red Hat Update Infrastructure Management Tool suggests a path to use based on the
variables you used when you gave it a path for the repository. Leave the field blank to accept the
suggested path.
The Red Hat Update Infrastructure Management Tool will ask if you want GNU Privacy Guard
(GPG) signature turned on for content in that repository. If you press y, you will be asked if the
content will be signed by Red Hat. Answering yes will include Red Hat’s GPG key in the
repository configuration. You are then asked if the content will be signed by a custom GPG key.
Answering yes will prompt for a path to a public GPG key to include in the repository
configuration. You can continue entering multiple paths to public GPG keys.
59
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Should the repository require clients to perform a GPG check and verify packages are signed
by a GPG key? (y/n) y
Will the repository be used to host any Red Hat GPG signed content? (y/n) y
Will the repository be used to host any custom GPG signed content? (y/n) y
Enter the absolute path to the public key of the GPG key pair:
/root/rpm-gpg/rhui-client-rhui.gpg
Enter the absolute path to the public key of the GPG key pair:
/root/rpm-gpg/rhui-client-all.gpg
8. The details of the new repository displays. Press y at the prompt to confirm the information and
create the repository.
2. The client configuration RPM will configure a yum repository called rhui-$ORIGINALNAME. Use
yum update to update each node.
# yum update
NOTE
Running yum update pulls updates from all enabled yum repositories. To pull
updates from the rhui-rhui-3 yum repository only, use the following command.
Report a bug
60
CHAPTER 12. CREATE CLIENT IMAGES AND TEMPLATES
If used, iptables should be blocking access to all ports other than SSH (and any other ports
required for proper operation of the cloud infrastructure).
Local passwords should use a hashing algorithm at least as strong as the default for that RHEL
version (SHA-512 for Red Hat Enterprise Linux 7).
File system type should be xfs (Red Hat Enterprise Linux 7).
See the Cloud Image Certification Policy Guide for more details.
5. Updates will come from RHUI instead of the Red Hat Subscription Manager (rhsm); turn off
rhsm by editing ./rhsm.conf to reflect enabled=0.
6. Optionally (but strongly recommended), run the yum update command to apply all available
updates.
61
Red Hat Update Infrastructure 3.1 System Administrator's Guide
The image must be sanitized to make it suitable for use as a template. This script can be used to sanitize
a virtual machine image in preparation for use as a template. It is compatible with Red Hat Enterprise
Linux 6 and Red Hat Enterprise Linux 7 images.
NOTE
The script might require modification in some environments. Review this script carefully
before use and make sure that the changes it makes to the image are compatible with
your environment.
#!/bin/bash
# RHEL 7
if ! [[ `runlevel | cut -d " " -f 2` =~ ^[1S]$ ]]; then
echo "Please *boot* to runlevel 1"
exit 3
fi
# Kill udev
killall -9 udevd
done
done
done
62
CHAPTER 12. CREATE CLIENT IMAGES AND TEMPLATES
done
NOTE
2. When the system has rebooted into single-user mode, execute the following commands.
# unset HISTFILE
# chmod 0755 /mktemplate.sh
# /mktemplate.sh
# rm -f /mktemplate.sh
# poweroff
Report a bug
63
Red Hat Update Infrastructure 3.1 System Administrator's Guide
See the Red Hat Certified Cloud and Service Provider Certification Workflow Guide for more
information.
After certifications have been reviewed by Red Hat, a pass/fail will be assigned and certification will be
posted to on the public Red Hat certification website at Certified Service and Product Catalogs .
Report a bug
64
CHAPTER 14. MANAGE CONTENT
Contact your CCSP if a required channel is missing. You can learn more about what is available by
browsing the Certification Catalog.
2. In the Red Hat Update Infrastructure Management Tool home screen, press r to select manage
repositories.
Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (repo) => l
65
Red Hat Update Infrastructure 3.1 System Administrator's Guide
1. From the Repository Management screen, press i. The output contains all repositories that are
managed by Red Hat Update Infrastructure.
2. Select which repository to view by typing the repository’s number at the prompt. Typing the
number of a repository places a checkmark next to the name of that repository. You can also
choose the range of repositories, for instance, by entering 1 - 5.
NOTE
The repository content remains on the disk and takes up disk space. This content is
known as an orphan content unit, or an orphan for short. See Section 14.3, “Orphaned
Content Units” for more details.
1. From the Repository Management screen, press d at the prompt to delete a Red Hat
repository. A list of all repositories currently being managed by RHUI displays.
2. Select which repositories to delete 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. You can also
choose the range of repositories, for instance, by entering 1 - 5.
NOTE
66
CHAPTER 14. MANAGE CONTENT
NOTE
After you delete the repositories, the client configuration RPMs that refer to the
deleted repositories will not be available to be used by yum.
1. To see a complete list, regardless of how many packages are contained within a repository, press
r at the Home screen to access the Repository Management screen.
3. Select the number of the repository you want to view. The Red Hat Update Infrastructure
Management Tool asks if you want to filter the results. Leave the line blank to see the results
without a filter.
4. Alternatively, type the first few letters of the RPM name you are looking for to filter the results.
Like Red Hat content repositories, all of which are protected, protected custom repositories that differ
only in processor architecture (i386 versus AMD64) are consolidated into a single entitlement within an
entitlement certificate, using the $basearch yum variable.
If certificate validation prevents access, you can use an unprotected server repository to distribute
RPMs to the RHUI servers. . From the Repository Management screen, press c to access the create a
new custom repository (RPM content only) screen.
1. Enter a unique ID for the repository. Only alphanumeric characters, _ (underscore), and -
(hyphen) are permitted. You cannot use spaces in the unique ID. For example, repo1, repo_1, and
repo-1 are all valid entries.
2. Enter a display name for the repository. This name is used to identify the repository within the
Red Hat Update Infrastructure Management Tool.
3. Specify the path that will host the repository. The path must be unique across all repositories
hosted by Red Hat Update Infrastructure. For example, if you specify the path at this step as
some/unique/name, then the repository will be located at
//<server>/pulp/repos/some/unique/name.
4. Select sha256 as the checksum type to be used for the repository metadata.
5. Choose whether to protect the new repository. If you answer no to this question, any client can
access the repository. If you answer yes, only clients with an appropriate entitlement certificate
can access the repository.
NOTE
67
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
6. If you choose to protect the new repository, the Red Hat Update Infrastructure Management
Tool will ask for the entitlement path. It will also suggest the entitlement path based on the
repository’s relative path.
Client entitlement certificates contain the download URLs that they are allowed to access. The
RHUI analyzes the contents of the certificate to determine if the repository requested matches
any of the permitted URLs, which determines whether to allow the client to authenticate. For
example, if an entitlement certificate grants access to /some/unique/name and the request is
made to a repository located at //server/pulp/repos/some/unique/name/os/repodata, RHUI will
approve the request and grant the authentication because the path begins with one of the
entitled download URLs. The URL only needs to begin with the correct information; it does not
need to match exactly.
Entitlements can also contain variables, as long as yum knows the value for the variable. The two
most common variables to use are $basearch and $releasever, which are populated with
details of the client making the request. For example, if an entitlement certificate grants access
to /unique-name/$basearch/bar and the request is made to a repository located at
//server/pulp/repos/unique-name/x86_64/bar, RHUI will approve the request and grant the
authentication because the path matches when the variable is populated.
The Red Hat Update Infrastructure Management Tool suggests a path to use based on the
variables you used when you gave it a path for the repository. Leave the field blank to accept the
suggested path.
The Red Hat Update Infrastructure Management Tool will ask if you want GNU Privacy Guard
(GPG) signature turned on for content in that repository. If you press y, you will be asked if the
content will be signed by Red Hat. Answering yes will include Red Hat’s GPG key in the
repository configuration. You are then asked if the content will be signed by a custom GPG key.
Answering yes will prompt for a path to a public GPG key to include in the repository
configuration. You can continue entering multiple paths to public GPG keys.
Should the repository require clients to perform a GPG check and verify packages are signed
by a GPG key? (y/n) y
Will the repository be used to host any Red Hat GPG signed content? (y/n) y
Will the repository be used to host any custom GPG signed content? (y/n) y
Enter the absolute path to the public key of the GPG key pair:
/tmp/rhuitest1.gpg
Enter the absolute path to the public key of the GPG key pair:
68
CHAPTER 14. MANAGE CONTENT
/root/rpm-gpg/rhui-client-rhui.gpg
7. The details of the new repository display. Press y at the prompt to confirm the information and
create the repository.
1. From the Repository Management screen, press u at the prompt to upload new packages to a
particular repository. A list of all available custom repositories displays.
NOTE
2. Select which custom repository to add the packages to 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 to have been checked.
4. Specify the location of the RPMs to upload. This can be a single .rpm file, or it can be a directory
containing several .rpm files. If you specify a directory, all .rpm files in that directory are
uploaded. The details of the new packages to upload display.
5. Press y at the prompt to confirm the information and upload the packages.
origin-1.0-1.noarch.rpm
parent-1.0-1.noarch.rpm
patb-0.1-2.x86_64.rpm
rh-amazon-rhui-client-rhs30-2.2.124-1.el7.noarch.rpm
Proceed? (y/n) y
Choose a repository:
1 - HP Packages for Testing
Enter value (1-1) or 'b' to abort: 1
Enter the first few characters (case insensitive) of an RPM to filter the results
69
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Only filtered results that contain less than 100 packages will have their
contents displayed. Results with more than 100 packages will display
a package count only.
Packages:
hprest-1.5-79.x86_64.rpm
hpsum-7.6.0-86.rhel7.x86_64.rpm
ilorest-2.2.2-6.x86_64.rpm <========== Goal, delete this package
sum-8.2.0-53.rhel7.x86_64.rpm
2. Use the pulp-admin command to list the repository information, including the repo_id.
# pulp-admin --username admin --password "redhat" rpm repo content rpm --repo-id
"custom_repo1" --str-eq="filename=ilorest-2.2.2-6.x86_64.rpm"
Arch: x86_64
Buildhost: bls11u3x64001.sde.rdlabs.hpecorp.net
Checksum: 570b98fff1943819e554ff5d643f674a1aa00fc1b362900badfdc4bd0943ce06
Checksumtype: sha256
Description: Command line interface for managing HPE ProLiant Servers Authors:
-------- Hewlett Packard Enterprise
Epoch: 0
Filename: ilorest-2.2.2-6.x86_64.rpm
License: Copyright 2016 Hewlett Packard Enterprise Development LP
Name: ilorest
Provides: config(ilorest) = 2.2.2-6-0, ilorest = 2.2.2-6-0, ilorest(x86-64)
= 2.2.2-6-0, ilorest_chif.so()(64bit)
Release: 6
Requires: /bin/sh, /bin/sh, libc.so.6()(64bit),
libc.so.6(GLIBC_2.2.5)(64bit), libc.so.6(GLIBC_2.3)(64bit),
libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit),
libz.so.1()(64bit), rtld(GNU_HASH)
Vendor: Hewlett Packard Enterprise Company
Version: 2.2.2
# pulp-admin --username admin --password "redhat" rpm repo remove rpm --repo-id
"custom_repo1" --str-eq="filename=ilorest-2.2.2-6.x86_64.rpm"
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
70
CHAPTER 14. MANAGE CONTENT
Units Removed:
ilorest-2.2.2-6-x86_64
6. Remove the orphaned RPM disassociated from the repository and reclaim disk space as
described in Section 14.3, “Orphaned Content Units” .
You can only import the metadata from the command line interface. Run the following command to
import the data to the specified custom repository from the specified updateinfo file.
NOTE
It can take time for this command to complete, especially if the updateinfo file contains a
large number of updates. Progress is logged in the /root/.rhui/rhui.log file.
WARNING
Once an erratum has been imported from an updateinfo file, it cannot be imported
again; that would violate the uniqueness of the errata ID as the database key. If you
reimport an updateinfo file with additional errata entries, old entries remain
untouched, and any additional entries are added. Should you need to replace a
previously added erratum, delete it in MongoDB directly before importing an
updateinfo file.
71
Red Hat Update Infrastructure 3.1 System Administrator's Guide
This RPM can be created only from the command line interface. To create it, you must have at least one
repository. In addition, you either have to have an entitlement certificate and key for the repositories as
described in Create an Entitlement Certificate , or you have to know the labels for the repositories that
you want to include.
To create an alternate content source configuration RPM using a previously generated entitlement
certificate, run a command such as the following:
To create an alternate content source configuration RPM using one or more labels, in which case an
appropriate certificate is created on the fly, run a command such as the following:
NOTE
To obtain a list of labels for all the repositories for which you have access, run the
following command:
----
# rhui-manager client labels
----
You can delete orphans on the RHUA and CDSs to reclaim disk space. The following procedure deletes
orphans from RHUI. Perform a complete backup before using these steps.
1. Run the following command from the RHUA to display orphaned packages.
72
CHAPTER 14. MANAGE CONTENT
Available Arguments:
Available Arguments:
--bg - if specified, the client process will end immediately (the task
will continue to run on the server)
--type - restrict to one content type such as "rpm", "errata",
"puppet_module", etc.
--unit-id - ID of a content unit; if specified, you must also specify a type
--all - remove all orphaned units, ignoring other options
The Content Delivery Server (CDS) Managementscreen is used to list, add, reinstall, and delete CDS
nodes.
1. In the Red Hat Update Infrastructure Management Tool home screen, press c to access the
Content Delivery Server (CDS) Managementscreen.
73
Red Hat Update Infrastructure 3.1 System Administrator's Guide
-= 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
sm manage Red Hat subscriptions
u manage RHUI users
Connected: rhua.example.com
2. From the Content Delivery Server (CDS) Managementscreen, press l at the prompt to list
the CDS nodes that RHUI manages.
------------------------------------------------------------------------------
-= Red Hat Update Infrastructure Management Tool =-
Connected: ip-10-99-206-124.ec2.internal
------------------------------------------------------------------------------
rhui (cds) =>l
Hostname: cds1.example.com
SSH Username: root
SSH Private Key: /root/.ssh/cds.rsa
Hostname: cds2.example.com
SSH Username: root
SSH Private Key: /root/.ssh/cds.rsa
Hostname: cds3.example.com
SSH Username: root
SSH Private Key: /root/.ssh/cds.rsa
------------------------------------------------------------------------------
Requires less storage and in-memory space than VMs: Because the containers hold only what is
needed to run an application, saving and sharing is more efficient with Docker containers than it
is with VMs that include entire operating systems.
Improved performance: Because you are not running an entirely separate operating system, a
74
CHAPTER 14. MANAGE CONTENT
Improved performance: Because you are not running an entirely separate operating system, a
container typically runs faster than an application that carries the overhead of a whole new VM.
Secure: Because a Docker container typically has its own network interfaces, file system, and
memory, the application running in that container can be isolated and secured from other
activities on a host computer.
Flexible: With an application’s runtime requirements included with the application in the
container, a Docker container can run in multiple environments.
Linux containers with docker format are supported running on hosts with SELinux enabled. SELinux is
not supported when the /var/lib/docker directory is located on a volume using the B-tree file system
(Btrfs).
NOTE
The docker API takes over the root folder (/) on the httpd instance and must run on a
different port. Port 5000 is currently used, but this will be user-configurable in the future.
The RHUA must know the port because the docker client uses the host name and port
when finding the Certificate Authority to use for docker content.
See Get Started with Docker Formatted Container Images and Red Hat Enterprise Linux Atomic Host 7:
Getting Started with Containers for more information about containers.
A container is an application sandbox. Each container is based on an image that holds necessary
configuration data. When you launch a container from an image, a writable layer is added on top of this
image. Every time you commit a container (using the docker commit command), a new image layer is
added to store your changes.
An image is a read-only layer that is never modified; all changes are made in the top-most writable layer,
and it can be saved only by creating a new image. Each image depends on one or more parent images.
A platform image is an image that has no parent. Platform images define the runtime environment,
packages, and utilities necessary for a containerized application to run. The platform image is read-only,
so any changes are reflected in the copied images stacked on top of it.
NOTE
75
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
Registries often require authentication for all or private containers. In the case of
registry.redhat.io, Red Hat credentials or Registry Service Account credentials must be
used at all times. Therefore, RHUI needs valid credentials to be able to synchronize
containers. There are two ways to supply the credentials to RHUI, both of which are
described in the following procedure.
1. Register the client and get subscriptions using the instructions in Register Red Hat Update
Infrastructure and Attach Subscriptions.
2. Alternatively, you can register the system using Subscription Management tools and install the
docker package. Also enable the software repositories needed. (Replace pool_id with the pool
ID of your RHEL 7 subscription.) For example:
The current RHEL 7 release and RHEL 7 Atomic Host release each include two different
versions of Docker.
docker: This package includes the version of Docker that is the default for the current
release of RHEL. Install this package if you want a more stable version of Docker that is
compatible with the current versions of Kubernetes and OpenShift available with Red Hat
Enterprise Linux.
docker-latest: This package includes a later version of Docker that you can use if you want
to work with newer features of Docker. This version is not compatible with the versions of
Kubernetes and OpenShift that are available with the current release of Red Hat Enterprise
Linux.
See the Atomic Host and Containers section of the Red Hat Enterprise Linux Release Notes
for more details on the contents of docker and docker-latest packages and how to enable
the docker-latest package.
3. Install and use the default docker package (along with a couple of dependent packages if they
are not yet installed).
See Section 1.3. Getting Docker in RHEL 7 of the Getting Started with Containers document for
more information about Docker and Red Hat Enterprise Linux and Atomic Host.
4. Optional: Set container registry credentials in the RHUI configuration. To do so, edit the
/etc/rhui/rhui-tools.conf file. If you have a clean installation of RHUI 3.1.3 and newer, the last
several lines contain a [docker] section with docker-specific options and handy comments. If you
have updated from an earlier version, the section is available at the end of the /etc/rhui/rhui-
tools.conf.rpmnew file and you can copy it to the rhui-tools.conf file. Now uncomment the lines
in the [docker] section as follows:
76
CHAPTER 14. MANAGE CONTENT
[docker]
…
docker_username: your_RH_login
docker_password: your_RH_password
If you normally synchronize from a registry different from registry.redhat.io, also change the
values of the docker_url and docker_auth options accordingly.
Alternatively, if you do not want the password to be present in the configuration file, set only
your login, keeping the line that starts with docker_password commented out. You will then
enter your password by hand when adding a new container.
5. From the Red Hat Update Infrastructure Management Tool, press r to access the Repository
Management screen.
-= Repository Management =-
Connected: rhua.example.com
7. If the above container exists in a non-default registry, enter the registry URL. Press Enter
without entering anything to use the default registry.
jboss-eap-6/eap64-openshift
NOTE
The rhui-manager can convert the name of the container from the registry to the
format that is usable in Pulp. It does so by replacing slashes and dots with
underscores. You can accept such a converted name by pressing Enter or by
entering a name of your choice.
jboss-eap-6_eap64-openshift
77
Red Hat Update Infrastructure 3.1 System Administrator's Guide
11. A prompt may display if you did not set your login or password in the RHUI configuration. Enter
the required information to continue.
y
Successfully added container JBoss_EAP_Container
14. Press ^ to return to the Red Hat Update Infrastructure Management Tool home screen.
NOTE
If you use the wrong credentials, the container will be added but impossible to
synchronize. In that case remove the container from RHUI and add it again with the
correct credentials.
IMPORTANT
The credentials are stored as metadata for each container you add to your RHUI.
Consequently, if you change your password, the credentials will no longer be valid and
you will not be able to keep syncing your containers. To change the password in the
metadata for your containers, change it in MongoDB using the following command on the
RHUA node:
Alternatively, delete all the affected containers from RHUI and add them again with your new password.
Also, when you change your password, do not forget to change it in the /etc/rhui/rhui-tools.conf file if
you have the old password there.
4. Press c to confirm the selection. You can enter ? for more commands.
78
CHAPTER 14. MANAGE CONTENT
6. Press ^ to return to the Red Hat Update Infrastructure Management Tool home screen.
3. Enter the full path to the local directory where the client configuration files generated will
be stored. This directory will be created if it does not exist.
/root/
dockertest
5. Enter the version number of the configuration RPM. The default is 2.0.
7. Enter the port that will serve docker content. The default is 5000.
79
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Dependencies Resolved
===========================================================================
==============================================
Package Arch Version Repository Size
===========================================================================
==============================================
Installing:
dockertest noarch 2.0-1 /dockertest-2.0-1.noarch
1.7 k
Installing for dependencies:
docker-common x86_64 2:1.10.3-59.el7 rhel-7-server-rhui-extras-rpms
63 k
Transaction Summary
===========================================================================
==============================================
Install 1 Package (+1 Dependent package)
Total size: 64 k
Total download size: 63 k
Installed size: 4.7 k
Is this ok [y/d/N]: y
Downloading packages:
docker-common-1.10.3-59.el7.x86_64.rpm | 63 kB
00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installed:
dockertest.noarch 0:2.0-1
Dependency Installed:
docker-common.x86_64 2:1.10.3-59.el7
Complete!
80
CHAPTER 14. MANAGE CONTENT
The docker pull command consumes content from a container. The following steps describe how to
test a docker pull command on the client.
3. If the docker pull command fails, check the rhui-manager container synchronization status. The
synchronization probably has not been performed yet and you have to wait until it synchronizes.
RHEL Atomic Host uses an open source tool called rpm-OSTree to manage bootable, immutable,
versioned file system trees made of RPM content. Red Hat composes these trees from packages, and
the rpm-ostree tool replicates the trees atomically. This results in a strategy for upgrade and
maintenance that centers around atomic updates. The use of rpm-ostree instead of Yum to upgrade
and maintain software means that RHEL Atomic Host is managed differently than other RHEL 7
variants.
Specifically, when using RHEL Atomic Host, the operating system content is mounted in read-only
mode. There are only two writable directories for local system configuration: /etc/ and /var/. Updates
work in the following way: a new bootable file system tree is generated, which shares storage with the
81
Red Hat Update Infrastructure 3.1 System Administrator's Guide
current file system tree. When you download the new system tree, the old one is retained in parallel with
it. This means that the first, pre-upgrade version of the file system tree can be atomically restored when
needed.
User files that are intended to persist across upgrades, including containers and data, should be placed
in the /var/ directory. The operating system itself is stored in the /usr/ directory and is read-only. If you
perform a long file listing in the root directory using the command ls -l /, you will discover that many of
the traditional root-level directories are symbolic links to one of these two locations. For example, the
/home/ directory is a symbolic link to the /var/home/ directory. This directory will therefore persist
across upgrades.
The default partitioning dedicates most of the available space for the containers, using direct LVM as
the storage backend instead of the default loopback as it is on Red Hat Enterprise Linux. Storage is
managed the docker-storage-setup daemon, which creates two Logical Volumes during installation,
root for the file system content, and docker-pool for the images and containers.
RHEL Atomic Host uses SELinux to provide strong safeguards in multi-tenant environments. The
iptables services are available as firewall; iptables is turned off by default.
See Red Hat Enterprise Linux Atomic Host 7 Installation and Configuration Guide for more information
about Red Hat Atomic Host.
Import Repositories:
1 - All in Certificate
2 - By Product
3 - By Repository
Enter value (1-3) or 'b' to abort:
3. Select the atomic repository from the list by entering the number beside the repository.
4. Press c. The Red Hat Update Infrastructure Management Tooldisplays the repository to be
deployed and prompts for confirmation. Press y to proceed. A message prints as the repository
is deployed.
5. Check that the repository has been installed by pressing l to access the list repositories
currently managed by the RHUI screen.
4. Press c to confirm the selection. You can enter ? for more commands.
82
CHAPTER 14. MANAGE CONTENT
6. Press ^ to return to the Red Hat Update Infrastructure Management Tool home screen.
2. On the Red Hat Update Infrastructure Management Tool home screen, press e to select create
entitlement certificates and client configuration RPMs.
3. On the Client Entitlement Management screen, press o to select create an atomic client
configuration package.
Connected: rhua.example.com
4. Enter the full path of a local directory where you want to save the configuration files.
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
6. Enter the full path to the entitlement certificate authorizing the client to access specific
channels.
83
Red Hat Update Infrastructure 3.1 System Administrator's Guide
7. Enter the full path to the private key for the entitlement certificate.
Full path to the private key for the above entitlement certificate:
/tmp/testcert.key
8. Enter the port to serve Docker content on. Port 5000 is the default.
Signature made Mon 10 Apr 2017 04:46:45 PM UTC using RSA key ID
199E2F91FD431D51
Good signature from "Red Hat, Inc. <[email protected]>"
809 metadata, 4395 content objects fetched; 308693 KiB transferred in 108 second
2. If ostree pull returns an error, check the OSTree repository synchronization status. The
synchronization probably has not been performed yet and you have to wait until it synchronizes.
Report a bug
84
CHAPTER 15. MANAGE CERTIFICATES AND KEYS
The RHUA is configured with the content certificate and the entitlement certificate. The RHUA uses the
content certificate to connect to the Red Hat Content Delivery Network (CDN). It also uses the Red
Hat CA certificate to verify the connection to the Red Hat CDN. As the RHUA is the only component
that connects to the Red Hat CDN, it will be the only RHUI component that has this certificate deployed.
It should be noted that multiple RHUI installations can use the same content certificate. For instance,
the Amazon EC2 cloud runs four RHUI installations (one per region), but each RHUI installation uses the
same content certificate.
Clients use the entitlement certificate only to permit access to packages in RHUI. To perform an
environment health check, RHUA attempts a yum request against each CDS. To succeed, the yum
request must specify a valid entitlement certificate.
The only certificate necessary for the CDS is an SSL certificate, which permits HTTPS communications
between the client and the CDS. The SSL certificates are scoped to a specific host name, so a unique
SSL certificate is required for each CDS node. If SSL errors occur when connecting to a CDS, the
certificate should be double-checked to make sure its common name is set to the fully qualified domain
name of the CDS on which it is installed.
The CA certificate is used to verify that the entitlement certificate sent by the client as part of a yum
request was signed by the cloud provider. This prevents a rogue instance from generating its own
entitlement certificate for unauthorized use within RHUI.
The entitlement certificate and its private key enable information encyrption from the CDS back to the
85
Red Hat Update Infrastructure 3.1 System Administrator's Guide
The entitlement certificate and its private key enable information encyrption from the CDS back to the
client. Each client uses the entitlement certificate when connecting to the CDS to prove it has
permission to download its packages. All clients use a single entitlement certificate.
The cloud provider’s CA certificate is used to verify the CDS’s SSL certificate when connecting to it.
This ensures that a rogue instance is not impersonating the CDS and introducing potentially malicious
packages into the client.
The CA certificate is used to verify the CDS’s SSL certificate, not the entitlement certificate itself. The
reverse is true for the CDS node. The CDS’s SSL certificate and private key are used for encrypting
data from the client to the CDS. The CA certificate present on the CDS is used to verify that the CDS
node should trust the entitlement certificate sent by the client.
1. Navigate to the Red Hat Update Infrastructure Management Tool home screen.
3. From the Entitlements Manager screen, press l at the prompt to list data about the current
content certificate. The Red Hat Update Infrastructure Management Tool displays the following
information about the certificate.
Valid
RHEL RHUI Atomic 7 Ostree Repo
Expiration: 08-04-2025 Certificate: content_cert.pem
86
CHAPTER 15. MANAGE CERTIFICATES AND KEYS
3. From the Entitlements Manager screen, press c at the prompt to list data about the custom
repository entitlements.
/protected/$basearch/os
Name: Repo 1
URL: protected/i386/os
Name: Repo 2
URL: protected/x86_64/os
If Red Hat issues a new content certificate, it must be uploaded to RHUI. When a new content certificate
is uploaded, it is updated in the RHUA and is used for synchronizing Red Hat repositories.
You can ensure that your certificates are automatically renewed without your having to download new
certificates and upload them to RHUI. To do so, follow these instructions:
IMPORTANT
Do not upload a new content certificate before it becomes valid. Doing so will cause your
synchronizations to fail until the valid date is reached.
IMPORTANT
87
Red Hat Update Infrastructure 3.1 System Administrator's Guide
IMPORTANT
Before you attempt to install a new certificate, be sure that all of your CDS nodes are
running. If that is not the case, the content certificate update process (initiated by the
rhui-manager cert upload command) will fail.
Use either of the following methods to discover if all CDS nodes are running.
Log into each CDS node in your system to see if its web server is up:
If you cannot login or the status returned is inactive, that particular CDS is not running.
Log into the HAProxy node to view the statistics HAProxy periodically collects about managed
CDS nodes.
If the command returns DOWN for a hostname, that CDS is not running.
Procedure
1. The Red Hat Update Infrastructure Management Tool expects that the content certificate and
its private key are contained in the same file. If you have existing content certificates with
separate keys, you can create the single file using the cat command at a shell prompt.
2. From the Entitlements Manager screen, press u at the prompt to upload a new or updated Red
Hat content certificate.
IMPORTANT
Content certificates are stored on the same system the Red Hat Update
Infrastructure Management Tool is installed on at /etc/pki/rhui. For security
reasons, this directory requires root permissions. If you do not have the correct
permissions, the Red Hat Update Infrastructure Management Tool will not allow
you to proceed.
3. Enter the full path to the new content certificate; the details of the new certificate to be
uploaded display.
4. Press y at the prompt to confirm the information and upload the packages. The Red Hat Update
Infrastructure Management Tool lists the current certificates.
Report a bug
88
CHAPTER 16. RED HAT UPDATE INFRASTRUCTURE 3.1 STATUS CODES, LOG FILES, AND CONFIGURATION FILES
0 Success
NOTE
Status Code 1 (Repository synchronization error) is not currently returned due to a bug.
89
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Report a bug
90
CHAPTER 17. BACK UP AND RESTORE RED HAT UPDATE INFRASTRUCTURE
1. The /var/lib/pulp directory may be large, depending on how many repositories have been
deployed on the Red Hat Update Appliance. See the Storage Requirements section in the Red
Hat Satellite Installation Guide for specific storage requirements, or use the du command from
the command-line interface to determine its size.
3. Replace stop with status in the above commands to verify each service has stopped.
4. It is important that the following files retain their current attributes when backed up.
/etc/httpd/conf.d/05-pulp-https.conf
/etc/httpd/conf.d/pulp*
/etc/httpd/conf.d/ssl.conf
/etc/pki/katello-certs-tools/*
/etc/pki/pulp/*
/etc/pki/rhui/*
/etc/pulp/*
/etc/puppet/*
/etc/rhui/*
/etc/rhui/rhui-tools.conf
/etc/rhui-installer/*
/etc/qpid/qpidd.conf
/var/lib/mongodb/pulp_database*
/var/lib/pulp/*
91
Red Hat Update Infrastructure 3.1 System Administrator's Guide
/var/log/pulp/*
/var/log/httpd/*
/var/lib/puppet/*
Use the following command to back up the files.
# cp -a source_files_path destination_files_path
5. You may want to back up any generated client entitlement certificates and client configuration
RPMs.
7. Replace start with status in the above commands to verify each service has started.
3. Replace stop with status in the above commands to verify each service has stopped.
IMPORTANT
It is crucial that the files included in the restore retain their current attributes.
4. Use the following command to restore the files to their original locations.
# cp -a source_files_path destination_files_path
6. Replace start with status in the above commands to verify each service has started.
1. The /var/lib/pulp directory may be large, depending on how many repositories have been
92
CHAPTER 17. BACK UP AND RESTORE RED HAT UPDATE INFRASTRUCTURE
1. The /var/lib/pulp directory may be large, depending on how many repositories have been
deployed on the Red Hat Update Appliance. See Section 1.4.3 Storage in the Red Hat Satellite
6.1 Installation Guide for specific storage requirements. or use the du command from the
command-line interface to determine its size.
3. Replace stop with status in the above commands to verify each service has stopped.
4. It is important that the following files retain their current attributes when backed up.
/etc/httpd/conf.d/*.conf
/var/lib/pulp/*
/var/log/pulp/*
/var/log/httpd/*
/etc/pki/rhui/*
/etc/pulp/*
/var/lib/puppet/*
Use the following command to back up the files.
# cp -a source_files_path destination_files_path
5. In addition to the above files, you may want to back up any generated client entitlement
certificates and client configuration RPMs.
7. Replace start with status in the above commands to verify each service has started.
3. Replace stop with status in the above commands to verify each service has stopped.
IMPORTANT
It is crucial that the files included in the restore retain their current attributes.
93
Red Hat Update Infrastructure 3.1 System Administrator's Guide
4. Use the following command to restore the files to their original locations.
# cp -a source_files_path destination_files_path
6. Replace start with status in the above commands to verify each service has started.
1. It is important that the following files retain their current attributes when backed up.
/etc/haproxy/haproxy.cfg
/etc/pki/rhui/*
/var/lib/puppet/*
# cp -a source_files_path destination_files_path
3. In addition to the above files, you may want to back up any generated client entitlement
certificates and client configuration RPMs.
IMPORTANT
It is crucial that the files included in the restore retain their current attributes.
2. Use the following command to restore the files to their original locations.
# cp -a source_files_path destination_files_path
Report a bug
94
CHAPTER 18. MIGRATE TO A NEW LOAD BALANCER, OR CHANGE THE NAME OF AN EXISTING LOAD BALANCER
2. Remove the content delivery server (CDS) certificate files from the Red Hat Update Appliance
(RHUA).
# rm -f /etc/puppet/rhui-secrets/cds-cert.*
3. Run rhui-manager with the new load balancer host name, for example:
# rhui-installer --cds-lb-hostname=hap02.example.com
NOTE
Use any other necessary arguments if you do not want their initial/default values
as indicated by the answers file.
4. Add the new load balancer to the RHUI environment, either in the interactive mode (rhui-
manager - l - a - …) or in the command-line interface (CLI). For the CLI, use the following
example.
NOTE
5. Reapply the CDS configuration to all of your CDS nodes, either in the interactive mode (rhui-
manager - c - r - …) or in the CLI. For the CLI, use the following example.
6. Create an updated client configuration RPM. This can be done in the interactive mode (rhui-
manager - e - c - …) or in the CLI. For the CLI, use the following example.
NOTE
Use the files and the RPM name that you created in CLient Entitlement
Certificate and Client Configuration RPM>>.
95
Red Hat Update Infrastructure 3.1 System Administrator's Guide
7. Update the client configuration RPM on all your clients. Your clients should be all set now.
Report a bug
96
APPENDIX A. RED HAT UPDATE INFRASTRUCTURE MANAGEMENT TOOL MENUS AND COMMANDS
Table A.1. Red Hat Update Infrastructure Management Tool Menus and Commands
manage repositories r
display detailed i
information on a
repository
upload content to a u
custom repository (RPM
content only)
list packages in a p
repository (RPM content
only)
97
Red Hat Update Infrastructure 3.1 System Administrator's Guide
unregister (delete) a d
CDS instance from the
RHUi
unregister (delete) a d
HAProxy Load-balancer
instance from the RHUI
synchronization status s
and scheduling
sync an individual sr
repository immediately
create entitlement e
certificates and client
configuration RPMs
98
APPENDIX A. RED HAT UPDATE INFRASTRUCTURE MANAGEMENT TOOL MENUS AND COMMANDS
create a client c
configuration RPM from
an entitlement
certificate
Report a bug
99
Red Hat Update Infrastructure 3.1 System Administrator's Guide
A command-line interface called Red Hat Update Infrastructure Management Tool (run with the rhui-
manager command) facilitates the installation. This tool provides interactive prompts for the necessary
configuration elements for each RHUI component: RHUA, CDS, and load balancer. This tool also
provides a means for taking the content certificate provided by Red Hat for use when connecting to the
Red Hat CDN and generating internal, cloud-specific certificates that clients will use to connect to
RHUI. The Red Hat Update Infrastructure Management Tool allows the cloud provider to generate a
client configuration bundle that will be installed on client RHEL instances. This bundle allows the clients
to get updates from the RHUI installation.
Red Hat Update Infrastructure Management Tool is designed to be run using the interactive shell; some
functions can also be run from a standard shell prompt. The Red Hat Update Infrastructure
Management Tool uses five main commands. For each command’s subcommand, a list of options is
provided if the subcommand expects one or more options other than -h and --help.
OPTIONS
-h/--help show this help message and exit
--debug enables debug logging
--config absolute path to the configuration file; defaults to /etc/rhui/rhui-tools.conf
--server location of the RHUA server (overrides the config file)
--username if specified, previously saved authentication credentials are ignored and this username
is used to login
--password used in conjunction with --username
COMMANDS
cert : Red Hat content certificate management
packages : package manipulation on repositories
repo : repository listing and manipulation
status : RHUI status and health information
client : Red Hat client management
subscriptions : Red Hat subscriptions management
The following subsections provide more details about the subcommands and options for their
associated command.
B.1. CERT
info: display information about the current content certificate
100
APPENDIX B. RED HAT UPDATE INFRASTRUCTURE COMMAND-LINE INTERFACE
Example
Valid
Beta RHEL RHUI Everything 7 Debug
Expiration: 05-17-2026 Certificate: rhcert.pem
B.2. PACKAGES
list: lists all packages in a repository
--repo_id - id of the custom repository where the packages will be uploaded (required)
--packages - path to an .rpm file or directory of RPMs that will be uploaded (required)
Example
B.3. REPO
sync: sync a repository
101
Red Hat Update Infrastructure 3.1 System Administrator's Guide
entitlement - path used in the entitlement certificate; may use yum variable substitutions
legacy_md - if present, the repo will use SHA1, otherwise default value is used (SHA256)
gpg_public_keys - comma separated list of public keys used to sign the served content; the
filenames must not contain comma
Example
Custom Repositories
--------------------
my_custom_repo :: My Custom Repo
B.4. STATUS
102
APPENDIX B. RED HAT UPDATE INFRASTRUCTURE COMMAND-LINE INTERFACE
--code - if specified, only a numeric code for the result will be displayed
Example
B.5. CLIENT
rpm: create a client config rpm
--cert - generate certificate also before building client config rpm if given
--repo_label - identifies the repositories to add. Comma delimited string of repo labels
--repo_label - identifies the repositories to add. Comma delimited string of repo labels
(required)
--cert - generate certificate also before building client config rpm if given
--repo_label - identifies the repositories to add. Comma delimited string of repo labels
Example
NOTE
Use Red Hat repository labels and not the IDs. To get a list of all labels, run rhui-manager
client labels. If you are including a protected custom repository in the certificate, use the
repository’s ID instead. The example above demonstrates the use of both Red Hat
repository labels and a custom repository ID.
B.6. SUBSCRIPTIONS
list: list the registered or available subscriptions
--available - list the subscriptions available to the system; this option and --registered are
mutually exclusive
--pool-only - list only the Pool IDs of the subscriptions one per line
--registered - list the subscriptions registered with RHUI (default); this option and --
available are mutually exclusive
104
APPENDIX B. RED HAT UPDATE INFRASTRUCTURE COMMAND-LINE INTERFACE
Example
Label: Red Hat Update Infrastructure and RHEL Add-Ons for Providers
Pool ID: 8a85f98b61e217aa0161ed24079a583e
Report a bug
105
Red Hat Update Infrastructure 3.1 System Administrator's Guide
ISO Download/Red Hat You cannot download the Red Hat Verify that RHUI entitlements are in
Update Infrastructure Update Infrastructure ISO from the place and enabled in your Red Hat
Certificate Customer Portal with the RHUI Network account.
Certificate.
Verify the credibility of the
certificate being used to download
the ISO.
Red Hat Update You see an error message while uploading See
Infrastructure Certificate Entitlement certificate using rhui- https://access.redhat.com/solution
manager. s/363844 for more details.
Installation/Configuratio You experience communication issues Verify the fully qualified domain
n between the Red Hat Upate Appliance name (FQDN) is set for the RHUA
and the CDSs. and CDS and is resolvable.
106
APPENDIX C. RESOLVE COMMON PROBLEMS IN RED HAT UPDATE INFRASTRUCTURE
Synchronization You cannot synchronize repositories with Verify the RHUI SKUs are in your
Red Hat. account.
107
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Red Hat Update The Red Hat Update Appliance is not Use the content certificate in
Appliance/Content communicating with the Content Delivery /etc/pki/rhui/redhat (the .pem file)
Delivery Network Network. to test connectivity and access
Communication between the RHUA and the CDN.
# cd /etc/pki/rhui/redhatwget --
certificate=8a85f98146a087b80
146afacb3362499.pem --ca-
certificate=/etc/rhsm/ca/redhat
-uep.pem
https://cdn.redhat.com/content/di
st/rhel/rhui/server/6/6Server/x86
_64/os/repodata/repomd.xml
108
APPENDIX C. RESOLVE COMMON PROBLEMS IN RED HAT UPDATE INFRASTRUCTURE
Content Delivery Server The CDS synchronization fails with SSL CDS sync fails with error "sslv3 alert
Synchronization errors because of expired Qpid certificate expired" due to expired
certificates qpid CA certificates on RHUI.
https://access.redhat.com/articles/
523163
Client/HAProxy All HAProxy nodes are down. Clients have Add and configure at least one new
communication lost access to RHUI repositories. HAProxy node. If you cannot do so
for whatever reason, temporarily
change the DNS configuration so
that the main load balancer host
name (cds.example.com in this
guide) resolves to the IP address of
one of your CDS nodes. This will
allow the clients to avoid the
unavailable HAProxy nodes and
communicate with the CDS directly.
Report a bug
109
Red Hat Update Infrastructure 3.1 System Administrator's Guide
NOTE
All material cited here was taken from the Pulp 2.18 repository .
Creates a new repository in Pulp. This call accepts optional parameters for importer and distributor
configuration. More detailed description of these parameters can be found below in the documentation
of APIs to associate an importer or a distributor to an already existing repository. If these parameters are
not passed, the call will only create the repository in Pulp. The real functionality of a repository isn’t
defined until importers and distributors are added. Repository IDs must be unique across all repositories
in the server.
Method: POST
Path: /pulp/api/v2/repositories/
Permission: create
importer_type_id (string) - (optional) type id of importer being associated with the repository
importer_config (object) - (optional) configuration the repository will use to drive the behavior
of the importer. Note that proxy_password and basic_auth_password will be returned as ‘ *’ for
security purposes.
Response Codes:
110
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Sample Request:
{
"display_name": "Harness Repository: harness_repo_1",
"id": "harness_repo_1",
"importer_type_id": "harness_importer",
"importer_config": {
"num_units": "5",
"write_files": "true"
},
"distributors": [{
"distributor_id": "dist_1",
"distributor_type_id": "harness_distributor",
"distributor_config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"auto_publish": false
}],
}
{
"scratchpad": {},
"display_name": "Harness Repository: harness_repo_1",
"description": null,
"_ns": "repos",
"notes": {},
"content_unit_counts": {},
"_id": {
"$oid": "52280416e5e71041ad000066"
},
"id": "harness_repo_1",
"_href": "/pulp/api/v2/repositories/harness_repo_1/"
}
Much like create repository is simply related to the repository metadata (as compared to the associated
importers/distributors), the update repository call is centered around updating only that metadata.
Method: PUT
Path: /pulp/api/v2/repositories/<repo_id>/
Permission: update
Request Body Contents: The body of the request is a JSON document with three possible root
elements:
delta (object) - (optional) object containing keys with values that should be updated on the
repository
111
Red Hat Update Infrastructure 3.1 System Administrator's Guide
importer_config (object) - (optional) object containing keys with values that should be
updated on the repository’s importer config
distributor_configs (object) - (optional) object containing keys that are distributor ids, and
values that are objects containing plugin specific keys/value pairs
Response Codes:
202 - if the update was executed but additional tasks were created to update nested distributor
configurations
Return: a Call Report containing the database representation of the repository (after changes made by
the update) and any tasks spawned to apply the consumer bindings for the repository. See Bind a
Consumer to a Repository for details on the bindings tasks that will be generated.
Sample Request:
{
"delta": {
"display_name" : "Updated"
},
"importer_config": {
"demo_key": "demo_value"
},
"distributor_configs": {
"demo_distributor": {
"demo_key": "demo_value"
}
}
}
Sample result value: The result field of the Call Report contains the database representation of the
repository
{
...
"result": {
"display_name": "zoo",
"description": "foo",
"_ns": "repos",
"notes": {
"_repo-type": "rpm-repo"
},
"content_unit_counts": {
"package_group": 2,
"package_category": 1,
"rpm": 32,
"erratum": 4
},
"_id": {
112
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
"$oid": "5328b2983738202945a3bb47"
},
"id": "zoo",
"_href": "/pulp/api/v2/repositories/zoo/"
},
...
}
Configures an importer for a previously created Pulp repository. Each repository maintains its own
configuration for the importer which is used to dictate how the importer will function when it
synchronizes content. The possible configuration values are contingent on the type of importer being
added; each importer type will support a different set of values relevant to how it functions.
Only one importer may be associated with a repository at a given time. If a repository already has an
associated importer, the previous association is removed. The removal is performed before the new
importer is initialized, thus there is the potential that if the new importer initialization fails the repository
is left without an importer.
Adding an importer performs the following validation steps before confirming the addition:
The importer plugin is contacted and asked to validate the supplied configuration for the
importer. If the importer indicates its configuration is invalid, the importer is not added to the
repository.
The importer’s importer_added method is invoked to allow the importer to do any initialization
required for that repository. If the plugin raises an exception during this call, the importer is not
added to the repository.
The Pulp database is updated to store the importer’s configuration and the knowledge that the
repository is associated with the importer.
The details of the added importer are returned from the call.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/importers/
Permission: create
importer_type_id (string) - indicates the type of importer being associated with the repository;
there must be an importer installed in the Pulp server with this ID
importer_config (object) - configuration the repository will use to drive the behavior of the
importer
Response Codes:
400- if one or more of the required parameters is missing, the importer type ID refers to a non-
existent importer, or the importer indicates the supplied configuration is invalid
113
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Return: a Call Report containing the current state of the association task
Sample Request:
{
"importer_type_id": "harness_importer",
"importer_config": {
"num_units": "5",
"write_files": "true"
}
}
Sample result value for the Task Report:The result field of the Task Report will contain the database
representation of the importer (not the full repository details, just the importer)
{
"scratchpad": null,
"_ns": "repo_importers",
"importer_type_id": "harness_importer",
"last_sync": null,
"repo_id": "harness_repo_1",
"_id": "bab0f9d5-dfd1-45ef-bd1d-fd7ea8077d75",
"config": {
"num_units": "5",
"write_files": "true"
},
"id": "harness_importer"
}
Tags: The task created will have the following tags: pulp:action:update_importer, pulp:repository:
<repo_id>, pulp:repository_importer:<importer_type_id>
Configures a distributor for a previously created Pulp repository. Each repository maintains its own
configuration for the distributor which is used to dictate how the distributor will function when it
publishes content. The possible configuration values are contingent on the type of distributor being
added; each distributor type will support a different set of values relevant to how it functions.
NOTE
Multiple distributors may be associated with a repository at a given time. There may be more than one
distributor with the same type. The only restriction is that the distributor ID must be unique across all
distributors for a given repository.
114
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Adding a distributor performs the following validation steps before confirming the addition:
If provided, the distributor ID is checked for uniqueness in the context of the repository. If not
provided, a unique ID is generated.
The distributor plugin is contacted and asked to validate the supplied configuration for the
distributor. If the distributor indicates its configuration is invalid, the distributor is not added to
the repository.
The Pulp database is updated to store the distributor’s configuration and the knowledge that
the repository is associated with the distributor.
The details of the added distributor are returned from the call.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/distributors/
Permission: create
distributor_type_id (string) - indicates the type of distributor being associated with the
repository; there must be a distributor installed in the Pulp server with this ID
distributor_config (object) - plugin specific configuration the repository will use to drive the
behavior of the distributor
distributor_id (string) - (optional) if specified, this value will be used to refer to the distributor;
if not specified, one will be randomly assigned to the distributor
auto_publish (boolean) - (optional) if true, this distributor will automatically have its publish
operation invoked after a successful repository sync. Defaults to false if unspecified
Response Codes:
400- if one or more of the required parameters is missing, the distributor type ID refers to a
non-existent distributor, or the distributor indicates the supplied configuration is invalid
Return: database representation of the distributor (not the full repository details, just the distributor)
Sample Request:
{
"distributor_id": "dist_1",
"distributor_type_id": "harness_distributor",
"distributor_config": {
115
Red Hat Update Infrastructure 3.1 System Administrator's Guide
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"auto_publish": false
}
{
"scratchpad": null,
"_ns": "repo_distributors",
"last_publish": null,
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": "cfdd6ab9-6dbe-4192-bde2-d00db768f268",
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
Update the configuration for an importer that has already been associated with a repository.
Note that the importer’s proxy_password and basic_auth_password fields will be returned as * if they are
populated. This is done for security purposes.
Method: PUT
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/
Permission: update
importer_config (object) - object containing keys with values that should be updated on the
importer
Response Codes:
202 - if the request was accepted by the server to update the importer when the repository is
available
Return: a Call Report which includes a spawned task that should be polled for a Task Report
Sample Request:
116
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
{
"importer_config": {
"demo_key": "demo_value"
}
}
Sample result value for the Task Report:The result field of the Task Report contains the database
representation of the importer. This does not include the full repository details.
{
"scratchpad": null,
"_ns": "repo_importers",
"importer_type_id": "demo_importer",
"last_sync": "2013-10-03T14:08:35Z",
"scheduled_syncs": [],
"repo_id": "demo_repo",
"_id": {
"$oid": "524db282dd01fb194283e53f"
},
"config": {
"demo_key": "demo_value"
},
"id": "demo_importer"
}
Tags: The task created will have the following tags: pulp:action:update_importer, pulp:repository:
<repo_id>, pulp:repository_importer:<importer_id>
Method: DELETE
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/
Permission: delete
Response Codes:
202 - if the request was accepted by the server to disassociate when the repository is available
Tags: The task created will have the following tags: pulp:action:delete_importer, pulp:repository:
<repo_id>, pulp:repository_importer:<importer_id>
Update the configuration for a distributor that has already been associated with a repository. This
performs the following actions:
117
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Any distributor configuration value that is not specified remains unchanged and any value that is set to
explicitly to None will be removed from the config.
The first step is represented by a Call Report. Upon completion of step 1 the spawned_tasks field will be
populated with links to any tasks required to complete step 2. Updating a distributor causes each
binding associated with that repository to be updated as well. See Bind a Consumer to a Repository for
details.
Method: PUT
Path: /pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/
Permission: update
distributor_config (object) - (optional) object containing plugin specific keys with values that
will update the distributor config
delta (object) - (optional) object containing keys with values that will update the distributor
object, currently only supports auto_publish
Response Codes:
202 - if the request was accepted by the server to update the distributor when the repository is
available
Sample Request:
{
"distributor_config": {
"demo_key": "demo_value"
},
"delta": {
"auto_publish": true
}
}
Tags: The task created to update the distributor will have the following tags:
pulp:action:update_distributor, pulp:repository:<repo_id>, pulp:repository_distributor:
<distributor_id>. Information about the binding tasks can be found at Bind a Consumer to a Repository .
The first step is represented by a Call Report. Upon completion of step 1 the spawned_tasks field will be
118
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
The first step is represented by a Call Report. Upon completion of step 1 the spawned_tasks field will be
populated with links to any tasks required complete step 2. The total number of spawned tasks depends
on how many consumers are bound to the repository.
Method: DELETE
Path: /pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/
Permission: delete
Response Codes:
202 - if the request was accepted by the server to disassociate when the repository is available
Tags: The task created to delete the distributor will have the following tags:
pulp:action:remove_distributor, pulp:repository:<repo_id>, pulp:repository_distributor:
<distributor_id>
When a repository is deleted, it is removed from the database and its local working directory is deleted.
The content within the repository, however, is not deleted. Deleting content is handled through the
orphaned unit process.
The first step is represented by a Call Report. Upon completion of step 1 the spawned_tasks field will be
populated with links to any tasks required to complete step 2. The total number of spawned tasks
depends on how many consumers are bound to the repository.
Method: DELETE
Path: `/pulp/api/v2/repositories/<repo_id>/
Permission: delete
Response Codes:
202 - if the request was accepted by the server to delete the repository
Tags: The task created to delete the repository will have the following tags:
pulp:action:delete,pulp:repository:<repo_id>
119
Red Hat Update Infrastructure 3.1 System Administrator's Guide
D.1.2. Retrieval
Retrieves information on a single Pulp repository. The returned data includes general repository
metadata, metadata describing any importers and distributors associated with it, and a count of how
many content units have been stored locally for the repository.
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/
Permission: read
Query Parameters:
details (boolean) - (optional) shortcut for including distributors, importers, and content unit
counts
Response Codes:
{
"display_name": "Harness Repository: harness_repo_1",
"description": null,
"distributors": [
{
"scratchpad": 1,
"_ns": "repo_distributors",
"last_publish": "2012-01-25T15:26:32Z",
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": "addf9261-345e-4ce3-ad1e-436ba005287f",
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
],
"notes": {},
"scratchpad": {},
"content_unit_counts": {},
120
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
"last_unit_added": "2012-01-25T15:26:32Z",
"last_unit_removed": "2012-01-25T15:26:32Z",
"importers": [
{
"scratchpad": 1,
"_ns": "repo_importers",
"importer_type_id": "harness_importer",
"last_sync": "2012-01-25T15:26:32Z",
"repo_id": "harness_repo_1",
"sync_in_progress": false,
"_id": "bbe81308-ef7c-4c0c-b684-385fd627d99e",
"config": {
"num_units": "5",
"write_files": "true"
},
"id": "harness_importer"
}
],
"id": "harness_repo_1",
"total_repository_units": 5,
"locally_stored_units": 3
}
Returns information on all repositories in the Pulp server. It is worth noting that this call will never return
a 404; an empty array is returned in the case where there are no repositories.
Method: GET
Path: /pulp/api/v2/repositories/
Permission: read
Query Parameters:
details (boolean) - (optional) shortcut for including both distributors and importers
Response Codes:
Return: the same format as retrieving a single repository, except the base of the return value is an array
of them
[
{
"display_name": "Harness Repository: harness_repo_1",
"description": null,
"last_unit_added": "2012-01-25T15:26:32Z",
121
Red Hat Update Infrastructure 3.1 System Administrator's Guide
"last_unit_removed": null,
"distributors": [
{
"scratchpad": 1,
"_ns": "repo_distributors",
"last_publish": "2012-01-25T15:26:32Z",
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": "addf9261-345e-4ce3-ad1e-436ba005287f",
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
],
"notes": {},
"scratchpad": {},
"content_unit_counts": {},
"importers": [
{
"scratchpad": 1,
"_ns": "repo_importers",
"importer_type_id": "harness_importer",
"last_sync": "2012-01-25T15:26:32Z",
"repo_id": "harness_repo_1",
"sync_in_progress": false,
"_id": "bbe81308-ef7c-4c0c-b684-385fd627d99e",
"config": {
"num_units": "5",
"write_files": "true"
},
"id": "harness_importer"
}
],
"id": "harness_repo_1"
}
]
See Search API for more details on how to perform these searches.
Returns information on repositories in the Pulp server that match your search parameters. It is worth
noting that this call will never return a 404; an empty array is returned in the case where there are no
repositories.
Method: POST
Path: /pulp/api/v2/repositories/search/
Permission: read
122
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Response Codes:
Return: the same format as retrieving a single repository, except the base of the return value is an array
of them
[
{
"display_name": "Harness Repository: harness_repo_1",
"description": null,
"distributors": [
{
"scratchpad": 1,
"_ns": "repo_distributors",
"last_publish": "2012-01-25T15:26:32Z",
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": "addf9261-345e-4ce3-ad1e-436ba005287f",
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
],
"notes": {},
"scratchpad": {},
"content_unit_counts": {},
"last_unit_added": null,
"last_unit_removed": null,
"importers": [
{
"scratchpad": 1,
"_ns": "repo_importers",
"importer_type_id": "harness_importer",
"last_sync": "2012-01-25T15:26:32Z",
"repo_id": "harness_repo_1",
"sync_in_progress": false,
"_id": "bbe81308-ef7c-4c0c-b684-385fd627d99e",
"config": {
"num_units": "5",
"write_files": "true"
},
"id": "harness_importer"
}
123
Red Hat Update Infrastructure 3.1 System Administrator's Guide
],
"id": "harness_repo_1"
}
]
Returns information on repositories in the Pulp server that match your search parameters. It is worth
noting that this call will never return a 404; an empty array is returned in the case where there are no
repositories.
This method is slightly more limiting than the POST alternative, because some filter expressions may not
be serializable as query parameters.
Method: GET
Path: /pulp/api/v2/repositories/search/
Permission: read
Query Parameters: query params should match the attributes of a Criteria object as defined in Search
Criteria. The exception is the ‘fields’ parameter, which should be specified in singular form as follows: For
example: /v2/repositories/search/?field=id&field=display_name&limit=20’
details (boolean) - (optional) shortcut for including both distributors and importers
Response Codes:
Return: the same format as retrieving a single repository, except the base of the return value is an array
of them
[
{
"display_name": "Harness Repository: harness_repo_1",
"description": null,
"distributors": [
{
"scratchpad": 1,
"_ns": "repo_distributors",
"last_publish": "2012-01-25T15:26:32Z",
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": "addf9261-345e-4ce3-ad1e-436ba005287f",
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
124
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
],
"notes": {},
"scratchpad": {},
"content_unit_counts": {},
"last_unit_added": null,
"last_unit_removed": null,
"importers": [
{
"scratchpad": 1,
"_ns": "repo_importers",
"importer_type_id": "harness_importer",
"last_sync": "2012-01-25T15:26:32Z",
"repo_id": "harness_repo_1",
"sync_in_progress": false,
"_id": "bbe81308-ef7c-4c0c-b684-385fd627d99e",
"config": {
"num_units": "5",
"write_files": "true"
},
"id": "harness_importer"
}
],
"id": "harness_repo_1"
}
]
Retrieves the importer (if any) associated with a repository. The array will either be empty (no importer
configured) or contain a single entry.
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/importers/
Permission: read
Response Codes:
404 - if there is no repository with the given ID; this will not occur if the repository exists but
has no associated importers
[
{
"_href": "/pulp/api/v2/repositories/zoo/importers/yum_importer/",
"_id": {
"$oid": "563c82fa45ef48043f026c32"
},
125
Red Hat Update Infrastructure 3.1 System Administrator's Guide
"_ns": "repo_importers",
"config": {
"feed": "http://example.com/repos/zoo/"
},
"id": "yum_importer",
"importer_type_id": "yum_importer",
"last_sync": "2015-11-06T10:38:23Z",
"repo_id": "zoo",
"scratchpad": {
"repomd_revision": 1331832478
}
}
]
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/
Permission: read
Response Codes:
{
"_href": "/pulp/api/v2/repositories/zoo/importers/yum_importer/",
"_id": {
"$oid": "563c82fa45ef48043f026c32"
},
"_ns": "repo_importers",
"config": {
"feed": "http://example.com/repos/zoo/"
},
"id": "yum_importer",
"importer_type_id": "yum_importer",
"last_sync": "2015-11-06T10:38:23Z",
"repo_id": "zoo",
"scratchpad": {
"repomd_revision": 1331832478
}
}
126
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Retrieves all distributors associated with a repository. If the repository has no associated distributors, an
empty array is returned.
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/distributors/
Permission: read
Response Codes:
404 - if there is no repository with the given ID; this will not occur if the repository exists but
has no associated distributors
[
{
"scratchpad": 1,
"_ns": "repo_distributors",
"last_publish": "2012-01-25T15:26:32Z",
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": "addf9261-345e-4ce3-ad1e-436ba005287f",
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
]
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/
Permission: read
Response Codes:
127
Red Hat Update Infrastructure 3.1 System Administrator's Guide
{
"scratchpad": 1,
"_ns": "repo_distributors",
"last_publish": "2012-01-25T15:26:32Z",
"auto_publish": false,
"distributor_type_id": "harness_distributor",
"repo_id": "harness_repo_1",
"publish_in_progress": false,
"_id": {"$oid": "addf9261-345e-4ce3-ad1e-436ba005287f"},
"config": {
"publish_dir": "/tmp/harness-publish",
"write_files": "true"
},
"id": "dist_1"
}
See Search API for more details on how to perform these searches.
Returns information on distributors in the Pulp server that match your search parameters. It is worth
noting that this call will never return a 404; an empty array is returned in the case where there are no
distributors.
Method: POST
Path: /pulp/api/v2/distributors/search/
Permission: read
Response Codes:
[
{
"repo_id": "el7",
"last_publish": "2015-04-28T18:19:01Z",
"auto_publish": null,
"scheduled_publishes": [],
"distributor_type_id": "ostree_web_distributor",
"scratchpad": null,
"config": {
"relative_path": "/opt/content/ostree/el7"
128
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
},
"id": "ostree_web_distributor_name_cli"
},
{
"repo_id": "el6",
"last_publish": "2015-5-28T18:18:01Z",
"auto_publish": null,
"scheduled_publishes": [],
"distributor_type_id": "ostree_web_distributor",
"scratchpad": null,
"config": {
"relative_path": "/opt/content/ostree/el6"
},
"id": "ostree_web_distributor_name_cli"
}
]
D.1.3. Synchronization
Syncs content into a repository from a feed source using the repository’s importer.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/actions/sync/
Permission: execute
override_config (object) - (optional) importer configuration values that override the importer’s
default configuration for this sync
Response Codes:
Sample Request:
{
"override_config": {"verify_checksum": false,
"verify_size": false},
}
Tags: The task created will have the following tags: pulp:action:sync, pulp:repository:<repo_id>
Downloads content into a repository that was deferred at sync time. This is useful for repositories with
129
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Downloads content into a repository that was deferred at sync time. This is useful for repositories with
importers that are configured with download_policy=(background | on_demand). Content that has
already been downloaded will not be downloaded again.
NOTE
This API requires that the Alternate Download Policies features must be installed and
configured to work. If it has not been configured, the task dispatched by this API does
nothing.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/actions/download/
Permission: execute
verify_all_units (boolean) - (optional) check all units in the repository for corrupted or missing
files and re-download files as necessary rather than just downloading files that are known to be
missing (defaults to false)
Response Codes:
Sample Request:
{
"verify_all_units": false
}
Tags: The task created will have the following tags: pulp:action:download_repo, pulp:repository:
<repo_id>
A repository can be synced automatically using an iso8601 interval. To create a scheduled sync, the
interval, sync override config, and other schedule options must be set on the repository’s importer.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/
Permission: create
override_config (object) - (optional) the overridden configuration for the importer to be used
on the scheduled sync
130
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
failure_threshold (number) - (optional) consecutive failures allowed before this scheduled sync
is disabled
enabled (boolean) - (optional) whether the scheduled sync is initially enabled (defaults to true)
Response Codes:
Return: schedule report representing the current state of the scheduled call
Sample Request:
{
"override_config": {},
"schedule": "00:00:00Z/P1DT",
"failure_threshold": 3,
}
{
"next_run": "2014-01-27T21:41:50Z",
"task": "pulp.server.tasks.repository.sync_with_auto_publish",
"last_updated": 1390858910.292712,
"first_run": "2014-01-27T21:41:50Z",
"schedule": "PT1H",
"args": [
"demo"
],
"enabled": true,
"last_run_at": null,
"_id": "52e6d29edd01fb70bd0d9c37",
"total_run_count": 0,
"failure_threshold": 3,
"kwargs": {
"overrides": {}
},
"resource": "pulp:importer:demo:puppet_importer",
"remaining_runs": null,
"consecutive_failures": 0,
"_href":
"/pulp/api/v2/repositories/demo/importers/puppet_importer/schedules/sync/52e6d29edd01fb70bd0d9c37
/"
}
The same parameters used to create a scheduled sync may be updated at any point.
Method: PUT
131
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/<schedule_id>/
Permission: create
override_config (object) - (optional) new overridden configuration for the importer to be used
on the scheduled sync
failure_threshold (number) - (optional) new consecutive failures allowed before this scheduled
sync is disabled
Response Codes:
Return: schedule report representing the current state of the scheduled call (See sample response of
Scheduling a Sync for details.)
Method: DELETE
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/<schedule_id>/
Permission: delete
Response Codes:
Return: null
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/
Permission: read
Response Codes:
132
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
[
{
"_href":
"/pulp/api/v2/repositories/test/importers/yum_importer/schedules/sync/54d8852245ef4876fade7cc2/",
"_id": "54d8852245ef4876fade7cc2",
"args": [
"test"
],
"consecutive_failures": 0,
"enabled": true,
"failure_threshold": null,
"first_run": "2015-02-09T10:00:02Z",
"kwargs": {
"overrides": {}
},
"last_run_at": "2015-02-09T10:00:23Z",
"last_updated": 1423476133.825821,
"next_run": "2015-02-10T10:00:02Z",
"remaining_runs": null,
"resource": "pulp:importer:test:yum_importer",
"schedule": "P1DT",
"task": "pulp.server.tasks.repository.sync_with_auto_publish",
"total_run_count": 1
}
]
Method: GET
Permission: read
Path: /pulp/api/v2/repositories/<repo_id>/importers/<importer_id>/schedules/sync/<schedule_id>/
Response Codes:
{
"_href":
133
Red Hat Update Infrastructure 3.1 System Administrator's Guide
"/pulp/api/v2/repositories/test/importers/yum_importer/schedules/sync/54d8852245ef4876fade7cc2/",
"_id": "54d8852245ef4876fade7cc2",
"args": [
"test"
],
"consecutive_failures": 0,
"enabled": true,
"failure_threshold": null,
"first_run": "2015-02-09T10:00:02Z",
"kwargs": {
"overrides": {}
},
"last_run_at": "2015-02-09T10:00:23Z",
"last_updated": 1423476133.825821,
"next_run": "2015-02-10T10:00:02Z",
"remaining_runs": null,
"resource": "pulp:importer:test:yum_importer",
"schedule": "P1DT",
"task": "pulp.server.tasks.repository.sync_with_auto_publish",
"total_run_count": 1
}
Retrieve sync history for a repository. Each sync performed on a repository creates a history entry.
Method: GET
Permission: read
Path: /pulp/api/v2/repositories/<repo_id>/history/sync/
Query Parameters:
limit (integer) - (optional) the maximum number of history entries to return; if not specified, the
entire history is returned
sort (string) - (optional) options are ‘ascending’ and ‘descending’; the array is sorted by the sync
timestamp
start_date (iso8601 datetime) - (optional) any entries with a timestamp prior to the given date
are not returned
end_date (iso8601 datetime) - (optional) any entries with a timestamp after the given date are
not returned
Response Codes:
134
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
[
{
"result": "success",
"importer_id": "my_demo_importer",
"exception": null,
"repo_id": "demo_repo",
"traceback": null,
"started": "1970:00:00T00:00:00Z",
"completed": "1970:00:00T00:00:01Z",
"importer_type_id": "demo_importer",
"error_message": null,
}
]
D.1.4. Publication
Publish content from a repository using a repository’s distributor. This call always executes
asynchronously and will return a Call Report.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/actions/publish/
Permission: execute
Response Codes:
Sample Request:
{
"id": "distributor_1",
"override_config": {},
}
Tags: The task created will have the following tags: pulp:action:publish, pulp:repository:<repo_id>
A repository can be published automatically using an iso8601 interval. To create a scheduled publish, the
interval, publish override config, and other schedule options must be set on a repository’s distributor.
135
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/schedules/publish/
Permission: create
override_config (object) - (optional) the overridden configuration for the distributor to be used
on the scheduled publish
enabled (boolean) - (optional) whether the scheduled publish is initially enabled (defaults to
true)
Response Codes:
Return: schedule report representing the current state of the scheduled call
Sample Request:
{
"override_config": {},
"schedule": "PT1H",
"failure_threshold": 3,
}
{
"next_run": "2014-01-27T21:27:56Z",
"task": "pulp.server.tasks.repository.publish",
"last_updated": 1390858076.682694,
"first_run": "2014-01-27T21:27:56Z",
"schedule": "PT1H",
"args": [
"demo",
"puppet_distributor"
],
"enabled": true,
"last_run_at": null,
"_id": "52e6cf5cdd01fb70bd0d9c34",
"total_run_count": 0,
"failure_threshold": 3,
"kwargs": {
"overrides": {}
136
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
},
"resource": "pulp:distributor:demo:puppet_distributor",
"remaining_runs": null,
"consecutive_failures": 0,
"_href":
"/pulp/api/v2/repositories/demo/distributors/puppet_distributor/schedules/publish/52e6cf5cdd01fb70bd0d
9c34/"
}
The same parameters used to create a scheduled publish may be updated at any point.
Method: PUT
Path:
/pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/schedules/publish/<schedule_id
>/
Permission: create
override_config (object) - (optional) new overridden configuration for the importer to be used
on the scheduled sync
failure_threshold (number) - (optional) new consecutive failures allowed before this scheduled
sync is disabled
Response Codes:
Return: schedule report representing the current state of the scheduled call (See sample response of
Scheduling a Publish for details.)
Method: DELETE
Path:
/pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/schedules/publish/<schedule_id
>/
Permission: delete
137
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Response Codes:
Return: null
Method: GET
Path: /pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/schedules/publish/
Permission: read
Response Codes:
Return: array of schedule reports for all scheduled publishes defined (See sample response of
Scheduling a Publish for details.)
{
"_href":
"/pulp/api/v2/repositories/test/distributors/yum_distributor/schedules/publish/54d88df045ef4876fb50c994/
",
"_id": "54d88df045ef4876fb50c994",
"args": [
"test",
"yum_distributor"
],
"consecutive_failures": 0,
"enabled": true,
"failure_threshold": null,
"first_run": "2015-02-09T10:37:36Z",
"kwargs": {
"overrides": {}
},
"last_run_at": "2015-02-09T10:38:23Z",
"last_updated": 1423478256.805917,
"next_run": "2015-02-10T10:37:36Z",
"remaining_runs": null,
"resource": "pulp:distributor:test:yum_distributor",
"schedule": "P1DT",
"task": "pulp.server.tasks.repository.publish",
"total_run_count": 1
}
138
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Method: GET
Permission: read
Path:
/pulp/api/v2/repositories/<repo_id>/distributors/<distributor_id>/schedules/publish/<schedule_id
>/
Response Codes:
Return: a schedule report for the scheduled publish (See sample response of Scheduling a Publish for
details.)
{
"_href":
"/pulp/api/v2/repositories/test/distributors/yum_distributor/schedules/publish/54d88df045ef4876fb50c994/
",
"_id": "54d88df045ef4876fb50c994",
"args": [
"test",
"yum_distributor"
],
"consecutive_failures": 0,
"enabled": true,
"failure_threshold": null,
"first_run": "2015-02-09T10:37:36Z",
"kwargs": {
"overrides": {}
},
"last_run_at": "2015-02-09T10:38:23Z",
"last_updated": 1423478256.805917,
"next_run": "2015-02-10T10:37:36Z",
"remaining_runs": null,
"resource": "pulp:distributor:test:yum_distributor",
"schedule": "P1DT",
"task": "pulp.server.tasks.repository.publish",
"total_run_count": 1
}
Retrieve publish history for a repository. Each publish performed on a repository creates a history entry.
Method: GET
Permission: read
139
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Path: /pulp/api/v2/repositories/<repo_id>/history/publish/<distributor_id>/
Query Parameters:
limit (integer) - (optional) the maximum number of history entries to return; if not specified, the
entire history is returned
sort (string) - (optional) options are ‘ascending’ and ‘descending’; the array is sorted by the
publish timestamp
start_date (iso8601 datetime) - (optional) any entries with a timestamp prior to the given date
are not returned
end_date (iso8601 datetime) - (optional) any entries with a timestamp after the given date are
not returned
Response Codes:
[
{
"result": "success",
"distributor_id": "my_demo_distributor",
"distributor_type_id": "demo_distributor",
"exception": null,
"repo_id": "demo_repo",
"traceback": null,
"started": "1970:00:00T00:00:00Z",
"completed": "1970:00:00T00:00:01Z",
"error_message": null,
}
]
A Unit Association Criteria can be used to search for units within a repository.
Method: POST
Path: /pulp/api/v2/repositories/<repo_id>/search/units/
Permission: read
140
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Response Codes:
Sample Request:
{
"criteria": {
"fields": {
"unit": [
"name",
"version"
]
},
"type_ids": [
"rpm"
],
"limit": 1
}
}
[
{
"updated": "2013-09-04T22:12:05Z",
"repo_id": "zoo",
"created": "2013-09-04T22:12:05Z",
"_ns": "repo_content_units",
"unit_id": "4a928b95-7c4a-4d23-9df7-ac99978f361e",
"metadata": {
"_id": "4a928b95-7c4a-4d23-9df7-ac99978f361e",
"version": "4.1",
"name": "bear",
"pulp_user_metadata": {}
},
"unit_type_id": "rpm",
"id": "522777f5e19a002faebebf79"
}
]
141
Red Hat Update Infrastructure 3.1 System Administrator's Guide
The task information object is used to report information about any asynchronously executed task.
state (string) - the current state of the task. The possible values include: ‘waiting’, ‘skipped’,
‘running’, ‘suspended’, ‘finished’, ‘error’ and ‘canceled’.
task_id (string) - the unique id of the task that is executing the asynchronous call
task_type (string) - deprecated the fully qualified (package/method) type of the task that is
executing the asynchronous call. The field is empty for tasks performed by consumer agent.
traceback (null or array) - deprecated the resulting traceback if an exception was raised
tags (array) - arbitrary tags useful for looking up the Call Report
spawned_tasks (array) - List of objects containing the uri and task id for any tasks that were
spawned by this task.
worker_name (string) - The worker associated with the task. This field is empty if a worker is not
yet assigned.
queue (string) - The queue associated with the task. This field is empty if a queue is not yet
assigned.
error (null or object) - Any, errors that occurred that did not cause the overall call to fail. See
Error Details.
NOTE
The exception and traceback fields have been deprecated as of Pulp 2.4. The information
about errors that have occurred will be contained in the error block. See Error Details for
more information.
{
"_href": "/pulp/api/v2/tasks/0fe4fcab-a040-11e1-a71c-00508d977dff/",
"state": "running",
"worker_name": "[email protected]",
"task_id": "0fe4fcab-a040-11e1-a71c-00508d977dff",
"task_type": "pulp.server.tasks.repository.sync_with_auto_publish",
"progress_report": {}, # contents depend on the operation
"result": null,
"start_time": "2012-05-17T16:48:00Z",
"finish_time": null,
142
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
"exception": null,
"traceback": null,
"tags": [
"pulp:repository:f16",
"pulp:action:sync"
],
"spawned_tasks": [{"href": "/pulp/api/v2/tasks/7744e2df-39b9-46f0-bb10-feffa2f7014b/",
"task_id": "7744e2df-39b9-46f0-bb10-feffa2f7014b" }],
"error": null
}
Method: GET
Path: /pulp/api/v2/tasks/<task_id>/
Permission: read
Response Codes:
NOTE
It is possible for a task to complete or experience an error before the cancellation request
is processed, so it is not guaranteed that a task’s final state will be ‘canceled’ as a result of
this call. In these instances this method call will still return a response code of 200.
Method: DELETE
Path: /pulp/api/v2/tasks/<task_id>/
Permission: delete
Response Codes:
Return: null
143
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Method: GET
Path: /pulp/api/v2/tasks/
Permission: read
Query Parameters:
tag (string) - (optional) only return tasks tagged with all tag parameters
Response Codes:
Method: DELETE
Path: /pulp/api/v2/tasks/
Permission: delete
For example:
/pulp/api/v2/tasks/?state=finished&state=skipped
Response Codes:
Method: POST
Path: /pulp/api/v2/tasks/search/
Permission: read
Request Body Contents: include the key “criteria” whose value is a mapping structure as defined in
144
APPENDIX D. API REFERENCE IN RED HAT UPDATE INFRASTRUCTURE 3.1
Request Body Contents: include the key “criteria” whose value is a mapping structure as defined in
Search Criteria
Response Codes:
Return: the same format as retrieving a single task, except the base of the return value is a list. If no
results are found, an empty list is returned.
Method: GET
Path: /pulp/api/v2/tasks/search/
Permission: read
Query Parameters: query params should match the attributes of a Criteria object as defined in Search
Criteria. The exception is that field names should be specified in singular form with as many ‘field=foo’
pairs as needed.
For example:
/pulp/api/v2/tasks/search/?field=id&field=task_type&limit=20Response Codes:
NOTE
=== It is possible for a task to complete or experience an error before the cancellation
request is processed, so it is not guaranteed that a task’s final state will be ‘canceled’ as a
result of this call. In these instances this method call will still return a response code of
200. ===
Method: DELETE
Path: /pulp/api/v2/task_groups/<group_id>/
Permission: delete
Response Codes:
Return: null
145
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Task Group Summary object summarizes the state of all the tasks belonging to a task group.
{
"accepted": 0,
"finished": 100,
"running": 4,
"canceled": 0,
"waiting": 2,
"skipped": 0,
"suspended": 0,
"error": 0,
"total": 106
}
Method: GET
Path: /pulp/api/v2/task_groups/<task_group_id>/state_summary/
Permission: read
Response Codes:
Return: a Cancelling Tasks in a Task Group summarizing the state of all tasks belonging to queried task
group id
Report a bug
146
APPENDIX E. GNU GENERAL PUBLIC LICENSES
Copyright © 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-
1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but
changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By
contrast, the GNU General Public License is intended to guarantee your freedom to share and change
free software—to make sure the software is free for all its users. This General Public License applies to
most of the Free Software Foundation’s software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public
License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are
designed to make sure that you have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it if you want it, that you can change the
software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to
ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the
recipients all the rights that you have. You must make sure that they, too, receive or can get the source
code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which
gives you legal permission to copy, distribute and/or modify the software.
Also, for each author’s protection and ours, we want to make certain that everyone understands that
there is no warranty for this free software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so that any problems introduced by
others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger
that redistributors of a free program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any patent must be licensed for
everyone’s free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
0. This License applies to any program or other work which contains a notice placed by the copyright
holder saying it may be distributed under the terms of this General Public License. The "Program",
below, refers to any such program or work, and a "work based on the Program" means either the
Program or any derivative work under copyright law: that is to say, a work containing the Progr am or a
portion of it, either verbatim or with modifications and/or translated into another language.
(Hereinafter, translation is included without limitation in the term "modification".) Each licensee is
addressed as "you".
147
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Activities other than copying, distribution and modification are not covered by this License; they are
outside its scope. The act of running the Program is not restricted, and the output from the Program is
covered only if its contents constitute a work based on the Program (independent of having been made
by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any
medium, provided that you conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to
the absence of any warranty; and give any other recipients of the Program a copy of this License along
with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer
warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on
the Program, and copy and distribute such modifications or work under the terms of Section 1 above,
provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and
the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived
from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under
the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when
started running for such interactive use in the most ordinary way, to print or display an announcement
including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you
provide a warranty) and that users may redistribute the program under these conditions, and telling the
user how to view a copy of this License. (Exception: if the Program itself is interactive but does not
normally print such an announcement, your work based on the Program is not required to print an
announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not
derived from the Program, and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole which is a work based on
the Program, the distribution of the whole must be on the terms of this License, whose permissions for
other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by
you; rather, the intent is to exercise the right to control the distribution of derivative or collective works
based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a
work based on the Program) on a volume of a storage or distribution medium does not bring the other
work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or
executable form under the terms of Sections 1 and 2 above provided that you also do one of the
following:
a) Accompany it with the complete corresponding machine-readable source code, which must be
distributed under the terms of Sections 1 and 2 above on a medium customarily used for software
interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no
148
APPENDIX E. GNU GENERAL PUBLIC LICENSES
more than your cost of physically performing source distribution, a complete machine-readable copy of
the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source
code. (This alternative is allowed only for noncommercial distribution and only if you received the
program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an
executable work, complete source code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to control compilation and installation of the
executable. However, as a special exception, the source code distributed need not include anything that
is normally distributed (in either source or binary form) with the major components (compiler, kernel,
and so on) of the operating system on which the executable runs, unless that component itself
accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place,
then offering equivalent access to copy the source code from the same place counts as distribution of
the source code, even though third parties are not compelled to copy the source along with the object
code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under
this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and
will automatically terminate your rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses terminated so long as such parties
remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants
you permission to modify or distribute the Program or its derivative works. These actions are prohibited
by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work
based on the Program), you indicate your acceptance of this License to do so, and all its terms and
conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient
automatically receives a license from the original licensor to copy, distribute or modify the Program
subject to these terms and conditions. You may not impose any further restrictions on the recipients'
exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties
to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason
(not limited to patent issues), conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of
this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License
and any other pertinent obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution of the Program by all those
who receive copies directly or indirectly through you, then the only way you could satisfy both it and this
License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the
balance of the section is intended to apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or
to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the
free software distribution system, which is implemented by public license practices. Many people have
149
Red Hat Update Infrastructure 3.1 System Administrator's Guide
made generous contributions to the wide range of software distributed through that system in reliance
on consistent application of that system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this
License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by
copyrighted interfaces, the original copyright holder who places the Program under this License may
add an explicit geographical distribution limitation excluding those countries, so that distribution is
permitted only in or among countries not thus excluded. In such case, this License incorporates the
limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public
License from time to time. Such new versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this
License which applies to it and "any later version", you have the option of following the terms and
conditions either of that version or of any later version published by the Free Software Foundation. If the
Program does not specify a version number of this License, you may choose any version ever published
by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution
conditions are different, write to the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions
for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our
free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best
way to achieve this is to make it free software which everyone can redistribute and change under these
terms.
150
APPENDIX E. GNU GENERAL PUBLIC LICENSES
To do so, attach the following notices to the program. It is safest to attach them to the start of each
source file to most effectively convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
one line to give the program’s name and an idea of what it does.
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if
not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
The hypothetical commands show w and show c should show the appropriate parts of the General
Public License. Of course, the commands you use may be called something other than show w and
show c; they could even be mouse-clicks or menu items—whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a
"copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision'
(which makes passes at compilers) written by James Hacker.
This General Public License does not permit incorporating your program into proprietary programs. If
your program is a subroutine library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the [GNU Lesser General Public License]
(http://www.gnu.org/licenses/lgpl.html) instead of this License.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is
not allowed.
151
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to
share and change the works. By contrast, the GNU General Public License is intended to guarantee your
freedom to share and change all versions of a program—to make sure it remains free software for all its
users. We, the Free Software Foundation, use the GNU General Public License for most of our software;
it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are
designed to make sure that you have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you want it, that you can change the
software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to
surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to
the recipients the same freedoms that you received. You must make sure that they, too, receive or can
get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the
software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this
free software. For both users' and authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software
inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the
area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those products. If such problems arise
substantially in other domains, we stand ready to extend this provision to those domains in future
versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to
restrict development and use of software on general-purpose computers, but in those that do, we wish
to avoid the special danger that patents applied to a free program could make it effectively proprietary.
To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
0. Definitions
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor
masks.
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed
as "you". "Licensees" and "recipients" may be individuals or organizations.
152
APPENDIX E. GNU GENERAL PUBLIC LICENSES
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright
permission, other than the making of an exact copy. The resulting work is called a "modified version" of
the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based on the Program.
To "propagate" a work means to do anything with it that, without permission, would make you directly or
secondarily liable for infringement under applicable copyright law, except executing it on a computer or
modifying a private copy. Propagation includes copying, distribution (with or without modification),
making available to the public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other parties to make or receive copies.
Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a
convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells
the user that there is no warranty for the work (except to the extent that warranties are provided), that
licensees may convey the work under this License, and how to view a copy of this License. If the
interface presents a list of user commands or options, such as a menu, a prominent item in the list meets
this criterion.
1. Source Code
The "source code" for a work means the preferred form of the work for making modifications to it.
"Object code" means any non-source form of a work.
A "Standard Interface" means an interface that either is an official standard defined by a recognized
standards body, or, in the case of interfaces specified for a particular programming language, one that is
widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a)
is included in the normal form of packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that Major Component, or to implement
a Standard Interface for which an implementation is available to the public in source code form. A "Major
Component", in this context, means a major essential component (kernel, window system, and so on) of
the specific operating system (if any) on which the executable work runs, or a compiler used to produce
the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all the source code needed to
generate, install, and (for an executable work) run the object code and to modify the work, including
scripts to control those activities. However, it does not include the work’s System Libraries, or general-
purpose tools or generally available free programs which are used unmodified in performing those
activities but which are not part of the work. For example, Corresponding Source includes interface
definition files associated with source files for the work, and the source code for shared libraries and
dynamically linked subprograms that the work is specifically designed to require, such as by intimate data
communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from
other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions
All rights granted under this License are granted for the term of copyright on the Program, and are
irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a covered work is covered by this
153
Red Hat Update Infrastructure 3.1 System Administrator's Guide
License only if the output, given its content, constitutes a covered work. This License acknowledges
your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as
your license otherwise remains in force. You may convey covered works to others for the sole purpose of
having them make modifications exclusively for you, or provide you with facilities for running those
works, provided that you comply with the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works for you must do so exclusively
on your behalf, under your direction and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below.
Sublicensing is not allowed; section 10 makes it unnecessary.
No covered work shall be deemed part of an effective technological measure under any applicable law
fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological
measures to the extent such circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit operation or modification of the
work as a means of enforcing, against the work’s users, your or third parties' legal rights to forbid
circumvention of technological measures.
You may convey verbatim copies of the Program’s source code as you receive it, in any medium,
provided that you conspicuously and appropriately publish on each copy an appropriate copyright
notice; keep intact all notices stating that this License and any non-permissive terms added in accord
with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or
warranty protection for a fee.
You may convey a work based on the Program, or the modifications to produce it from the Program, in
the form of source code under the terms of section 4, provided that you also meet all of these
conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any
conditions added under section 7. This requirement modifies the requirement in section 4 to "keep
intact all notices".
c) You must license the entire work, as a whole, under this License to anyone who comes into possession
of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the
whole of the work, and all its parts, regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not invalidate such permission if you have
separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if
154
APPENDIX E. GNU GENERAL PUBLIC LICENSES
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if
the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need
not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their
nature extensions of the covered work, and which are not combined with it such as to form a larger
program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the
compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s
users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not
cause this License to apply to the other parts of the aggregate.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that
you also convey the machine-readable Corresponding Source under the terms of this License, in one of
these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution
medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily
used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution
medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer
spare parts or customer support for that product model, to give anyone who possesses the object code
either (1) a copy of the Corresponding Source for all the software in the product that is covered by this
License, on a durable physical medium customarily used for software interchange, for a price no more
than your reasonable cost of physically performing this conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the
Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you
received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer
equivalent access to the Corresponding Source in the same way through the same place at no further
charge. You need not require recipients to copy the Corresponding Source along with the object code. If
the place to copy the object code is a network server, the Corresponding Source may be on a different
server (operated by you or a third party) that supports equivalent copying facilities, provided you
maintain clear directions next to the object code saying where to find the Corresponding Source.
Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the
object code and Corresponding Source of the work are being offered to the general public at no charge
under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source
as a System Library, need not be included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is
normally used for personal, family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases
shall be resolved in favor of coverage. For a particular product received by a particular user, "normally
used" refers to a typical or common use of that class of product, regardless of the status of the
particular user or of the way in which the particular user actually uses, or expects or is expected to use,
155
Red Hat Update Infrastructure 3.1 System Administrator's Guide
the product. A product is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of
use of the product.
"Installation Information" for a User Product means any methods, procedures, authorization keys, or
other information required to install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The information must suffice to ensure
that the continued functioning of the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product,
and the conveying occurs as part of a transaction in which the right of possession and use of the User
Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the
transaction is characterized), the Corresponding Source conveyed under this section must be
accompanied by the Installation Information. But this requirement does not apply if neither you nor any
third party retains the ability to install modified object code on the User Product (for example, the work
has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to
provide support service, warranty, or updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or installed. Access to a network may be
denied when the modification itself materially and adversely affects the operation of the network or
violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must
be in a format that is publicly documented (and with an implementation available to the public in source
code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms
"Additional permissions" are terms that supplement the terms of this License by making exceptions from
one or more of its conditions. Additional permissions that are applicable to the entire Program shall be
treated as though they were included in this License, to the extent that they are valid under applicable
law. If additional permissions apply only to part of the Program, that part may be used separately under
those permissions, but the entire Program remains governed by this License without regard to the
additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions
from that copy, or from any part of it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place additional permissions on material,
added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if
authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License;
or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or
in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of
such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service
156
APPENDIX E. GNU GENERAL PUBLIC LICENSES
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service
marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the
material (or modified versions of it) with contractual assumptions of liability to the recipient, for any
liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further restrictions" within the meaning of
section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed
by this License along with a term that is a further restriction, you may remove that term. If a license
document contains a further restriction but permits relicensing or conveying under this License, you may
add to a covered work material governed by the terms of that license document, provided that the
further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source
files, a statement of the additional terms that apply to those files, or a notice indicating where to find the
applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written
license, or stated as exceptions; the above requirements apply either way.
8. Termination
You may not propagate or modify a covered work except as expressly provided under this License. Any
attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is
reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your
license, and (b) permanently, if the copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright
holder notifies you of the violation by some reasonable means, this is the first time you have received
notice of violation of this License (for any work) from that copyright holder, and you cure the violation
prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have
received copies or rights from you under this License. If your rights have been terminated and not
permanently reinstated, you do not qualify to receive new licenses for the same material under section
10.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary
propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to
receive a copy likewise does not require acceptance. However, nothing other than this License grants
you permission to propagate or modify any covered work. These actions infringe copyright if you do not
accept this License. Therefore, by modifying or propagating a covered work, you indicate your
acceptance of this License to do so.
Each time you convey a covered work, the recipient automatically receives a license from the original
licensors, to run, modify and propagate that work, subject to this License. You are not responsible for
enforcing compliance by third parties with this License.
157
Red Hat Update Infrastructure 3.1 System Administrator's Guide
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this
License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights
granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in
a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or
importing the Program or any portion of it.
11. Patents
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on
which the Program is based. The work thus licensed is called the contributor’s "contributor version".
A contributor’s "essential patent claims" are all patent claims owned or controlled by the contributor,
whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by
this License, of making, using, or selling its contributor version, but do not include claims that would be
infringed only as a consequence of further modification of the contributor version. For purposes of this
definition, "control" includes the right to grant patent sublicenses in a manner consistent with the
requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the
contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify
and propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement or commitment, however
denominated, not to enforce a patent (such as an express permission to practice a patent or covenant
not to sue for patent infringement). To "grant" such a patent license to a party means to make such an
agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of
the work is not available for anyone to copy, free of charge and under the terms of this License, through
a publicly available network server or other readily accessible means, then you must either (1) cause the
Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent
license for this particular work, or (3) arrange, in a manner consistent with the requirements of this
License, to extend the patent license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the covered work in a country, or your
recipient’s use of the covered work in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by
procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the
covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work,
then the patent license you grant is automatically extended to all recipients of the covered work and
works based on it.
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the
exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you are a party to an arrangement
with a third party that is in the business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the work, and under which the third party
grants, to any of the parties who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by you (or copies made from those
158
APPENDIX E. GNU GENERAL PUBLIC LICENSES
copies), or (b) primarily for and in connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28
March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses
to infringement that may otherwise be available to you under applicable patent law.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the
conditions of this License, they do not excuse you from the conditions of this License. If you cannot
convey a covered work so as to satisfy simultaneously your obligations under this License and any other
pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to
terms that obligate you to collect a royalty for further conveying from those to whom you convey the
Program, the only way you could satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
Notwithstanding any other provision of this License, you have permission to link or combine any covered
work with a work licensed under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this License will continue to apply to the
part which is the covered work, but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the combination as such.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public
License from time to time. Such new versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered
version of the GNU General Public License "or any later version" applies to it, you have the option of
following the terms and conditions either of that numbered version or of any later version published by
the Free Software Foundation. If the Program does not specify a version number of the GNU General
Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public
License can be used, that proxy’s public statement of acceptance of a version permanently authorizes
you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional
obligations are imposed on any author or copyright holder as a result of your choosing to follow a later
version.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
159
Red Hat Update Infrastructure 3.1 System Administrator's Guide
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect
according to their terms, reviewing courts shall apply local law that most closely approximates an
absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of
liability accompanies a copy of the Program in return for a fee.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best
way to achieve this is to make it free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each
source file to most effectively state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
one line to give the program’s name and a brief idea of what it does
This program is free software: you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If
not, see http://www.gnu.org/licenses/.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an
interactive mode:
The hypothetical commands show w and show c should show the appropriate parts of the General
Public License. Of course, your program’s commands might be different; for a GUI interface, you would
use an "about box".
160
APPENDIX E. GNU GENERAL PUBLIC LICENSES
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright
disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the
GNU GPL, see http://www.gnu.org/licenses.
The GNU General Public License does not permit incorporating your program into proprietary
programs. If your program is a subroutine library, you may consider it more useful to permit linking
proprietary applications with the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-
lgpl.html.
Report a bug
161
Red Hat Update Infrastructure 3.1 System Administrator's Guide
Prerequisites
Make sure all your RHUI nodes are subscribed and using the correct repositories. See
Registration and Subscriptions .
Make sure all previously released errata for Red Hat Enterprise Linux 7 have been applied. See
https://access.redhat.com/articles/11258.
If you only want to apply errata for Red Hat Enterprise Linux before applying errata for RHUI, run the
following command:
IMPORTANT
Red Hat recommends you keep your installation up to date at all times by watching for
RHUI updates and applying them when they are released. Only the latest RHUI 3.1.x
version is always supported; no backports are provided for earlier versions. Red Hat
strongly encourages users who are still running RHUI 3.0 to update to the latest version
at their earliest convenience.
NOTE
If you do not know which RHUI version is installed, check the version of the rh-rhui-tools
package on the RHUA node. In the following example, the installed RHUI version is 3.1.3.
# rpm -q rh-rhui-tools
rh-rhui-tools-3.1.3-1.noarch
# yum check-update
# yum -y update
3. Some RHUI updates for the RHUA node contain a newer version of pulp or its plug-ins. If so,
and you are updating from RHUI 3.0.x or from 3.1.2 and earlier, after applying the update.
162
APPENDIX F. UPGRADING RED HAT UPDATE INFRASTRUCTURE
NOTE
Monitor the output from the migrations. If you have RHEL 8 repositories in
your RHUI, you may need to republish some of them. If so, follow any
instructions you may see in the output.
# rhui-services-restart
Run rhui-manager, enter c, enter r, and select one host name at a time.
Alternatively, on the command line, for all your CDS host names, run the following
command:
NOTE
If no newer version of pulp or its plug-in is involved in the update, the post-update steps
are not needed.
# yum check-update
2. Some RHUI updates for CDS nodes contain a newer version of pulp or its plugins, or an update
of the rhui-oid-validator package. If that is the case (you are updating from RHUI 3.0.x or from
3.1.1 and earlier) then, before applying RHUI updates, be sure to remount the shared file system,
typically mounted at /var/lib/rhui/remote_share, read-write. This allows the pulp packages to
update on the CDS nodes.
The way you remount the file system depends on the underlying technology.
If you are using Glusterfs, temporarily unmount the file system and then mount it read-
write.
# mount /var/lib/rhui/remote_share
# mount -o rw /var/lib/rhui/remote_share
If using NFS, you can remount the file system in one step.
163
Red Hat Update Infrastructure 3.1 System Administrator's Guide
# yum -y update
If using Glusterfs:
# umount /var/lib/rhui/remote_share
# mount /var/lib/rhui/remote_share
If using NFS.
# rhui-services-restart
If no newer pulp or rhui-oid-validator version is involved in the update, you need not perform
the pre-update step (2) or the post-update steps (4-5).
Red Hat Update Infrastructure 3.0.3 introduced a service that can continuously monitor the CDN
certificate. When a new certificate is generated in the CDN, this service replaces the old certificate with
the new one, allowing Red Hat Update Infrastructure to keep synchronizing repositories.
To enable this feature, follow the instructions in these chapters if you have not done so already:
With Red Hat Update Infrastructure 3.1.3 and later, the default container registry is registry.redhat.io.
You can override this default registry URL to add to Red Hat Update Infrastructure containers hosted at
any other registries.
NOTE
164
APPENDIX F. UPGRADING RED HAT UPDATE INFRASTRUCTURE
NOTE
Some registries, including registry.redhat.io, require a login and password. You can save
this data in the RHUI configuration or supply it when prompted. Both options are
described in Add a Container to Red Hat Update Infrastructure .
For a comprehensive list of packages that extend basic RHUI features, see Install Additional Packages .
165
Red Hat Update Infrastructure 3.1 System Administrator's Guide
IMPORTANT
The following procedure migrates only Red Hat repositories; it does not migrate custom
repositories.
Procedure
1. Run the following command to mount the downloaded ISO to the mnt directory on the RHUA:
3. Log in to the Red Hat Update Infrastructure 2.x RHUA and run the following script to generate
rhui-export-config-{timestamp}.tar.
NOTE
4. Copy the rhui-export tarball to a Red Hat Update Infrastructure 3.1 directory.
The rhui-export tarball also contains entitlement Certificate Authority (CA) files collected from the
RHUI 2 RHUA: the CA certificate and its key. You can use the CA certificate file on a RHUI 3 CDS node
to allow clients that previously fetched content from your RHUI 2 to continue to work when you switch to
RHUI 3. For more information, see Section 7.3, “Configure a Content Delivery Server to Accept Legacy
CAs” for information about accepting legacy CAs.
Alternatively, you can force your clients to start using Red Hat Update Infrastructure3.1. If you want to do
this, you must take several steps to complete the migration from Red Hat Update Infrastructure 2.x to
Red Hat Update Infrastructure 3.1.
166
APPENDIX G. MIGRATING FROM RHUI 2 TO RHUI 3.1
generate a new entitlement certificate for the migrated repositories on the Red Hat Update
Infrastructure 3.1 RHUA.
copy and install the RPM on the client, replacing the previous Yum configuration for the Red
Hat Update Infrastructure 2.x RHUA.
In other words, you must have created such an RPM on Red Hat Update Infrastructure 2.x and installed it
on a client, with a file named example-rpm-1-1.noarch.rpm, for example. On Red Hat Update
Infrastructure 3.1, after migrating the repositories, you would generate an entitlement and create an
RPM named example-rpm-2-1.noarch.rpm.
The Red Hat Update Infrastructure Management Tool enables you specify the Version of the
configuration RPM. If you used 1 on Red Hat Update Infrastructure 2.x, use a higher number on Red Hat
Update Infrastructure 3.1, for example, 2. Then you can use yum update example-rpm-2-1.noarch.rpm
or rpm -U example-rpm-2-1.noarch.rpm on the client. The configuration is replaced completely, and
the client is ready to consume content from Red Hat Update Infrastructure 3.1. If you use a different
name, you must remove the old configuration package (yum remove example-rpm or rpm -e
example-rpm) and install the new one.
Report a bug
167