For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/public-cloud/managed-private-registry/migrate-helm-charts.md.
  • English

Migrating Helm Charts from Chartmuseum to OCI

View as Markdown

The OVHcloud Managed Private Registry service provides you with a managed, authenticated Docker registry where you can privately store your Docker images and Helm charts.

Managed Private Registry is built on top of the open-source solution Harbor to guarantee its interoperability.

Harbor supports two different ways to store the Helm charts data:

  1. Harbor registry storage directly via OCI API.
  2. Harbor hosted Chartmuseum backend via Chartmuseum's API.

From Harbor version 2.6, Chartmuseum is deprecated and removed from Harbor version 2.8.

 

How to know if I have Helm charts stored inside Chartmuseum?

Follow the guide Connecting to the UI to connect to your registry.

From the Harbor user interface, select the Projects menu on the left side of the screen. Check if you have Chartmuseum Helm charts in the Chart Count column.

Migrate Helm - Migrate helm charts - step 1

Select the name of a project that has Chartmuseum Helm charts.

Migrate Helm - Migrate helm charts - step 2

Helm charts stored in Chartmuseum are viewable in the Helm Charts tab.

Migrate Helm - Migrate helm charts - step 3

Helm charts stored in OCI are viewable in the Repository tab, like the Docker images.

Migrate Helm - Migrate helm charts - step 4

 

Instructions

We developed a tool called chartmuseum2oci whose purpose is to migrate Helm charts from Harbor Chartmuseum to the Helm OCI registry.

 

Requirements

To migrate all Helm charts, you have to use an admin user or a user having at least the "developer" role on all projects.

Warning

NOTE: If the user does not have the correct rights, only the Helm Charts contained in projects accessible by the "user" role will be copied. No error will be displayed.

Then export the following variables:

export HARBOR_URL=https://
export HARBOR_USER=
export HARBOR_PASSWORD=

 

Run migration

Run the following commands:

git clone https://github.com/goharbor/chartmuseum-migration-tools.git
cd chartmuseum-migration-tools/chartmuseum2oci
docker build -t goharbor/chartmuseum2oci .
docker run -ti --rm goharbor/chartmuseum2oci --url $HARBOR_URL --username $HARBOR_USER --password $HARBOR_PASSWORD

During the migration, the tool will give you the number of charts to migrate and the progression of the migration:

$ docker run -ti --rm ovhcloud/harbor-chartmuseum-migrator --url $HARBOR_URL --username $HARBOR_USER --password $HARBOR_PASSWORD
$ docker run -ti --rm ovhcloud/harbor-chartmuseum-migrator --url $HARBOR_URL --username $HARBOR_USER --password $HARBOR_PASSWORD
2023/06/28 16:17:32 416 Helm charts to migrate from Chartmuseum to OCI
   4% |█████                                                                                                                                        | (19/416, 20 it/min) [56s:19m36s]

When migration is finished, you will see 100% progress and a confirmation that migration was successful:

$ docker run -ti --rm ovhcloud/harbor-chartmuseum-migrator --url $HARBOR_URL --username $HARBOR_USER --password $HARBOR_PASSWORD
$ docker run -ti --rm ovhcloud/harbor-chartmuseum-migrator --url $HARBOR_URL --username $HARBOR_USER --password $HARBOR_PASSWORD
2023/06/28 16:17:32 416 Helm charts to migrate from Chartmuseum to OCI
   100% |█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (416/416, 20 it/min)
2023/06/28 16:38:14 416 Helm charts successfully migrated from Chartmuseum to OCI
Info

Important: The tool copies Helm charts but does not delete them from Chartmuseum.

 

Use OCI Helm charts

To interact with Helm charts in OCI format, use Helm in version 3.8+. In order to use OCI format exclusively, use the commands below as the correct method for pushing (uploading) and pulling (downloading) images.

Login

helm registry login $HARBOR_URL

Push

helm push dummy-chart-0.1.0.tgz $HARBOR_URL/$HARBOR_PROJECT

Install

helm install dummy-chart oci://$HARBOR_URL/$HARBOR_PROJECT/dummy-chart --version 0.1.0

 

Go further

Browse all the Managed Private Registry (MPR) guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about Managed Private Registry on the OVHcloud US website.