Managing Container Images
With orcharhino, you can import container images from various sources and distribute them to external containers using Content Views.
Importing Container Images
You can import container image repositories from any container image registry.
To use the CLI instead of the orcharhino management UI, see the CLI procedure.
-
In the orcharhino management UI, navigate to Content > Products and click Repo Discovery.
-
From the Repository Type list, select Container Images.
-
In the Registry to Discover field, enter the URL of the registry to import images from.
-
In the Registry Username field, enter the name that corresponds with your user name for the container image registry.
-
In the Registry Password field, enter the password that corresponds with the user name that you enter.
-
In the Registry Search Parameter field, enter any search criteria that you want to use to filter your search, and then click Discover.
-
Optional: To further refine the Discovered Repository list, in the Filter field, enter any additional search criteria that you want to use.
-
From the Discovered Repository list, select any repositories that you want to import, and then click Create Selected.
-
Optional: To change the download policy for this container repository to on demand, see changing the download policy for a repository.
-
Optional: If you want to create a product, from the Product list, select New Product.
-
In the Name field, enter a product name.
-
Optional: In the Repository Name and Repository Label columns, you can edit the repository names and labels.
-
Click Run Repository Creation.
-
When repository creation is complete, you can click each new repository to view more information.
-
Optional: To filter the content you import to a repository, click a repository, and then navigate to Limit Sync Tags. Click to edit, and add any tags that you want to limit the content that synchronizes to orcharhino.
-
In the orcharhino management UI, navigate to Content > Products and select the name of your product.
-
Select the new repositories and then click Sync Now to start the synchronization process.
-
In the orcharhino management UI, navigate to Content > Products. Click the name of the required product.
-
Click New repository.
-
From the Type list, select docker. Enter the details for the repository, and click Save.
-
Select the new repository, and click Sync Now.
-
To view the progress of the synchronization, navigate to Content > Sync Status and expand the repository tree.
-
When the synchronization completes, you can click Container Image Manifests to list the available manifests. From the list, you can also remove any manifests that you do not require.
-
Create the custom
CentOS Container Images
product:$ hammer product create \ --description "My_Description" \ --name "CentOS Container Images" \ --organization "My_Organization" \ --sync-plan "My_Sync_Plan"
-
Create the repository for the container images:
$ hammer repository create \ --content-type "docker" \ --docker-upstream-name "centos/centos" \ --name "CentOS" \ --organization "My_Organization" \ --product "CentOS Container Images" \ --url "https://quay.io"
-
Synchronize the repository:
$ hammer repository synchronize \ --name "CentOS" \ --organization "My_Organization" \ --product "CentOS Container Images"
-
For more information about creating a product and repository manually, see Importing Content.
Managing Container Name Patterns
When you use orcharhino to create and manage your containers, as the container moves through Content View versions and different stages of the orcharhino lifecycle environment, the container name changes at each stage.
For example, if you synchronize a container image with the name ssh
from an upstream repository, when you add it to a orcharhino product and organization and then publish as part of a Content View, the container image can have the following name: my_organization_production-custom_spin-my_product-custom_ssh
.
This can create problems when you want to pull a container image because container registries can contain only one instance of a container name.
To avoid problems with orcharhino naming conventions, you can set a registry name pattern to override the default name to ensure that your container name is clear for future use.
If you use a registry name pattern to manage container naming conventions, because registry naming patterns must generate globally unique names, you might experience naming conflict problems. For example:
-
If you set the
repository.docker_upstream_name
registry name pattern, you cannot publish or promote Content Views with container content with identical repository names to theProduction
lifecycle. -
If you set the
lifecycle_environment.name
registry name pattern, this can prevent the creation of a second container repository with the identical name.
You must proceed with caution when defining registry naming patterns for your containers.
To manage container naming with a registry name pattern, complete the following steps:
-
In the orcharhino management UI, navigate to Content > Lifecycle Environments, and either create a lifecycle environment or select a lifecycle environment to edit.
-
In the Container Image Registry area, click the edit icon to the right of Registry Name Pattern area.
-
Use the list of variables and examples to determine which registry name pattern you require.
-
In the Registry Name Pattern field, enter the registry name pattern that you want to use. For example, to use the
repository.docker_upstream_name
:<%= repository.docker_upstream_name %>
-
Click Save.
Managing Container Registry Authentication
You can manage the authentication settings for accessing containers images from orcharhino. By default, users must authenticate to access containers images in orcharhino.
You can specify whether you want users to authenticate to access container images in orcharhino in a lifecycle environment.
For example, you might want to permit users to access container images from the Production
lifecycle without any authentication requirement and restrict access the Development
and QA
environments to authenticated users.
-
In the orcharhino management UI, navigate to Content > Lifecycle Environments.
-
Select the lifecycle environment that you want to manage authentication for.
-
To permit unauthenticated access to the containers in this lifecycle environment, select the Unauthenticated Pull checkbox. To restrict unauthenticated access, clear the Unauthenticated Pull checkbox.
-
Click Save.
Using Container Registries
Podman and Docker can be used to fetch content from container registries.
Logging in to the container registry:
$ podman login orcharhino.example.com
Listing container images:
$ podman search orcharhino.example.com/
Pulling container images:
$ podman pull orcharhino.example.com/my-image:<optional_tag>
The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution–Share Alike 3.0 Unported ("CC-BY-SA") license. This page also contains text from the official Foreman documentation which uses the same license ("CC-BY-SA"). |