rhtconsulting / rhc-ose

OpenShift Automation and Utilities by Red Hat Consulting
42 stars 34 forks source link

Update docker-registry-sync #53

Closed soggiest closed 8 years ago

soggiest commented 8 years ago

-Added an optional "project" parameter that will tag/push new images into the proper namespace -Added code that will accept subrepos. Previously the code assumed images would be in / format Example: /jboss-amq-6/amq-openshift

etsauer commented 8 years ago

@soggiest can you pull in and fill out the PR template from the contribution guide? https://github.com/rhtconsulting/rhc-ose/blob/openshift-enterprise-3/CONTRIBUTING.md

soggiest commented 8 years ago

What does this PR do?

-Added an optional "project" parameter that will tag/push new images into the proper namespace -Added code that will accept subrepos. Previously the code assumed images would be in / format Example: /jboss-amq-6/amq-openshift

How should this be manually tested?

oc project sync-test
echo "jboss-amq-6/amq-openshift" > /tmp/sync-test
./docker-registry-sync --from=registry.access.redhat.com --local=<your local registry> --file=/tmp/sync-test --project=sync-test
oc get imagestreams -n sync-test

You should see output that looks similar to:

NAME            DOCKER REPO                               TAGS      UPDATED
amq-openshift   172.30.168.255:5000/sync-test/amq-openshift   latest    27 hours ago
./docker-registry-sync --from=registry.access.redhat.com --local=<your local registry> --file=/tmp/sync-test

*Verify that the new image exists in the OSE environment in the openshift project

oc get imagestreams

You should see output that looks similar to:

NAME            DOCKER REPO                               TAGS      UPDATED
amq-openshift   172.30.168.255:5000/openshift/amq-openshift   latest    27 hours ago

Is there a relevant Issue open for this?

N/A

Who would you like to review this?

/cc @esauer

etsauer commented 8 years ago

@soggiest Ah, interesting.

So this script was intended to work with a basic docker registry that was not the OpenShift registry. So I'm interested to see if the changes you've made still allow the script to work that way. I'm definitely open to having the ability to pre-load images in either an external or the openshift registry, as long as both work with this script.

Have you tested this against a standalone registry?

@oybed do you have any other thoughts on this?

soggiest commented 8 years ago

I haven't tested it yet against a stand-alone registry. I'll test that shortly.

oybed commented 8 years ago

No other thoughts. I agree that this change is a good change, and I like it! I also agree with @etsauer that it needs to continue to work for stand-alone registries as that's how it is still being used with some customers.

etsauer commented 8 years ago

@oybed @soggiest is this still a relevant PR? its been dormant for a while.