Add option to mirror openshift images#850
Add option to mirror openshift images#850honza wants to merge 1 commit intoopenshift-metal3:masterfrom
Conversation
1111a03 to
704039e
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1308/ |
704039e to
868e1d9
Compare
|
I just had a successful deployment using the latest version of this patch. |
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1313/ |
868e1d9 to
feef57b
Compare
feef57b to
6a1cd06
Compare
6a1cd06 to
ba7de32
Compare
|
This isn't working for me: Maybe push a WIP commit that flips the default to true for MIRROR_IMAGES to true so we can see this work in CI when that's fixed? |
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1319/ |
c2ac194 to
6b9e61f
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1320/ |
6b9e61f to
06e08eb
Compare
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1321/ |
|
Temporarily rebasing on top of #854 because the installer patch doesn't seem to apply correctly in CI |
06e08eb to
af29404
Compare
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1322/ |
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.
af29404 to
34d0710
Compare
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1324/ |
34d0710 to
aa6e914
Compare
|
WIP commit removed, ready to merge |
|
Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1326/ |
|
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1330/ |
|
CI passed but I'm not getting a working deploy with |
|
Ok I now get a working deployment but AFAICS the images used aren't from the mirror - do we need #856 to make this work? |
Deployment passed but cvo doesn't report mirrored image being used "desired": {
"force": false,
"image": "registry.svc.ci.openshift.org/ocp/release@sha256:b1d66f12a1496be5e591674594c96985b516bdc01d697e557dc2ab2a5e3b0216",
"version": "4.3.0-0.nightly-2019-11-25-022933"
},
"history": [
{
"completionTime": "2019-11-25T13:52:28Z",
"image": "registry.svc.ci.openshift.org/ocp/release@sha256:b1d66f12a1496be5e591674594c96985b516bdc01d697e557dc2ab2a5e3b0216",
"startedTime": "2019-11-25T13:31:54Z",
"state": "Completed",
"verified": false,
"version": "4.3.0-0.nightly-2019-11-25-022933"
}
], |
| TAGGED=$(echo $OPENSHIFT_RELEASE_IMAGE | sed -e 's/release://') | ||
| RELEASE=$(echo $OPENSHIFT_RELEASE_IMAGE | grep -o 'registry.svc.ci.openshift.org[^":]\+') |
There was a problem hiding this comment.
This doesn't always work, that's what I got while using nightly
Success
Update image: 192.168.123.141:5000/localimages/local-release-image:4.3.0-0.nightly-2019-11-25-022933
Mirror prefix: 192.168.123.141:5000/localimages/local-release-image
To use the new mirrored repository to install, add the following section to the install-config.yaml:
imageContentSources:
- mirrors:
- 192.168.123.141:5000/localimages/local-release-image
source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
- mirrors:
- 192.168.123.141:5000/localimages/local-release-image
source: registry.svc.ci.openshift.org/ocp/releaseThere was a problem hiding this comment.
Maybe if the user wants to mirror images, we should ask them for the exact sources? What do you think?
There was a problem hiding this comment.
I can confirm that was the behavior I got as well using 4.3 nightly's on an environment where I was doing disconnected.
There was a problem hiding this comment.
I don't like how the data structure is laid out at all... What we have here is a hodge podge of array and string objects. It will be mind bending to code against this.
How about ...
imageContentSources:
-
target: <url>:<port>
user: <user ie. openshift-release-dev or localimages>
release: <release ie. ocp-v4.0-art-dev or release>
-
target: <url>:<port>
user: <user ie. openshift-release-dev or localimages>
release: <release ie. ocp-v4.0-art-dev or release>
-
target: <url>:<port>
user: <user ie. openshift-release-dev or localimages>
release: <release ie. ocp-v4.0-art-dev or release>
There was a problem hiding this comment.
This is an API defined by OpenShift, it's not something we can revisit.
There was a problem hiding this comment.
@mazzystr I'm not sure what you mean. We're simply using openshift-installer-provided values. We don't define any data structures.
|
The work on this has moved to #856 |
We add a new
MIRROR_IMAGESoption. When non-empty, it will useoc admto mirror openshift images to our local registry. It will alsomodify
install-config.yamlto add the new mirror.