Chapter 1. Repository management

Automation hub includes two types of repositories where you can publish content:

Staging repositories
Any user with permission to upload for a namespace can publish content into these repositories. Content in these repositories are not available in the search page, but rather, are displayed on the approval dashboard for an administrator to verify.
Custom repositories
Any user with write permissions on the repository can publish content to these repositories. These repositories are not displayed on the approval dashboard. They can show up on the search page depending on whether search is enabled by the owner of the repository. Custom repositories can be private repositories where only users with view permissions can see them, or public where all users can see them.

Staging repositories are marked with the pipeline=staging label. By default, automation hub ships with one staging repository that is automatically used when a repository is not specified for uploading collections. However, users can create new staging repositories during repository creation.

1.1. Approval pipeline

Automation hub allows you to approve collections into any repository that is marked with the pipeline=approved label. By default, automation hub ships with one repository for approved content, but you have the option to add more from the repository creation screen. Repositories marked with this label are not eligible for direct publishing and collections must come from one of the staging repositories.

Auto approval
When auto approve is enabled, any collection uploaded to a staging repository is automatically promoted to all of the repositories marked as pipeline=approved.
Approval required

When an administrator navigates to the approval dashboard, they can see the collections that have been uploaded into any of the staging repositories. From here they are presented with an Approve button. Clicking Approve displays a list of approved repositories. From this list, the administrator can select 1 or more repositories to which the content should be promoted.

If only one approved repository exists, the collection is automatically moved into it and the administrator is not prompted to select a repository.

Rejection
Rejected collections are automatically placed into the pre-installed rejected repository.

1.2. Role Based Access Control

Role Based Access Control (RBAC) restricts user access to custom repositories based on their defined role. By default, users can view all public repositories in their automation hub, but they cannot modify them unless they have explicit permission to do so. This is the same for other operations on the repository. For example, removing a user’s rights revokes their ability to download content from a custom repository. See Configuring user access for your local automation hub for information about managing user access in automation hub.

1.3. Basic repository management

With basic repository management, you can create, edit, delete, and move content between repositories.

1.3.1. Create a repository

Use this procedure to create a repository.

Procedure

  1. Log in to Red Hat Ansible Automation Platform.
  2. Navigate to Automation HubRepositories.
  3. Click Add repository.
  4. Enter a Repository name.
  5. Enter a Description that indicates the purpose of the repository.
  6. To retain previous versions of your repository each time you make a change, select Retained number of versions. The number of retained versions can range anywhere between 0 and unlimited. To save all versions, leave this set to null.

    Note

    If there are issues with a change to your custom repository, retained versions allow you to revert to a different repository version.

  7. Select the Pipeline for the repository. The available options include the following:

    Staging
    Anyone is allowed to publish content into the repository.
    Approved
    Anything added to this repository is required to go through the approval process through the staging repository. When auto approve is enabled, any collection uploaded to a staging repository is automatically promoted to all of the approved repositories.
    None
    Any user with permissions on the repository can publish to the repository directly and it is not part of the approval pipeline.
  8. To hide the repository from search results, select Hide from search. This is selected by default.
  9. To make the repository private, select Make private. This hides the repository from anyone who does not have permissions to view the repository.
  10. To sync the content from a remote into this repository, select Remote and select the remote that contains the content you want included in your custom repository. For more information, see Repository sync.
  11. Click Save.

    After the repository is created, the details page is displayed.

    From here, you can provide access to your repository, review or add collections, and work with the saved versions of your custom repository.

1.3.2. Provide access to a repository

By default, private repositories and the content are hidden from all users in the system. Public repositories can be viewed by all users, but cannot be modified. Use this procedure to provide access to your custom repository.

Procedure

  1. Log in to Red Hat Ansible Automation Platform.
  2. Navigate to Automation HubRepositories.
  3. Locate your repository in the list and click more actions , then select Edit.
  4. Select the Access tab.
  5. Select a group for Repository owners.

    See Configuring user access for your local automation hub for information about implementing user access.

  6. Select the roles you want assigned for the selected group.
  7. Click Save.

1.3.3. Adding collections to a repository

After your repository is created, you can begin adding collections to it.

Procedure

  1. Log in to Red Hat Ansible Automation Platform.
  2. Navigate to Automation HubRepositories.
  3. Locate your repository in the list and click more actions , then select Edit.
  4. Select the Collections version tab.
  5. Click Add Collection and select the collections you want added to your repository.
  6. Click Select.

1.3.4. Revert to a different repository version

When content is added or removed from a repository, a new version of it is created. If there are issues with a change to your custom repository, you can revert to a previous version. Reverting is a safe operation and does not delete content from the system, but rather, changes the content associated with the repository. The number of versions saved is defined in the Retained number of versions setting when a repository is created.

Procedure

  1. Log in to Red Hat Ansible Automation Platform.
  2. Navigate to Automation HubRepositories.
  3. Locate your repository in the list and click more actions , then select Edit.
  4. Locate the version you want to rollback to and click more actions , then select Revert to this version.
  5. Click Revert.