cli icon indicating copy to clipboard operation
cli copied to clipboard

Support for Harbor

Open sycbarry opened this issue 1 year ago • 3 comments

Hello,

Could you please add support for Harbor mirror registries? Currently, I need to create a project in Harbor before generating registries.

It appears that the MAS CLI tool doesn't allow us to append project names in the mirror registry URL. Is there a workaround or a hidden trick for this?

Thank you!

Here is the command I’m using:

docker pull mirror.mydomain.com:5000/ibmmas/cli:9.0.0 docker run -ti --rm -v /registry:/mnt/registry mirror.mydomain.com:5000/ibmmas/cli:9.0.0 mas mirror-images \ --mode from-filesystem --dir /mnt/registry \ --ibm-entitlement $IBM_ENTITLEMENT_KEY --redhat-username $REDHAT_USERNAME --redhat-password $REDHAT_PASSWORD \ -H mirror.mydomain.com -P 5000 -u $MIRROR_USERNAME -p $MIRROR_PASSWORD \ -c v8-240430-amd64 -C 8.11.x \ --mirror-catalog --mirror-core --mirror-iot --mirror-manage \ --mirror-cfs --mirror-uds --mirror-sls --mirror-tsm --mirror-mongo --mirror-db2 \ --no-confirm

sycbarry avatar Jun 20 '24 23:06 sycbarry

To elaborate, whenever I specify a project in the url (-H), I always get the playbook spitting some error message about the the port mapping.

Many thanks!

sycbarry avatar Jun 20 '24 23:06 sycbarry

Hello, any updates on this? Thanks!

sycbarry avatar Jun 22 '24 14:06 sycbarry

I see ... so, just to make sure I understand correctly:

Current behaviour:

mas mirror-images command will mirror images to {host}:{port}/{reponame}

Desired behaviour:

mas mirror-images command will mirror images to {host}:{port}/{prefix}/{reponame}

We would add a new parameter that allows you to define the prefix, which in the case of Harbor would be your project name.

Note for the dev that picks this up - we would also need to support the same prefix in the mirror-redhat-images and the configure-mirror commands

durera avatar Jul 05 '24 10:07 durera