rhtconsulting / rhc-ose

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

Expose registry #222

Closed JayKayy closed 8 years ago

JayKayy commented 8 years ago

What does this PR do?

This PR adds the ansible role to expose an already secured Openshift Docker Registry service.

How should this be manually tested?

masters

[OSE:vars]
deployment_type=openshift-enterprise
openshift_deployment_type=openshift-enterprise
registry_hostname=<desired hostname to reach exposed registry> 

[masters]
master1.example.com

then run the playbook: ansible-playbook -i <inventory> expose-registry.yaml

Is there a relevant Issue open for this?

N/A

Who would you like to review this?

/cc @etsauer @sabre1041 @oybed

oybed commented 8 years ago

@JayKayy overall this looks good. However, there's one piece missing to make this complete. Basically, the registry_hostname needs to be added to the certificate that's generated in the secure_registry role - i.e.: the following line needs to be updated to include the registry_hostname FQDN:https://github.com/rhtconsulting/rhc-ose/blob/openshift-enterprise-3/rhc-ose-ansible/roles/secure-registry/tasks/main.yaml#L63

You can also look at the "old" bash tools to see how it was done there - i.e.: the registry.${OPENSHIFT_CLOUDAPPS_SUBDOMAIN}.${OPENSHIFT_BASE_DOMAIN} portion of this line: https://github.com/rhtconsulting/rhc-ose/blob/openshift-enterprise-3/provisioning/osc-install#L316

oybed commented 8 years ago

BTW: I found this to have the same problem as @etsauer 's post-install PR. https://github.com/rhtconsulting/rhc-ose/pull/221#issuecomment-240905749 I suspect that it may be due to some changes in openshift-ansible that we now need to compensate for - let's discuss to find the appropriate solution.

oybed commented 8 years ago

Merging - will submit follow-up PR to correct the registry_hostname