Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Sep 26, 2018

The golang-1.10 image has everything we need to build now. I run the build in a golang-1.10 container using FROM ... AS ... like we used to. But now I no longer install packages with yum. And I use a recursive COPY to bring the built/fetched binaries over into the output container, which is based on scratch.

/assign @abhinavdahiya

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2018
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 26, 2018
@wking wking force-pushed the next-gen-dockerfile branch from c7ea759 to 7404847 Compare September 26, 2018 23:28
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 26, 2018
The golang-1.10 image has everything we need to build now.  I run the
build in a golang-1.10 container using 'FROM ... AS ...' [1] like we
used to.  But now I no longer install packages with yum.  And I use a
recursive COPY [2] to bring the built/fetched binaries over into the
output container, which is based on scratch.

Once we switch openshift/release over to this Dockerfile, we can drop
images/tectonic-installer.

[1]: https://docs.docker.com/engine/reference/builder/#from
[2]: https://docs.docker.com/engine/reference/builder/#copy
@wking wking force-pushed the next-gen-dockerfile branch from 7404847 to 29e4d10 Compare September 26, 2018 23:31
@wking
Copy link
Member Author

wking commented Sep 26, 2018

Dropped the docker.io prefix I'd been using for testing with 7404847 -> 29e4d10.

@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2018
@openshift-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@crawford
Copy link
Contributor

/test images

@wking
Copy link
Member Author

wking commented Sep 26, 2018

The images failure was:

Loading manifests from service-serving-cert-signer: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:e455472342e6554067046dbe6cd277f5fd0587cfaf56d21eaa54439b770439a5 ...
I0926 23:45:07.700595      22 logs.go:49] Unsolicited response received on idle HTTP channel starting with "HTTP/1.0 408 Request Time-out\r\nCache-Control: no-cache\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n"; err=<nil>
error: unable to upload new layer (0): Patch https://registry.svc.ci.openshift.org/v2/ci-op-43zwvfh8/release/blobs/uploads/e26e5cfa-abc3-412a-8a3b-62d6484ce521?_state=EEFIl8MfVO7ZXUa97iSt1jwUd2cB7XZKYf9mJ3GASxx7Ik5hbWUiOiJjaS1vcC00M3p3dmZoOC9yZWxlYXNlIiwiVVVJRCI6ImUyNmU1Y2ZhLWFiYzMtNDEyYS04YTNiLTYyZDY0ODRjZTUyMSIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxOC0wOS0yNlQyMzo0NTowOS4yMDA3Njk4NjZaIn0%3D: operator "catalog" failed to map images: yaml: line 16: mapping values are not allowed in this context
Uploading ... 2018/09/26 23:45:10 Container release in pod release-latest failed, exit code 1, reason Error

@wking
Copy link
Member Author

wking commented Sep 27, 2018

/retest

@abhinavdahiya
Copy link
Contributor

These seem like errors from release-image generation

2018/09/27 00:01:48 Executing release release-latest
2018/09/27 00:02:03 Copying artifacts from release-latest into /logs/artifacts/release-latest
info: Using registry public hostname registry.svc.ci.openshift.org
info: Found 73 images in image stream
info: Manifests will be extracted to /tmp/release-image-2018-09-27T000152Z087116184
warning: Could not load current user information: user: unknown userid 1137240000
Loading manifests from cluster-openshift-apiserver-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:770c03f88d9a947c9a1d3f29c5a0e313031dde86052fc5a151a99314e9d4fe6e ...
Loading manifests from cluster-kube-apiserver-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:12ba06fada065a12f8d2c3be27dcfa6577cb0a911886a5958a373f9e5d97b26f ...
Loading manifests from cluster-samples-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:bd3b11dacb5c4524dcd1e5c2814681174227d1b3e015aee99183e8fcd9d77fcc ...
Loading manifests from cluster-dns-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:4804588004bff91f5fa06bd515d72e746fc3bcd163eb0d2e0625e60c10514356 ...
Loading manifests from cluster-openshift-controller-manager-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:e34d27854162ac61e4a484c517651f5bd626c21d2dad126f91fe4ecd901f4529 ...
Loading manifests from catalog: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:bf9e1b9e0acbb056484a51fefe9dffb23bb7184e214cb48c344924fbe7f90091 ...
Loading manifests from cluster-image-registry-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:df10457dcee04dbea079253a67d97c233ef621ef0dd939c8a9bca03e849de846 ...
Loading manifests from cluster-version-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:6ed371948bfaf746dcb0263176687a625b1ef581447527cbb840b69c4aa7fa29 ...
Loading manifests from cluster-kube-controller-manager-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:0ce689191e2337e62f460a328f1aaf7d1ac12a80760793f73f96be7f7e5932b1 ...
Loading manifests from machine-config-operator: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:d2c602936193f81a808d477b065c01dab18d15914b2ec71c380f310d4a44b441 ...
Loading manifests from olm: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:43d39c9645cf54594f06fccd36a2ee294a9e6f7b4e09956f50fa1410a868e11e ...
Loading manifests from service-serving-cert-signer: registry.svc.ci.openshift.org/ci-op-43zwvfh8/stable@sha256:e455472342e6554067046dbe6cd277f5fd0587cfaf56d21eaa54439b770439a5 ...
error: unable to upload new layer (0): Patch https://registry.svc.ci.openshift.org/v2/ci-op-43zwvfh8/release/blobs/uploads/dcf4557c-9a87-4aa4-9d77-e3acdd113040?_state=gJbjHXXdyNlVUJgCRicnvCShiBRmwSEuX5WyHCwyJgt7Ik5hbWUiOiJjaS1vcC00M3p3dmZoOC9yZWxlYXNlIiwiVVVJRCI6ImRjZjQ1NTdjLTlhODctNGFhNC05ZDc3LWUzYWNkZDExMzA0MCIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAxOC0wOS0yN1QwMDowMjowMS45ODg1MTQ2OTFaIn0%3D: operator "catalog" failed to map images: yaml: line 16: mapping values are not allowed in this context
Uploading ... 2018/09/27 00:02:03 Container release in pod release-latest failed, exit code 1, reason Error
2018/09/27 00:02:09 Ran for 23s
error: could not run steps: failed to wait for release pod to complete: could not wait for pod completion: the pod ci-op-43zwvfh8/release-latest failed after 14s (failed containers: release):  unknown

cc @smarterclayton

@wking
Copy link
Member Author

wking commented Sep 27, 2018

For a similar error earlier, @smarterclayton pointed at this indent issue. Looks like that's currently still in master, but it could also be another busted JSON/YAML file causing the "operator "catalog" failed to map images: yaml: line 16: mapping values are not allowed in this context".

@wking
Copy link
Member Author

wking commented Sep 27, 2018

More work on that indent issue ongoing in operator-framework/operator-lifecycle-manager#486.

@smarterclayton
Copy link
Contributor

Goal is to have more gating in place in the next few days to mitigate the impact here - everything landing at once etc

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@wking
Copy link
Member Author

wking commented Sep 27, 2018

@wking
Copy link
Member Author

wking commented Sep 27, 2018

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@wking
Copy link
Member Author

wking commented Sep 27, 2018

The images presubmit is new today with openshift/release#1704. Maybe we shoulfd roll it back temporarily?

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 77b366a into openshift:master Sep 27, 2018
wking added a commit to wking/openshift-release that referenced this pull request Sep 27, 2018
openshift-install is he next-gen installer.  With the new installer,
we only need the installer binary and terraform to launch and destroy
clusters.  I've removed the smoke tests for now, because I haven't
looked into building them without Bazel.  Hopefully we'll get expanded
e2e testing *and* other OpenShift projects using our installer soon to
keep us honest.

Also missing from the new installer is a way to set expirationDate.
But we'll just not leak until we regain the ability to set that,
right? ;)

The new installer dumps less cruft into the output directory (most of
the generated output goes into a temporary directory), so I've
adjusted the openshift-install calls to just use an artifacts subdir
for their state storage.  A bonus of this approach is that if the
installer hangs up, we'll capture anything it wrote to disk without
needing an explicit cp call.  A drawback is that we'll leak any
secrets that get put into the kubeconfig, so don't put anything in
there that needs to stay private after the cluster is reaped.

Using the base image for the installer's 'from' is quite a bit
different from openshift/installer@29e4d10e (origin/pr/343)
images/installer: Rewrite tectonic-installer for openshift-install,
2018-09-26, openshift/installer#343), where the Dockerfile is 'FROM
scratch'.  Including the OpenShift base currently adds ~230 MB to the
installer layer's 110 MB for the two binaries, although both of those
are uncompressed sizes.  Gzipping layers reduces the sizes to around
84 MB and 26 MB respectively.  So the added base cruft is not huge,
but it's still hefty.

The upside of using the base image is that we have a standard
POSIX-ish system for executing the cleanup script.  To demonstrate the
'FROM scratch' approach, I've adjusted the setup container to call the
installer directly (with no wrapping shell script).  And to support
that, I've shifted some waiting code over into the test container
(which also saves us from having to copy 'oc' around).

I've also dropped the 3.11 config, since the installer is 4.0-only.
FROM openshift/origin-release:golang-1.10 AS build
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN hack/build.sh && hack/get-terraform.sh
Copy link
Member Author

Choose a reason for hiding this comment

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

We'll have to replace the curl-based get-terraform.sh here with a yum call or some such to comply with Red Hat's OCP Automated Release Policies. But that's probably not too much of a rush. I think get-terraform.sh should stay curl-based to be package-manager agnostic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Vendoring a copy of terraform into a repo is probably the best option if you need a specific tagged commit. If you have to change X at a high rate, the pain you'll feel from RPM iteration will outweigh any ugliness of vendoring.

wking added a commit to wking/origin that referenced this pull request Apr 13, 2019
The installer Dockerfile has put the binary in /bin since
openshift/install@29e4d10eb7 (images/installer: Rewrite
tectonic-installer for openshift-install, 2018-09-26,
openshift/installer#343).  Fixes:

  $ oc adm release extract --command=openshift-install registry.svc.ci.openshift.org/openshift/origin-release:v4.0
  error: image did not contain usr/bin/openshift-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants