Bug 696830 - RHUI Manager: Repositories Screen
Summary: RHUI Manager: Repositories Screen
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Documentation
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lana Brindley
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: 689309
TreeView+ depends on / blocked
 
Reported: 2011-04-14 23:57 UTC by Jay Dobies
Modified: 2016-02-18 05:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-29 04:43:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-04-14 23:57:06 UTC
Accessed from the Home screen:

   r   manage repositories

This screen is used to create/remove custom and Red Hat entitled repositories and view the contents of them. For custom repositories, this screen also allows packages to be uploaded.

(I'll do each section in its own comment, these massive single descriptions make me really worried I'm going to accidentally close the tab in firefox and lose tons of text.)

Comment 1 Jay Dobies 2011-04-14 23:57:40 UTC
Menu:

-= 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

Comment 2 Jay Dobies 2011-04-15 00:36:04 UTC
Create a Custom Repository:

Begins the workflow for creating a custom repository. The following information is gathered from the user:

- Unique ID

This ID is used to uniquely identify the repository in the RHUI. The only valid characters are alphanumerics, _, and -. No spaces are allowed.

Valid:   repo1, repo_1, repo-1
Invalid: repo!, my repo 1, repo_!#$%^&*

- Display Name

This is only used in RHUI Manager but is more flexible than repo ID. It makes the UI pretty. :)

- Path

This is the part of the URL that will host the repository. This needs to be unique across all repos hosted by the RHUI.

For example, if the path specified here is foo/bar/baz, the repo will be at:
https://<server>/pulp/repos/foo/bar/baz

- Should the repo be protected?

If the user says no, any client will be able to access the repository. If yes, only clients with an entitlement certificate that grants access to it.

- Entitlement Path  (only if they specify yes to protection)

*sigh* ... how to explain this one. I'll explain it here and you can decide if it should go here or in the custom repo section. Or some split between the two areas.

Ok, so here's the deal. Repo authentication works as follows:
- The client passes in an entitlement certificate. That certificate says the download URL paths the client is allowed to access.
- The client makes a request to a repo.
- RHUI looks at the request and all of the entitled download URLs. If the repo portion of the request matches any of the download URLs, it's considered authenticated.

For example, given an entitlement certificate with the following entitlements:
/foo/bar/baz
/foo/wombat/zombie

And the request is made to the repo at:

https://server/pulp/repos/foo/bar/baz/os/repodata

That will succeed since the repo portion of the URL (also known as the path they specified above) starts with one of the entitled download URLs. It only has to start with, not match entirely. So this also works:

https://server/pulp/repos/foo/bar/baz/spam/eggs/stuff

But these don't work:

https://server/pulp/repos/stuff
https://server/pulp/repos/foo/stuff

Now, that's just the basics. Entitlements can have variables in them, but only variables that yum knows how to substitute in the value for. The two common ones are $basearch and $releasever. Both are populated with the values of the client itself, so a RHEL 6 x86_64 box would fill in "x86_64" and "6Server" respectively.

When it comes to authenticate, the variables in your entitlement act as wildcards. So an entitlement of /foo/$basearch/bar will allow the following requests:

https://server/pulp/repos/foo/i386/bar
https://server/pulp/repos/foo/x86_64/bar

And technically,

https://server/pulp/repos/foo/zombie/bar

But yum would never fill in "zombie", so there's no worry there.

What we do in RHUI Manager is attempt to guess at any variables to substitute in because we're smart like that. So if the user specified the path of "/foo/i386/baz", we see the i386 part and suggest "$basearch" for it.

On top of that, if there are any other repositories that have that exact entitlement, we show you them so that you realize you'll be granting access to both the new repo and the existing one if you give that entitlement to a client. You'll see that in the example below.

So ya, that's the entitlement path. You have fun turning that into something that doesn't read like the chaotic inner workings of my head.

- That's it. We show a confirmation prompt that displays a summary of the new repo's properties, giving the user one last chance to change their mind.




Sample:
------------------------------------------------------------------------------
rhui (repo) => c

Unique ID for the custom repository (alphanumerics, _, and - only):
repo_1

Display name for the custom repository [repo_1]:
Custom Repository 1

Path at which the repository will be served [repo_1]:
/custom/i386 

Should the repository require an entitlement certificate to access? (y/n)
y

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 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

------------------------------------------------------------------------------

Comment 3 Jay Dobies 2011-04-15 00:37:39 UTC
List

   l   list repositories currently managed by the RHUI

Lists all repositories deployed in the RHUI, both custom and Red Hat imported.


Sample:

------------------------------------------------------------------------------
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)


------------------------------------------------------------------------------

Comment 4 Jay Dobies 2011-04-15 00:40:47 UTC
Info

   i   display detailed information on a repository

The user selects one or more repositories to view. Extra information is displayed in addition to what's shown in the list view. For custom repos, the entitlement path is also shown.

Note: You'll notice the Last Sync Time output is just a big number. I made myself a note to fix that into a formatted date and will update the bug once I have.




Sample:

------------------------------------------------------------------------------
rhui (repo) => i

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 from (1-5) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1

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 from (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 from (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
Last Sync:          None
Next Sync:          None

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:          1302813062
Next Sync:          None

------------------------------------------------------------------------------

Comment 5 Jay Dobies 2011-04-15 00:49:40 UTC
Add a Red Hat Repository

   a   add a new Red Hat content repository

This is used to create RHUI repositories from entitled products in the user's Red Hat content certificate.

The first step that's done is to contact Red Hat and load the specific repositories for the entitled products. For instance, the content certificate may grant access to the product:

"Red Hat Enterprise Linux Server (RPMs)"

But that actually is made up of two different repositories, one for i386 and one for x86_64 (it's the $basearch variable thing from above again). RHUI Manager contacts Red Hat to do that translation.

Once that is done, there are three ways to import entitled Red Hat repos:

- All in Certificate

This is the likely case for most users. It imports all repositories for all entitled products. The full list of repositories to be imported is shown to the user with a prompt allowing them to cancel.

- By Product

Displays a list of entitled products. The user can select one or more products to import. As they are imported, the actual repositories are displayed to the user:


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)
  x  10: Red Hat Enterprise Linux Server 6 Updates (RPMs)
  x  11: Red Hat Enterprise Linux Server 6 Updates (SRPMS)
Enter value from (1-11) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


The following products will be deployed:
  Red Hat Enterprise Linux Server 6 Updates (RPMs)
  Red Hat Enterprise Linux Server 6 Updates (SRPMS)
Proceed? (y/n) y


Importing Red Hat Enterprise Linux Server 6 Updates (RPMs)...
  Importing product repository Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64)...
  Importing product repository Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-i386)...
Importing Red Hat Enterprise Linux Server 6 Updates (SRPMS)...
  Importing product repository Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-i386)...
  Importing product repository Red Hat Enterprise Linux Server 6 Updates (SRPMS) (6Server-x86_64)...

Content will not be downloaded to the newly imported repositories
until the next sync is run.

------------------------------------------------------------------------------

In the "By Products" view, only products that have one or more unimported repositories are displayed. So if the user imports the i386 version of a product but there is an x86_64 version available as well, the product is still displayed. If, however, both of those were imported, that product would not appear in the list (you don't necessarily have to mention that).

- By Repository

This shows a list of all unimported repositories for all entitled products. It's a fine-grained (think "advanced" as most apps would call it) selection process that allows individual repos to be imported rather than full products. This would let the user select just the i386 repo for a certain product.



All imported repositories are set to automatically update themselves every 6 hours.

In *all* cases, this add process does *not* download packages from Red Hat. That will happen at one of the following times:
- When the 6 hour recurring sync kicks in
- By manually triggering a repo sync in the Sync Screen

Comment 6 Jay Dobies 2011-04-15 00:51:43 UTC
Delete a Repository

   d   delete a repository from the RHUI

Deletes a repository from the RHUI (both RHUA and any CDS instances its deployed on).

Similar to add a Red Hat repo, the repositories will not immediately be deleted from the CDS instances. The delete will occur the next time the CDS does a sync.



Sample:

------------------------------------------------------------------------------
rhui (repo) => d

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 from (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 from (1-9) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


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)

Comment 7 Jay Dobies 2011-04-15 00:54:24 UTC
Upload a Package to a Custom Repository

   u   upload content to a custom repository

Packages may only be uploaded to custom repositories. Packages can be uploaded to more than one repository at a time. The package will be uploaded to the RHUA but will not be available on CDS instances until their next sync.

The only weirdness here is that when prompted for the package to upload, the user may specify either a single RPM (must end with .rpm, I check for that) or a directory. If it's a directory, all .rpm files in that directory will be uploaded (the latter is what is done in the sample).



Sample:

------------------------------------------------------------------------------
rhui (repo) => u

Select the repositories to upload the package into:
  -  1 : Custom Repository 1
Enter value from (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 from (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


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/jdob/vault/code/data/rpms

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)

Comment 8 Jay Dobies 2011-04-15 00:57:40 UTC
List Packages

   p   list packages in a repository

The user chooses a single repository.

Optionally, the user enters the first few characters of the packages to filter on. Only packages that start with the given characters (regardless of case) will be displayed. If no filter is desired, the user just presses enter (leaves the filter blank) to display all packages.

If more than 100 packages would be displayed (after filtering), only a count of the packages is shown to the user. The full package list, regardless of length, can be accessed from the RHUI Manager CLI options which will be described in another bug (short answer: `rhui-manager packages list --repo_id foo`)



Sample (first is no filter, second has a filter):


------------------------------------------------------------------------------
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 from (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) => 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 from (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):
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) =>

Comment 9 Lana Brindley 2011-04-15 01:01:11 UTC
Operation/Repositories

LKB

Comment 10 Jay Dobies 2011-04-15 12:08:17 UTC
Comment from Todd that is a shorter, cleaner way of talking about the entitlements:



This is really because you are getting access to all of the contained sub-directories, or rather:

/foo/bar/baz/*
/foo/wombat/zombie/*

Comment 11 Lana Brindley 2011-05-03 06:15:27 UTC
Revision 1-3

LKB

Comment 12 Sachin Ghai 2011-05-30 06:38:03 UTC
Verified in Install guide at:
http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Update_Infrastructure/2.0/pdf/Installation_Guide/Red_Hat_Update_Infrastructure-2.0-Installation_Guide-en-US.pdf

includes  complete information on "Repository management" under "chapter 5 Repositories" (Page 27). Thanks !

Comment 13 Lana Brindley 2011-07-29 04:43:12 UTC
This book is now available at http://docs.redhat.com/docs/en-US/Red_Hat_Update_Infrastructure/2.0/html/Installation_Guide/index.html

Please raise a new bug for any further changes.

LKB


Note You need to log in before you can comment on or make changes to this bug.