-
Notifications
You must be signed in to change notification settings - Fork 202
Add SSL support to local mirrored registry #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SSL support to local mirrored registry #856
Conversation
0b43543 to
cdbdac4
Compare
|
Looks good, but can we avoid running two registry containers, seems like just one should be enough for both |
20f1355 to
6a45fa6
Compare
7f12c7f to
ba56210
Compare
01_install_requirements.sh
Outdated
| -key ${REGISTRY_DIR}/certs/registry.key \ | ||
| -out ${REGISTRY_DIR}/certs/registry.crt \ | ||
| -days 365 \ | ||
| -addext "$SSL_EXT" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -addext flag isn't supported by the version of openssl that is installed via dev-scripts. It was introduced in 1.1.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@honza which one do U have? I'm trying on RHEL-8 which has openssl-1.1.1-8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenSSL 1.0.2k-fips on centos 7.7.1908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and for me on RHEL 8.1...
# rpm -q openssl
openssl-1.1.1c-2.el8.x86_64
# openssl version
OpenSSL 1.1.1c FIPS 28 May 2019
If dev-scripts is shipping openssl then that needs to stop. Dev-scripts should necessary args nothing more.
ba56210 to
9a27415
Compare
d72e902 to
cb49716
Compare
|
Should we run this through CI at this point? |
|
The image content sources are still a bit off. This is the imageContentSources:
- mirrors:
- 192.168.111.1:5000/localimages/local-release-image
source: registry.svc.ci.openshift.org/ocp/4.4-2019-11-28-120853
- mirrors:
- 192.168.111.1:5000/localimages/local-release-image
source: registry.svc.ci.openshift.org/ocp/releaseBut this is what gets added to imageContentSources:
- mirrors:
- 192.168.111.15000/localimages/local-release-image
source: registry.svc.ci.openshift.org/ocp/release
- mirrors:
- 192.168.111.1:5000/localimages/local-release-image
source: registry.svc.ci.openshift.org/ocp/4.4.0-0.ci-2019-11-28-120853 |
f298163 to
05c9e29
Compare
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1348/ |
Now ssl key and cert are generated if they don't exist. If they do get md5 hash of cert and compare it with cert's hash used by registry container. If they mismatch (or cert isn't used) or container is not running - new registry is started |
2307729 to
5f6810b
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1373/ |
5f6810b to
90a73d3
Compare
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1374/ |
90a73d3 to
1983c1f
Compare
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1376/ |
1983c1f to
65d5825
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1382/ |
65d5825 to
ae47b0e
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1385/ |
ae47b0e to
5e046a2
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1387/ |
We add a new `MIRROR_IMAGES` option. When non-empty, it will use `oc adm` to mirror openshift images to our local registry. It will also modify `install-config.yaml` to add the new mirror.
5e046a2 to
a97f4b1
Compare
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1389/ |
There are issues while using local mirror that doesn't support SSL. Current change addresses this limitation. - [x] create self-signed ssl cert for local mirror - [x] create pull-secret for local mirror - [x] combine locall pull secret with global - [x] add custom ssl-cert to install-config.yml - [x] extract the installation program from the mirrored content - [x] use local pull secret for deployment
a97f4b1 to
842b8d5
Compare
|
Ok this works well for me locally, and it passed CI - @derekhiggins had some comments about removing some things related to the local image registry which I don't think are yet fully resolved but perhaps we should take care of those via a follow-up? |
|
Spoke with @derekhiggins and he agreed to push a PR removing the old path as a follow-up, so I'll go ahead and merge this |
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1394/ |
Add SSL support for local mirror.
There are issues while using local mirror that doesn't support SSL.
Current change addresses this limitation.