Skip to content

Conversation

@honza
Copy link
Member

@honza honza commented Nov 18, 2019

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.

@stbenjam stbenjam added the CI check this PR with CI label Nov 18, 2019
@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1308/

@honza
Copy link
Member Author

honza commented Nov 19, 2019

I just had a successful deployment using the latest version of this patch.

@metal3ci
Copy link

Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1313/

@hardys
Copy link

hardys commented Nov 20, 2019

This isn't working for me:

level=fatal msg="failed to fetch Master Machines: failed to load asset \"Install Config\": invalid \"install-config.yaml\" file: imageContentSources[0].source: Invalid value: \"registry.svc.ci.openshift.org/ocp/release:4.3.0-0.ci-2019-11-20-103944\": must be repository--not reference"
make: *** [Makefile:21: ocp_run] Error 1

real	6m54.557s
user	2m14.596s
sys	0m43.079s
provisioning-host> tail ocp/install-config.yaml
- mirrors:
    - 192.168.111.1:5000/localimages/local-release-image
  source: registry.svc.ci.openshift.org/ocp/release:4.3.0-0.ci-2019-11-20-103944
- mirrors:
    - 192.168.111.1:5000/localimages/local-release-image
  source: registry.svc.ci.openshift.org/ocp/4.3.0-0.ci-2019-11-20-103944

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?

@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1319/

@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1320/

@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1321/

@honza
Copy link
Member Author

honza commented Nov 20, 2019

Temporarily rebasing on top of #854 because the installer patch doesn't seem to apply correctly in CI

@metal3ci
Copy link

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.
@metal3ci
Copy link

Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1324/

@honza
Copy link
Member Author

honza commented Nov 21, 2019

WIP commit removed, ready to merge

@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1326/

@metal3ci
Copy link

Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1330/

@hardys
Copy link

hardys commented Nov 25, 2019

CI passed but I'm not getting a working deploy with export MIRROR_IMAGES=true - looking into why, could be specific to my environment I guess @yprokule is this latest revision working for you with mirroring enabled?

@hardys
Copy link

hardys commented Nov 25, 2019

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?

@yprokule
Copy link
Contributor

CI passed but I'm not getting a working deploy with export MIRROR_IMAGES=true - looking into why, could be specific to my environment I guess @yprokule is this latest revision working for you with mirroring enabled?

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"
            }
        ],

Comment on lines +191 to +192
TAGGED=$(echo $OPENSHIFT_RELEASE_IMAGE | sed -e 's/release://')
RELEASE=$(echo $OPENSHIFT_RELEASE_IMAGE | grep -o 'registry.svc.ci.openshift.org[^":]\+')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/release

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe if the user wants to mirror images, we should ask them for the exact sources? What do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that was the behavior I got as well using 4.3 nightly's on an environment where I was doing disconnected.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an API defined by OpenShift, it's not something we can revisit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mazzystr I'm not sure what you mean. We're simply using openshift-installer-provided values. We don't define any data structures.

@stbenjam
Copy link
Member

stbenjam commented Dec 9, 2019

The work on this has moved to #856

@stbenjam stbenjam closed this Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI check this PR with CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants