Setting up a Container Registry¶
Management Packs created by the Integration SDK use Adapters that are distributed by container registries. A container registry has at least one repository that stores and provides access to container images. For more information about how the Adapter Container Image distribution works, see Management Pack Distribution.
The container registry is a key component of this distribution model, and as such it is required when building a Management Pack (i.e., using mp-build
)
Any container registry should work if it is set up so that:
- You have write access to a repository for pushing an image
- The repository is public, so that the image can be pulled anonymously (e.g., without first doing a
docker login
) - The registry is accessible by your VMware Aria Operations Cloud Proxies
The following are known to work.
Using the 'Harbor' Container Registry¶
-
Install Harbor, if necessary. Ensure that the network you install it into is accessible from both your development environment and the VMware Aria Operations Cloud Proxies.
- Install Harbor using a Tanzu Tile
- Harbor can be installed as a Tanzu Tile. Instructions can be found here: https://docs.vmware.com/en/VMware-Harbor-Registry/services/vmware-harbor-registry/GUID-installing.html.
- Install Harbor on vSphere
- Harbor can be installed as an OVA on vSphere. The following guide walks through the process (The context of the guide is for deploying a TGK registry, but the process is the same): https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/2.2/tkg-deploy-mc-22/mgmt-reqs-harbor.html
- Installing Harbor Directly
- The Harbor project has installation guides for installing Harbor on Docker and Kubernetes via Helm.
-
Create a Public Repository
Note
VMware Aria Operations pulls images anonymously, which requires the repository to be public. For more information, see the FAQ: I can't use a public repository. Are there any options?
-
Run
mp-build
and set the registry and repository tag when prompted (may look likeharbor.my-organization.com/my-project/adaptername
)Note
If
mp-build
doesn't prompt for a tag for the container repository, open theconfig.json
file in the project's root directory, then replace the key-value ofcontainer_repository
with the tag. -
Once step
3
is successful, subsequent builds will no longer require any of the above steps.
Using a Cloud-based Container Registry¶
Using an AWS container registry¶
AWS container registries use aws
CLI to authenticate, so users should authenticate to their AWS container registry and create a repository before
running mp-build
.
- Log in to your registry using aws CLI
-
Note
VMware Aria Operations pulls images anonymously, which requires the repository to be public. For more information, see the FAQ: I can't use a public repository. Are there any options?
-
Run
mp-build
and set the registry and repository when prompted (usually looks likeaws_account_id.dkr.ecr.region.amazonaws.com/repository-for-test-mp
)Note
If
mp-build
doesn't prompt for a tag for the container repository, open theconfig.json
file in the project's root directory, then replace the key-value ofcontainer_repository
with the tag. -
Once step
3
is successful, subsequent builds will no longer require any of the above steps.
Using Docker Hub¶
Warning
VMware Aria Operations only supports anonymous pulling of images, which may cause issues when using Docker Hub since there is a Download rate limit.
Docker CLI recommends using a token when using docker hub instead of your login password, so users should authenticate their Docker Hub account before running mp-build
.
-
Go to Docker Hub and create a new repository
Note
VMware Aria Operations pulls images anonymously, which requires the repository to be public. For more information, see the FAQ: I can't use a public repository. Are there any options?
-
Login to docker hub using the CLI docker login
-
Run
Themp-build
. When prompted for the container registry and repository, use the following format:USER_NAME
should be the same username used to login into docker hub in step 3, and theCONTAINER_REPOSITORY
should be the registry created in step one. After entering the tag, you will be prompted to enter your credentials to log into Docker Hub. Enter the same credentials used in step 2.Note
If
mp-build
doesn't prompt for a tag for the container repository, open theconfig.json
file in the project's root directory, then replace the key-value ofcontainer_repository
with the tag. -
Once step
3
is successful, subsequent builds will no longer require any of the above steps.