-
Language:
English
-
Language:
English
Chapter 5. Repositories
The Repository Management screen is used to list, add, and delete repositories. You can also create and upload packages to custom repositories.
You will require a Red Hat content certificate and private key in order to access repositories with RHUI Manager. Each product requires its own content certificate, which is provided by Red Hat. Once you have run RHUI Manager for the first time, upload a new content certificate for each product you require by following the directions in Procedure 8.3, “Upload Content Certificate”.
If you attempt to work with repositories without having a valid content certificate, you will see the following error message:
No Red Hat content certificates have been loaded. Upload a content certificate to provide entitled products for import.
To access the Repository Management screen, go to the Home screen and type
r
at the prompt:
rhui (home) => r -= Repository Management =- l list repositories currently managed by the RHUI i display detailed information on a repository a add a new Red Hat content repository c create a new custom repository d delete a repository from the RHUI u upload content to a custom repository p list packages in a repository Connected: rhua.example.com ---------------------------------------------- rhui (repo) =>
Procedure 5.1. List Repositories
- From the Repository Management screen, type
l
at the prompt to list the repositories currently being managed by the RHUI:------------------------------------------------------------------------------ rhui (repo) => l Custom Repositories Custom Repository 1 Red Hat Repositories Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) ------------------------------------------------------------------------------
Procedure 5.2. Display Repository Information
- From the Repository Management screen, type
i
at the prompt to display information about a particular repository:------------------------------------------------------------------------------ rhui (repo) => i
- A list of all repositories currently being managed by the RHUI will be displayed. Select which repositories to view by typing the number of the repository at the prompt:
Select one or more repositories: Custom Repositories - 1 : Custom Repository 1 Red Hat Repositories - 2 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) - 3 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) - 4 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) - 5 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) Enter value (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1
Typing the number of a repository will place a checkmark next to the name of that repository:Select one or more repositories: Custom Repositories x 1 : Custom Repository 1 Red Hat Repositories - 2 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) - 3 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) - 4 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) - 5 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) Enter value (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands: 2 Select one or more repositories: Custom Repositories x 1 : Custom Repository 1 Red Hat Repositories x 2 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) - 3 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) - 4 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) - 5 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) Enter value (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Continue until all repositories you wish to view have been checked, and then typec
at the prompt to display the details:Enter value (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands: c Name: Custom Repository 1 Type: Custom Relative Path: custom/i386 Entitlement Path: /custom/$basearch Package Count: 0 Name: Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) Type: Red Hat Relative Path: content/dist/rhel/rhui/server/5Server/i386/rhui/1.2/os Package Count: 13 Last Sync: 05-11-2011 16:01 Next Sync: 05-13-2011 16:01 ------------------------------------------------------------------------------ rhui (repo) =>
Procedure 5.3. Add a Red Hat Repository
- Before adding a new Red Hat repository, you will need to have the specific repositories loaded for your entitled products. For example, if your content certificate grants access to the product
Red Hat Enterprise Linux Server (RPMs)
, you will need to have both 32-bit and 64-bit repositories loaded. This occurs automatically when RHUI Manager contacts RHN. - From the Repository Management screen, type
a
at the prompt to add a new Red Hat repository:rhui (repo) => a
- There are three ways to add new Red Hat repositories:
- All in Certificate: Adds all available repositories for all entitled products in the certificate. You will be required to confirm the list of repositories before they are added.
- By Product: Adds all available repositories for chosen products. As each repository is added, it will be displayed.
- By Repository: This option shows a list of all available repositories for all entitled products. Select each individual repository to be added.
rhui (repo) => a Loading latest entitled products from Red Hat... ... listings loaded Determining undeployed products... ... product list calculated Import Repositories: 1 - All in Certificate 2 - By Product 3 - By Repository Enter value (1-3) or 'b' to abort:
All in Certificate method
From the Add a Red Hat Repository screen, select the 'all in certificate' method by typing1
at the prompt:Enter value (1-3) or 'b' to abort: 1 All repositories for all entitled products will be imported in this process. This may result in multiple repositories being imported, such as if a product is supported on multiple architectures. The following products will be deployed: Red Hat Enterprise Linux Server 6 Releases (RPMs) Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-x86_64) Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-i386) Red Hat Enterprise Linux Server 6 Releases (SRPMS) Red Hat Enterprise Linux Server 6 Releases (SRPMS) (6Server-x86_64) Red Hat Enterprise Linux Server 6 Releases (SRPMS) (6Server-i386) Red Hat Enterprise Linux Server 6 Updates (RPMs) Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64) Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386) Red Hat Enterprise Linux Server 6 Updates (SRPMS) Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386) Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-x86_64) Proceed? (y/n)
Confirm the list of repositories by typingy
at the prompt:Note
Content will not be downloaded to the newly imported repositories immediately. It will download when the next synchronization occurs.By Product
From the Add a Red Hat Repository screen, select the 'by product' method by typing2
at the prompt:Import Repositories: 1 - All in Certificate 2 - By Product 3 - By Repository Enter value from (1-3) or 'b' to abort: 2
A list of products with repositories available to be added will be displayed. Select the products to be deployed to the RHUI by typing the number of each product at the prompt. Typing the number of a product will place a checkmark next to the name of that product. Continue until all products you want to deploy have been checked, and then typec
at the prompt to confirm:All repositories for selected products will be imported in this process. Select the products to be deployed to the RHUI (only undeployed products are displayed): - 1 : Red Hat Enterprise Linux Server (RPMs) - 2 : Red Hat Enterprise Linux Server (SRPMS) - 3 : Red Hat Enterprise Linux Server (STS) - 4 : Red Hat Enterprise Linux Server 6 Optional Releases (RPMs) - 5 : Red Hat Enterprise Linux Server 6 Optional Releases (SRPMS) - 6 : Red Hat Enterprise Linux Server 6 Optional Updates (RPMs) - 7 : Red Hat Enterprise Linux Server 6 Optional Updates (SRPMS) - 8 : Red Hat Enterprise Linux Server 6 Releases (RPMs) - 9 : Red Hat Enterprise Linux Server 6 Releases (SRPMS) - 10: Red Hat Enterprise Linux Server 6 Updates (RPMs) - 11: Red Hat Enterprise Linux Server 6 Updates (SRPMS) - 12: Red Hat Update Infrastructure 1.2 (SRPMS) Enter value from (1-12) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Note
Content will not be downloaded to the newly imported repositories immediately. It will download when the next synchronization occurs.By Repository
From the Add a Red Hat Repository screen, select the 'by repository' method by typing3
at the prompt:Enter value (1-3) or 'b' to abort: 3 Select the product repositories to be deployed to the RHUI (only undeployed products are displayed): Red Hat Enterprise Linux Server 6 Optional Updates (SRPMS) - 1 : Red Hat Enterprise Linux Server 6 Optional Updates (SRPMS) (6Server-i386) - 2 : Red Hat Enterprise Linux Server 6 Optional Updates (SRPMS) (6Server-x86_64) Red Hat Enterprise Linux Server 6 Updates (RPMs) - 3 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64) - 4 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386) Enter value (1-4) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1 ... [output truncated] ... Enter value (1-4) to toggle selection, 'c' to confirm selections, or '?' for more commands: c The following product repositories will be deployed: Red Hat Enterprise Linux Server 6 Optional Updates (SRPMS) Red Hat Enterprise Linux Server 6 Optional Updates (SRPMS) (6Server-i386) Proceed? (y/n)
A list of the repositories to be deployed will be displayed. Typey
at the prompt to confirm the selection and deploy the products:Note
Content will not be downloaded to the newly imported repositories immediately. It will download when the next synchronization occurs.
Procedure 5.4. Delete a Red Hat Repository
- Deleting a Red Hat repository using RHUI Manager will remove the repository from both the RHUA and any CDS instance it is deployed on.From the Repository Management screen, type
d
at the prompt to delete a Red Hat repository:rhui (repo) => d
- A list of all repositories currently being managed by the RHUI will be displayed. Select which repositories to delete by typing the number of the repository at the prompt. Typing the number of a repository will place a checkmark next to the name of that repository. Continue until all repositories you wish to delete have been checked, and then type
c
at the prompt to confirm:Select one or more repositories: Custom Repositories - 1 : Custom Repository 1 Red Hat Repositories - 2 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386) - 3 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64) - 4 : Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386) - 5 : Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-x86_64) - 6 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) - 7 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) - 8 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) - 9 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) Enter value (1-9) to toggle selection, 'c' to confirm selections, or '?' for more commands: 2-4 Select one or more repositories: Custom Repositories - 1 : Custom Repository 1 Red Hat Repositories x 2 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386) x 3 : Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64) x 4 : Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386) - 5 : Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-x86_64) - 6 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) - 7 : Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) - 8 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) - 9 : Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) Enter value (1-9) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
- A list of the repositories to be deleted will be displayed. Type
y
at the prompt to confirm the selection and delete the repositories:The following repositories will be deleted: Red Hat Repositories Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386) Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64) Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386) Proceed? (y/n) y
Note
Repositories can not be deleted immediately. They will be deleted when the next CDS synchronization occurs.
Procedure 5.5. List Packages in a Repository
Note
When listing repositories within RHUI Manager, only repositories that contain less than 100 packages will have their contents displayed. Results with more than 100 packages will display a package count only. To see a complete list, regardless of how many packages are contained within a repository, use the
rhui-manager packages list
command at the shell prompt instead. See Section 4.3, “Using RHUI Manager from the Shell Prompt” for more information about managing RHUI from the shell prompt.
- From the Repository Management screen, type
p
at the prompt to list the packages in a particular repository:rhui (repo) => p Choose a repository: 1 - Custom Repository 1 2 - Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386) 3 - Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64) 4 - Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386) 5 - Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-x86_64) 6 - Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386) 7 - Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64) 8 - Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-i386) 9 - Red Hat Update Infrastructure 1.2 (SRPMS) (5Server-x86_64) Enter value (1-9) or 'b' to abort:
- Select the number of the repository you wish to view. RHUI Manager will ask if you want to filter the results. Leave the line blank to see the results without a filter:
Enter value (1-9) or 'b' to abort: 8 Enter the first few characters (case insensitive) of an RPM to filter the results (blank line for no filter): 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: PyYAML-3.08-4.el5.src.rpm grinder-0.0.57-1.el5.src.rpm httpd-2.2.3-43.el5_5.3.src.rpm libyaml-0.1.2-3.el5.src.rpm m2crypto-0.16-6.1.el5_5.1.src.rpm mod_python-3.3.1-12.el5.src.rpm python-hashlib-20081119-5.el5.src.rpm python-pycurl-7.15.5.1-4.el5.src.rpm rh-cds-0.27-1.el5_5.src.rpm rh-rhua-0.91-1.el5_5.src.rpm rh-rhua-0.95-1.el5_5.src.rpm rh-rhui-tools-0.76-1.el5_5.src.rpm rpm-4.4.2.3-20.el5_5.1.src.rpm ------------------------------------------------------------------------------ rhui (repo) =>
- Alternatively, type the first few letters of the RPM name you are looking for to filter the results:
Enter the first few characters (case insensitive) of an RPM to filter the results (blank line for no filter): py 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: PyYAML-3.08-4.el5.src.rpm python-hashlib-20081119-5.el5.src.rpm python-pycurl-7.15.5.1-4.el5.src.rpm ------------------------------------------------------------------------------ rhui (repo) =>
5.1. Custom Repositories
Procedure 5.6. Create a Custom Repository
- From the Repository Management screen, type
p
at the prompt to list the packages in a particular repository:rhui (repo) => c
- 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
, andrepo-1
are all valid entries.Unique ID for the custom repository (alphanumerics, _, and - only): repo_1
- Enter a display name for the repository. This name is used to identify the repository within RHUI Manager:
Display name for the custom repository [repo_1]: Custom Repository 1
- Specify the path that will host the repository. The path must be unique across all repos hosted by the RHUI. For example: if you specify the path at this step as
foo/bar/baz
then the repository will be located athttps://<server>/pulp/repos/foo/bar/baz
:Path at which the repository will be served [repo_1]: /custom/i386
- Select the checksum type to be used for the repository metadata:
Algorithm to use when calculating the checksum values for repository metadata: 1 - sha256 2 - sha1 Enter value (1-2) or 'b' to abort: 1
- Choose whether or not to protect the new repository. If you answer
no
to this question, any client will be able to access the repository. If you answeryes
then only clients with an appropriate entitlement certificate will be able to access the repository:Should the repository require an entitlement certificate to access? (y/n) y
- If you choose to protect the new repository, RHUI Manager will ask for the entitlement path. It will also make a suggestion for the entitlement path, based on the repository's relative path.Client entitlement certificates contain the download URLs that they are allowed to access. RHUI analyzes the contents of the certificate to determine if the repository requested matches any of the permitted URLs, which determines whether or not it will allow the client to authenticate. For example: if an entitlement certificate grants access to
/foo/bar/baz
, and the request is made to a repository located athttps://server/pulp/repos/foo/bar/baz/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 asyum
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/foo/$basearch/bar
, and the request is made to a repository located athttps://server/pulp/repos/foo/i386/bar
RHUI will approve the request and grant the authentication, because the path matches when the variable is populated.RHUI Manager will suggest a path to use, based on the variables you used when you used when you gave it a path for the repository. Leave the field blank to accept the suggested path. In this example, the path was given as/custom/i386
, so RHUI Manager has suggested that the/i386
parameter be replaced with$basearch
instead.Based on the repository's relative path, the suggested entitlement path is: /custom/$basearch The following repositories have the same entitlement path as suggested: Custom Repository 2 Path that should be used when granting an entitlement for this repository. This may use yum variable substitutions (e.g. $basearch) to group this together with other repositories that share the entitlement [/custom/$basearch]:
- The details of the new repository will be displayed. Type
y
at the prompt to confirm the information and create the repository:The following repository will be created: ID: repo_1 Name: Custom Repository 1 Path: /custom/i386 Entitlement: /custom/$basearch Proceed? (y/n) y Successfully created repository Custom Repository 1 ------------------------------------------------------------------------------ rhui (repo) =>
Procedure 5.7. Upload Packages to a Custom Repository
- It is possible to upload multiple packages at a time, and to upload to more than one repository at a time. Packages are uploaded to the RHUA immediately, but will not be available on the CDS instance until the next time the CDS is synchronized.From the Repository Management screen, type
u
at the prompt to upload new packages to a particular repository:rhui (repo) => u
- A list of all available custom repositories will be displayed. Packages cannot be uploaded to Red Hat repositories. Select which repositories to add the packages to by typing the number of the repository at the prompt. Typing the number of a repository will place a checkmark next to the name of that repository. Continue until all repositories you wish to add to have been checked, and then type
c
at the prompt to confirm:Select the repositories to upload the package into: - 1 : Custom Repository 1 Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1 Select the repositories to upload the package into: x 1 : Custom Repository 1 Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: c
- Specify the location of the RPMs to be uploaded. 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 will be uploaded:Enter the location of the packages to upload. If the location is an RPM, the file will be uploaded. If the location is a directory, all RPMs in that directory will be uploaded: /home/example/data/rpms
- The details of the new packages to be uploaded will be displayed. Type
y
at the prompt to confirm the information and upload the packages:The following RPMs will be uploaded: emoticons-0.1-2.x86_64.rpm feedless-1.0-1.noarch.rpm origin-1.0-1.noarch.rpm parent-1.0-1.noarch.rpm patb-0.1-2.x86_64.rpm Proceed? (y/n) y
Note
The packages will be uploaded to the RHUA immediately, but will not be available on the CDS until the CDS has performed a synchronization.