Skip to content

Commit

Permalink
ci-operator/config/openshift/installer/master: Move to openshift-install
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wking committed Sep 27, 2018
1 parent 592a572 commit 3f2f01c
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 885 deletions.
37 changes: 2 additions & 35 deletions ci-operator/config/openshift/installer/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,15 @@ base_images:
name: origin-v4.0
namespace: openshift
tag: base
base-smoke:
cluster: https://api.ci.openshift.org
namespace: openshift
name: release
tag: bazel
binary_build_commands: go build ./installer/cmd/tectonic
canonical_go_repository: github.com/openshift/installer
images:
- dockerfile_path: images/tectonic-installer/Dockerfile.ci
- dockerfile_path: images/installer/Dockerfile.ci
from: base
inputs:
bin:
paths:
- destination_dir: .
source_path: /go/src/github.com/openshift/installer/tectonic
root:
as:
- build
to: installer
- dockerfile_path: images/tectonic-installer/Dockerfile.ci
optional: true
from: base-smoke
inputs:
bin:
paths:
- destination_dir: .
source_path: /go/src/github.com/openshift/installer/tectonic
root:
as:
- build
to: installer-bazel
- dockerfile_path: images/installer-origin-release/Dockerfile.ci
optional: true
from: installer-bazel
to: installer-smoke
resources:
'*':
limits:
Expand All @@ -47,13 +21,6 @@ resources:
requests:
cpu: 100m
memory: 200Mi
bin:
limits:
cpu: '7'
memory: 9Gi
requests:
cpu: '3'
memory: 7Gi
unit:
limits:
cpu: '7'
Expand All @@ -75,7 +42,7 @@ build_root:
tag: golang-1.10
tests:
- as: unit
commands: go test ./pkg/... ./installer/pkg/...
commands: go test ./pkg/...
from: src
- as: gofmt
commands: IS_CONTAINER=TRUE ./hack/go-fmt.sh .
Expand Down
58 changes: 0 additions & 58 deletions ci-operator/config/openshift/installer/release-3.11.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
presubmits:
openshift/installer:
- agent: kubernetes
always_run: true
context: ci/prow/build-tarball
decorate: true
name: pull-ci-openshift-installer-bazel-build-tarball
rerun_command: /test build-tarball
spec:
containers:
- args:
- ./hack/test-bazel-build-tarball.sh
- --action_env=HOME=/tmp
command:
- sh
env:
- name: HOME
value: /tmp
- name: IS_CONTAINER
value: "TRUE"
- name: USER
value: bazel
image: quay.io/coreos/tectonic-builder:bazel-v0.3
imagePullPolicy: Always
name: ""
resources: {}
trigger: (?m)^/test build-tarball
- agent: kubernetes
always_run: false
branches:
Expand Down Expand Up @@ -145,63 +120,6 @@ presubmits:
- configMap:
name: cluster-profile-aws
trigger: ((?m)^/test( e2e-aws-all),?(\s+|$))
- agent: kubernetes
always_run: false
branches:
- master
context: ci/prow/e2e-aws-smoke
decorate: true
name: pull-ci-openshift-installer-master-e2e-aws-smoke
rerun_command: /test e2e-aws-smoke
run_if_changed: ^([^D]|D(D|oD|ocD|ocuD|ocum(D|e(D|n(D|t(D|aD|atD|atiD|atioD)))))*([^Do]|o[^Dc]|oc[^Du]|ocu[^Dm]|ocum([^De]|e([^Dn]|n([^Dt]|t([^Da]|a[^Dt]|at[^Di]|ati[^Do]|atio[^Dn]))))))*(D(D|oD|ocD|ocuD|ocum(D|e(D|n(D|t(D|aD|atD|atiD|atioD)))))*(o|oc|ocu|ocum(e(n(t(a|at|ati|atio)?)?)?)?)?)?$
skip_cloning: true
spec:
containers:
- command:
- ci-operator
- --give-pr-author-access-to-namespace=true
- --artifact-dir=$(ARTIFACTS)
- --secret-dir=/usr/local/e2e-aws-smoke-cluster-profile
- --template=/usr/local/e2e-aws-smoke
- --target=e2e-aws-smoke
- --give-pr-author-access-to-namespace
env:
- name: JOB_NAME_SAFE
value: e2e-aws-smoke
- name: CLUSTER_TYPE
value: aws
- name: CONFIG_SPEC
valueFrom:
configMapKeyRef:
key: master.yaml
name: ci-operator-openshift-installer
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
limits:
cpu: 500m
requests:
cpu: 10m
volumeMounts:
- mountPath: /usr/local/e2e-aws-smoke
name: job-definition
subPath: cluster-launch-installer-e2e-smoke.yaml
- mountPath: /usr/local/e2e-aws-smoke-cluster-profile
name: cluster-profile
serviceAccountName: ci-operator
volumes:
- configMap:
name: prow-job-cluster-launch-installer-e2e-smoke
name: job-definition
- name: cluster-profile
projected:
sources:
- secret:
name: cluster-secrets-aws
- configMap:
name: cluster-profile-aws
trigger: ((?m)^/test( all| e2e-aws-smoke),?(\s+|$))
- agent: kubernetes
always_run: true
branches:
Expand Down
Loading

0 comments on commit 3f2f01c

Please sign in to comment.