-
Notifications
You must be signed in to change notification settings - Fork 1.5k
images/installer: add image that can be used to instal UPI platforms #1456
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
images/installer: add image that can be used to instal UPI platforms #1456
Conversation
images/installer/Dockerfile.upi.ci
Outdated
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.
Shouldn't this be registry.svc.ci.openshift.org/openshift/origin-v4.0:base to match images/installer/Dockerfile.ci? Or, if that is missing important packages, can you say what they are in the commit message?
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.
testing locally using registry.svc.ci.openshift.org/openshift/origin-v4.0:base fails
Step 9/16 : RUN yum install --setopt=tsflags=nodocs -y epel-release gettext openssh-clients && yum update -y && yum install --setopt=tsflags=nodocs -y unzip gzip jq awscli util-linux && yum clean all && rm -rf /var/cache/yum/*
---> Running in ad5c4106cc0b
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
http://base-4-0.ocp.svc/rhel-fast-datapath/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: base-4-0.ocp.svc; Unknown error"
Trying other mirror.
One of the configured repositories failed (rhel-fast-datapath),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=rhel-fast-datapath ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable rhel-fast-datapath
or
subscription-manager repos --disable=rhel-fast-datapath
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=rhel-fast-datapath.skip_if_unavailable=true
failure: repodata/repomd.xml from rhel-fast-datapath: [Errno 256] No more mirrors to try.
http://base-4-0.ocp.svc/rhel-fast-datapath/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: base-4-0.ocp.svc; Unknown error"
The command '/bin/sh -c yum install --setopt=tsflags=nodocs -y epel-release gettext openssh-clients && yum update -y && yum install --setopt=tsflags=nodocs -y unzip gzip jq awscli util-linux && yum clean all && rm -rf /var/cache/yum/*' returned a non-zero code: 1"Could not resolve host: base-4-0.ocp.svc error makes me believe if the Dockerfile can only be built in CI cluster.
🤞 we'll know when we merge and try to use openshift/release#3206
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.
done 91cd579 to 512f93d
images/installer/Dockerfile.upi.ci
Outdated
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.
Hmm, would be nice if we could use the version baked into the installer somehow, although I don't know quite how that would work. This is fine until we get some ideas ;).
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.
I wouldn't bother. these are not shipped to customers. and docs where I use already points to download the latest. 3836fcb#diff-19bea2d1d6a72e1cf01e6747fa6f66b1R273
It builds an image containing binaries like jq, terraform, awscli, oc, etc. to allow bringing up UPI infrastructure. It also contains the `upi` directory that contains various terraform and cloud formation templates that are used to create infrastructure resources.
91cd579 to
512f93d
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We need both 'oc' and 'aws' for this script. The upi-installer image has a complicated history with the 'aws' command: * openshift/installer@512f93dd30 (images/installer: add image that can be used to instal UPI platforms, 2019-03-22, master and release-4.0, openshift/installer#1456) added the epel-release and awscli RPMs. * openshift/installer@c7b7863b42 (image: remove unneeded packages, 2019-08-13, master and release-4.2, openshift/installer#2206) removed the epel-release and awscli RPMs, which were no longer avialable. * openshift/installer@665ba44f45 (Add AWS CLI to UPI image, 2020-03-13, master and release-4.5, openshift/installer#3292) installed 'aws' via curl. But that means that today the bundled upi-installer has no 'aws' for 4.4 and earlier, leading to errors like [1]: Gathering console logs for i-04151362d551668fe /bin/bash: line 39: aws: command not found error: failed to execute wrapped command: exit status 1 2020/06/18 23:52:50 Container test in pod e2e-aws-gather-aws-console failed, exit code 1, reason Error on 4.2. With this commit I reference the 4.5 image [2,3], because that has the commands I need, and we don't need anything that's particularly senstive to the command versions. [1]: https://deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gcs/origin-ci-test/pr-logs/pull/openshift_cluster-version-operator/382/pull-ci-openshift-cluster-version-operator-release-4.2-e2e-aws/1273733457419177984 [2]: https://github.com/openshift/ci-tools/blob/97d72735a969f11b210806970d523f1b63297905/pkg/webreg/webreg.go#L933-L946 [3]: https://github.com/openshift/ci-tools/blob/97d72735a969f11b210806970d523f1b63297905/pkg/webreg/webreg.go#L1267-L1279
It builds an image containing binaries like jq, terraform, awscli, oc, etc. to allow bringing up UPI infrastructure.
It also contains the
upidirectory that contains various terraform and cloud formation templates that are used to create infrastructure resources./cc @wking