Skip to content

Commit 3f2f01c

Browse files
committed
ci-operator/config/openshift/installer/master: Move to openshift-install
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.
1 parent 592a572 commit 3f2f01c

File tree

9 files changed

+72
-885
lines changed

9 files changed

+72
-885
lines changed

ci-operator/config/openshift/installer/master.yaml

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,15 @@ base_images:
44
name: origin-v4.0
55
namespace: openshift
66
tag: base
7-
base-smoke:
8-
cluster: https://api.ci.openshift.org
9-
namespace: openshift
10-
name: release
11-
tag: bazel
12-
binary_build_commands: go build ./installer/cmd/tectonic
137
canonical_go_repository: github.com/openshift/installer
148
images:
15-
- dockerfile_path: images/tectonic-installer/Dockerfile.ci
9+
- dockerfile_path: images/installer/Dockerfile.ci
1610
from: base
1711
inputs:
18-
bin:
19-
paths:
20-
- destination_dir: .
21-
source_path: /go/src/github.com/openshift/installer/tectonic
2212
root:
2313
as:
2414
- build
2515
to: installer
26-
- dockerfile_path: images/tectonic-installer/Dockerfile.ci
27-
optional: true
28-
from: base-smoke
29-
inputs:
30-
bin:
31-
paths:
32-
- destination_dir: .
33-
source_path: /go/src/github.com/openshift/installer/tectonic
34-
root:
35-
as:
36-
- build
37-
to: installer-bazel
38-
- dockerfile_path: images/installer-origin-release/Dockerfile.ci
39-
optional: true
40-
from: installer-bazel
41-
to: installer-smoke
4216
resources:
4317
'*':
4418
limits:
@@ -47,13 +21,6 @@ resources:
4721
requests:
4822
cpu: 100m
4923
memory: 200Mi
50-
bin:
51-
limits:
52-
cpu: '7'
53-
memory: 9Gi
54-
requests:
55-
cpu: '3'
56-
memory: 7Gi
5724
unit:
5825
limits:
5926
cpu: '7'
@@ -75,7 +42,7 @@ build_root:
7542
tag: golang-1.10
7643
tests:
7744
- as: unit
78-
commands: go test ./pkg/... ./installer/pkg/...
45+
commands: go test ./pkg/...
7946
from: src
8047
- as: gofmt
8148
commands: IS_CONTAINER=TRUE ./hack/go-fmt.sh .

ci-operator/config/openshift/installer/release-3.11.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
presubmits:
22
openshift/installer:
3-
- agent: kubernetes
4-
always_run: true
5-
context: ci/prow/build-tarball
6-
decorate: true
7-
name: pull-ci-openshift-installer-bazel-build-tarball
8-
rerun_command: /test build-tarball
9-
spec:
10-
containers:
11-
- args:
12-
- ./hack/test-bazel-build-tarball.sh
13-
- --action_env=HOME=/tmp
14-
command:
15-
- sh
16-
env:
17-
- name: HOME
18-
value: /tmp
19-
- name: IS_CONTAINER
20-
value: "TRUE"
21-
- name: USER
22-
value: bazel
23-
image: quay.io/coreos/tectonic-builder:bazel-v0.3
24-
imagePullPolicy: Always
25-
name: ""
26-
resources: {}
27-
trigger: (?m)^/test build-tarball
283
- agent: kubernetes
294
always_run: false
305
branches:
@@ -145,63 +120,6 @@ presubmits:
145120
- configMap:
146121
name: cluster-profile-aws
147122
trigger: ((?m)^/test( e2e-aws-all),?(\s+|$))
148-
- agent: kubernetes
149-
always_run: false
150-
branches:
151-
- master
152-
context: ci/prow/e2e-aws-smoke
153-
decorate: true
154-
name: pull-ci-openshift-installer-master-e2e-aws-smoke
155-
rerun_command: /test e2e-aws-smoke
156-
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)?)?)?)?)?)?$
157-
skip_cloning: true
158-
spec:
159-
containers:
160-
- command:
161-
- ci-operator
162-
- --give-pr-author-access-to-namespace=true
163-
- --artifact-dir=$(ARTIFACTS)
164-
- --secret-dir=/usr/local/e2e-aws-smoke-cluster-profile
165-
- --template=/usr/local/e2e-aws-smoke
166-
- --target=e2e-aws-smoke
167-
- --give-pr-author-access-to-namespace
168-
env:
169-
- name: JOB_NAME_SAFE
170-
value: e2e-aws-smoke
171-
- name: CLUSTER_TYPE
172-
value: aws
173-
- name: CONFIG_SPEC
174-
valueFrom:
175-
configMapKeyRef:
176-
key: master.yaml
177-
name: ci-operator-openshift-installer
178-
image: ci-operator:latest
179-
imagePullPolicy: Always
180-
name: ""
181-
resources:
182-
limits:
183-
cpu: 500m
184-
requests:
185-
cpu: 10m
186-
volumeMounts:
187-
- mountPath: /usr/local/e2e-aws-smoke
188-
name: job-definition
189-
subPath: cluster-launch-installer-e2e-smoke.yaml
190-
- mountPath: /usr/local/e2e-aws-smoke-cluster-profile
191-
name: cluster-profile
192-
serviceAccountName: ci-operator
193-
volumes:
194-
- configMap:
195-
name: prow-job-cluster-launch-installer-e2e-smoke
196-
name: job-definition
197-
- name: cluster-profile
198-
projected:
199-
sources:
200-
- secret:
201-
name: cluster-secrets-aws
202-
- configMap:
203-
name: cluster-profile-aws
204-
trigger: ((?m)^/test( all| e2e-aws-smoke),?(\s+|$))
205123
- agent: kubernetes
206124
always_run: true
207125
branches:

0 commit comments

Comments
 (0)