ibm-mas / cli

Maximo Application Suite command line interface
https://ibm-mas.github.io/cli/
Eclipse Public License 2.0
20 stars 15 forks source link

Support for Harbor #1049

Open sycbarry opened 2 weeks ago

sycbarry commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

Hello, any updates on this? Thanks!

durera commented 3 days ago

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