Setting up a Harbor repository v22.2.01
Harbor is an open-source registry that secures artifacts with policies and role-based access control. For more information, see the Harbor documentation. The product container images are hosted on the BMC Docker Trusted Registry (DTR) containers.bmc.com. You can access the container images in any of the following ways:
Before you begin
- Download the file. This file contains a list of images that are synchronized from BMC DTR. You can use this file to verify your Harbor repository after you synchronize it with BMC DTR.
- Make that you have downloaded the key to access the container images from the BMC Electronic Product Distribution (EPD) site.
Make sure that your system meets the following requirements to set up your Harbor repository:
The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.
Set up a Harbor repository and synchronize your Harbor repository with BMC DTR by using the access key. Perform the following actions to synchronize your Harbor repository with BMC DTR:
- Create a Harbor registry.
- Configure the Harbor registry.
- Synchronize your Harbor repository with BMC DTR.
Task 1: To create a harbor registry
In your local system, download Harbor by using the following command:
wget https://github.com/goharbor/harbor/releases/download/v2.1.4/harbor-offline-installer-v2.1.4.tgzUnzip the TAR file by using the following command:
tar xvzf harbor-offline-installer*.tgzNavigate to the harbor directory by using the following command:
cd harborCopy the configuration template by using the following command:
cp harbor.yml.tmpl harbor.yml- In the harbor.yml file, update the values for the following parameters:
- hostname—Name of system where you want to install Harbor.
- harbor_admin_password—Password for the Harbor system administrator.
The harbor.yml file contains a default harbor_admin_password. You can modify the password. - database password—The root password for the local database
The harbor.yml file contains a default database password. You can modify the password.
- Install Harbor with one of the following options:
By using self-signed SSL certificates. See https://goharbor.io/docs/2.1.0/install-config/configure-https/
- Without self-signed SSL certificates.
Perform the following steps in the harbor.yml file.- Update the values for the following parameters:
- hostname—Name of system where you want to install Harbor.
harbor_admin_password—Password for the Harbor system administrator.
The harbor.yml file contains a default harbor_admin_password. You can modify the password.
database password—Root password for the local database.
The harbor.yml file contains a default database password. You can modify the password.
Comment the following lines:
https related config
https
https port for harbor, default is 443
port: 443
The path of cert and key files for nginx
certificate: /your/certificate/path
private_key: /your/private/key/pathFor example:

- Update the values for the following parameters:
Run the following command:
./install.shVerify that you can access the Harbor registry.
Use the admin username and password to log in.
Task 2: To configure a Harbor registry
- In the Harbor admin UI, navigate to the Administration menu, and click Registries.
Click NEW ENDPOINT, and specify the following field values:
- Provider—Docker Registry
- Endpoint URL—https://containers.bmc.com
- Access ID—Support user ID that you use to login to EPD.
- Access Secret—The container image access key specified in the container-token.bmc file that you downloaded from EPD.
The following image shows an example configuration:

Click OK.
The configuration is saved and the configuration status is displayed as Healthy as shown in the following image:
Use this configuration in a replication rule to synchronize your local Harbor repository and DTR.
Task 3: To synchronize your Harbor repository with BMC Docker Trusted Repository
You must synchronize your Harbor repository with the BMC Docker Trusted Repository (DTR) and the BMC Helix Platform services container images.
To synchronize with BMC DTR
- In the Harbor admin UI, navigate to the Administration menu, and click Replications.
Click NEW REPLICATION RULE and specify the values for the following fields:
The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.
The following image shows an example replication rule:
- Click Save.
- To run the rule manually, click REPLICATE.
- After rule execution is complete, navigate to Projects, and verify that the container images are synchronized.
Use steps 1 to 5 to create replication rules for the following source resources:
- bmc/lp0oz
- bmc/lp0pz
- bmc/lp0mz
- bmc/la0cz
To synchronize with BMC Platform services container images
- Log in to the system where you downloaded and extracted the deployment manager helix-on-prem-deployment-manager-22.2.01.sh from EPD.
- Make sure that you have downloaded the all_images.txt file.
- Navigate to the helix-on-prem-deployment-manager/utilities/push_to_repo location.
- In the push_to_repo directory, copy the all_images.txt file.
Convert the all_images.txt file to UNIX format by using the following command:
dos2unix all_images.txtOpen the push_to_custom_repo.sh file and update the following parameter values:
The [confluence_table-plus] macro is a standalone macro and it cannot be used inline.
Run the push_to_custom_repo.sh file by using the following command:
./push_to_custom_repo.sh