Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Mar 16, 2019

We need to support the ability to download clients (oc) from the cluster when an install is successful. With this commit, I'm adding a new Deployment for serving the binary from the cli image referenced
from the release image. That way, the provided oc is the appropriate version for the current cluster version. I've set replicas to two to support continued availability during rolling updates.

The Python here-document approach is based on openshift/ci-operator@95a41a39 (openshift/ci-operator#35). The script creates a scratch directory to serve from, and populates it with the oc binary (via a symlink). It also creates zip and tar versions, so users can do things like:

$ wget https://downloads-openshift-console.apps.wking.devcluster.openshift.com/amd64/linux/oc.zip
$ unzip oc.zip

instead of:

$ wget https://downloads-openshift-console.apps.wking.devcluster.openshift.com/amd64/linux/oc
$ chmod +x oc

if they prefer. We don't have to clean up the scratch directory in the script, because it will be reaped as part of container cleanup.

Moving forward, we'll want to replace the cli image with a cli-downloads image or similar that includes builds for other platforms and architectures, but I'm punting on that for now.

We need to support the ability to download clients (oc) from the
cluster when an install is successful.  With this commit, I'm adding a
new Deployment for serving the binary from the cli image referenced
from the release image.  That way, the provided oc is the appropriate
version for the current cluster version.  I've set 'replicas' to two
to support continued availability during rolling updates.

The Python here-document approach is based on
openshift/ci-operator@95a41a39 (Use a multithreaded python server to
serve RPMs, 2018-06-25, openshift/ci-operator#35).  The script creates
a scratch directory to serve from, and populates it with the oc binary
(via a symlink).  It also creates zip and tar versions, so users can
do things like:

  $ wget https://downloads-openshift-console.apps.wking.devcluster.openshift.com/amd64/linux/oc.zip
  $ unzip oc.zip

instead of:

  $ wget https://downloads-openshift-console.apps.wking.devcluster.openshift.com/amd64/linux/oc
  $ chmod +x oc

if they prefer.  We don't have to clean up the scratch directory in
the script, because it will be reaped as part of container cleanup.

Moving forward, we'll want to replace the cli image with a
cli-downloads image that includes builds for other platforms and
architectures, but I'm punting on that for now.

[1]: openshift/ci-operator@95a41a3
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 16, 2019
@benjaminapetersen
Copy link
Contributor

@spadgett fyi

@benjaminapetersen
Copy link
Contributor

/lgtm

heredoc will always bother me but I can trust its the right call. 😄

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 18, 2019
@benjaminapetersen
Copy link
Contributor

Contemplating if I should follow and split /manifests into 2 subdirs (I don't know if there will ever be a case for additional items in the future.)

@wking
Copy link
Member Author

wking commented Mar 18, 2019

Contemplating if I should follow and split /manifests into 2 subdirs...

Does the CVO walk subdirs?

I don't know if there will ever be a case for additional items in the future.

Maybe if we can't find a way to serve all downloads from a single container?

@benjaminapetersen
Copy link
Contributor

@wking I'm looking for info about subdirs now. I see at least one operator with subdirs, but I dont know if CVO manages it. If not, perhaps I'll do a prefix-.

I'm guessing we may also get extensions in the future.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benjaminapetersen, 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:

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

@wking
Copy link
Member Author

wking commented Mar 18, 2019

e2e-aws:

level=error msg="\t* aws_vpc.new_vpc: Error creating VPC: VpcLimitExceeded: The maximum number of VPCs has been reached."

I'll run my reapers.

@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 ffb123d into openshift:master Mar 18, 2019
@benjaminapetersen
Copy link
Contributor

🎉

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants