Skip to content
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

Allow use of locally built images for CI/testing #759

Merged

Conversation

derekhiggins
Copy link
Collaborator

Add the ability for the bootstrap node to pull localy
built images for development and ci jobs.

@derekhiggins derekhiggins added the CI check this PR with CI label Aug 21, 2019
04_setup_ironic.sh Outdated Show resolved Hide resolved
common.sh Outdated Show resolved Hide resolved
@derekhiggins derekhiggins force-pushed the local-bootstrap-images branch 2 times, most recently from 3594ee7 to cb76de9 Compare August 21, 2019 16:58
@metal3ci
Copy link

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

@metal3ci
Copy link

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

@derekhiggins derekhiggins force-pushed the local-bootstrap-images branch from cb76de9 to 06c332d Compare August 30, 2019 14:29
@metal3ci
Copy link

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

@metal3ci
Copy link

metal3ci commented Sep 3, 2019

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

04_setup_ironic.sh Outdated Show resolved Hide resolved
export $IMAGE_VAR=192.168.111.1:5000/localimages/${!IMAGE_VAR}

clone_installer
cd /home/notstack/go/src/github.com/openshift/installer
Copy link

Choose a reason for hiding this comment

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

This should use $OPENSHIFT_INSTALL_PATH

04_setup_ironic.sh Outdated Show resolved Hide resolved
@hardys
Copy link

hardys commented Sep 5, 2019

I think this needs an update since #778 landed, perhaps we can move the image build into the 03 script and rename it?

Also it'd be nice if we could figure out some way to not hijack git tracked files in-place, don't have a good suggestion of how we do that yet though.

@russellb
Copy link
Member

russellb commented Sep 5, 2019

This could be dropped in favor of looking ahead to OpenShift CI, where it would be building custom ironic images if necessary and including them in the release image for that CI job. Now that openshift/installer#2234 has landed, we really shouldn't be using metal3-io ironic images anywhere in OpenShift.

@derekhiggins
Copy link
Collaborator Author

This could be dropped in favor of looking ahead to OpenShift CI, where it would be building custom ironic images if necessary and including them in the release image for that CI job. Now that openshift/installer#2234 has landed, we really shouldn't be using metal3-io ironic images anywhere in OpenShift.

I've been wondering about this recently, should we just drop the metal3 ironic images and work directly on the openshift ones?

@metal3ci
Copy link

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

@metal3ci
Copy link

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

@juliakreger
Copy link

@russellb So it seems we're blocked on making changes to metal3-io repos without something like this, and we're blocked on output images from openshift on code data, so it seems if we don't have a happy place to even test changes :\ I feel like Derek is raising a good point, seems like we at least need to drop something somewhere to unblock things.

@russellb
Copy link
Member

The metal3-io images are not used anywhere in OpenShift directly. They are used directly by metal3-dev-env, though. We still need them for the usage of metal3-io outside of OpenShift.

@derekhiggins
Copy link
Collaborator Author

The metal3-io images are not used anywhere in OpenShift directly. They are used directly by metal3-dev-env, though. We still need them for the usage of metal3-io outside of OpenShift.

ok, so I guess the answer is the I/we need to switch to using metal3-dev-env when doing development on the ironic-images

@derekhiggins
Copy link
Collaborator Author

Now uses a local release image, and should make it possible to use custom versions of any of the images mentioned in the release image (not just the ironic images)

@metal3ci
Copy link

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

@metal3ci
Copy link

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

@derekhiggins derekhiggins force-pushed the local-bootstrap-images branch from 1814b8f to fde5aed Compare October 1, 2019 08:38
@metal3ci
Copy link

metal3ci commented Oct 1, 2019

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

@hardys
Copy link

hardys commented Oct 1, 2019

This is working great for me, the only thing missing I think is to open tcp/5000 in the firewall as I had to do that manually.

0325b5394bcb0       192.168.111.1:5000/localimages/machine-config-operator@sha256:bfe713e2dd66c3e7803f1aee82cbadec3d303d2a75a968efdcb913fc37b883e2   4 minutes ago       Running             machine-config-server       0                   9294cfa7ce668
9c72ef5510021       192.168.111.1:5000/localimages/machine-config-operator@sha256:bfe713e2dd66c3e7803f1aee82cbadec3d303d2a75a968efdcb913fc37b883e2   4 minutes ago       Exited              machine-config-controller   0                   9294cfa7ce668

That was with export MACHINE_CONFIG_OPERATOR_LOCAL_IMAGE=https://github.com/openshift/machine-config-operator

@derekhiggins derekhiggins force-pushed the local-bootstrap-images branch 2 times, most recently from 09a75b4 to bf5f6be Compare October 2, 2019 09:24
@metal3ci
Copy link

metal3ci commented Oct 2, 2019

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

@metal3ci
Copy link

metal3ci commented Oct 2, 2019

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

@@ -39,6 +39,11 @@ source $CONFIG
export OPENSHIFT_RELEASE_IMAGE="${OPENSHIFT_RELEASE_IMAGE:-registry.svc.ci.openshift.org/ocp/release:4.2}"
export OPENSHIFT_INSTALL_PATH="$GOPATH/src/github.com/openshift/installer"

if env | grep -q "_LOCAL_IMAGE=" ; then
# We need a custome installer (allows http image pulls for local images)
Copy link

Choose a reason for hiding this comment

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

Any more info on this - is it a configuration that's turned off in the release-payload installer build?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its needed because in 04_setup_ironic.sh we are adding a file into the filesystem

echo -e "[registries.insecure]\nregistries = ['192.168.111.1:5000']" > $OPENSHIFT_INSTALL_PATH/data/data/bootstrap/baremetal/files/etc/containers/registries.conf

we need to build a custom installer including this file

Copy link

Choose a reason for hiding this comment

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

Ah I see, thanks - I saw the 99_local-registry.yaml.optional and assumed we could do all the local-registry config via an asset, but I guess we need registries.conf before the MCO runs.

Modifying the installer checkout seems fine, but one alternative would be to generate the ignition-configs via the installer, then inject the registries.conf via ignition - we did that early in dev-scripts IIRC for some other things.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Modifying the installer checkout seems fine, but one alternative would be to generate the ignition-configs via the installer, then inject the registries.conf via ignition - we did that early in dev-scripts IIRC for some other things.

I'll look into doing this as an alternative

Copy link

Choose a reason for hiding this comment

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

I'll look into doing this as an alternative

Not necessarily saying that we should, just wanted to mention it as a possible alternative 👍

Copy link

@hardys hardys left a comment

Choose a reason for hiding this comment

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

This is working well for me, I think it's ready to merge if you're happy @derekhiggins ?

@hardys
Copy link

hardys commented Oct 2, 2019

I guess some update to the README would be nice, to document the new/easier test workflow?

@derekhiggins
Copy link
Collaborator Author

This is working well for me, I think it's ready to merge if you're happy @derekhiggins ?

I'll update the README then I'm happy to merge if you are

@derekhiggins derekhiggins force-pushed the local-bootstrap-images branch from bf5f6be to 22f8200 Compare October 2, 2019 16:20
Add the ability to use a local release image
containing entries referencing custom container
images. The local references can be container
images or git repositories which will be built
to container images.
@derekhiggins derekhiggins force-pushed the local-bootstrap-images branch from 22f8200 to cda0d11 Compare October 2, 2019 16:21
@metal3ci
Copy link

metal3ci commented Oct 2, 2019

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

@hardys hardys merged commit 14bef02 into openshift-metal3:master Oct 3, 2019
@hardys hardys changed the title Pull locally built ironic images for use on bootstrap node Allow use of locally built images for CI/testing Oct 3, 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.

6 participants