Skip to content

Commit

Permalink
Add ROSA and ARO automation flavors (#535)
Browse files Browse the repository at this point in the history
* Adds ROSA and ARO automation flavors
* Updates provisioner images libraries/packages/tooling
* Infra UI now shows cluster flavor in the "My Clusters" cards
  • Loading branch information
Shane Bostick authored Sep 17, 2021
1 parent 64046f8 commit 74fdfd4
Show file tree
Hide file tree
Showing 17 changed files with 393 additions and 29 deletions.
70 changes: 68 additions & 2 deletions chart/infra-server/static/flavors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,12 @@

- name: kops-version
description: KOPS version
value: 1.18.1
value: 1.21.1
kind: optional

- name: k8s-version
description: kubernetes version (must be <= KOPS version)
value: 1.18.1
value: 1.21.4
kind: optional

- name: master-count
Expand Down Expand Up @@ -463,3 +463,69 @@

- name: data
description: An archive that includes ssh keys to connect to cluster nodes

#####################
# Openshift ARO #
#####################
- id: aro
name: ARO
description: Openshift ARO cluster
availability: alpha
workflow: configuration/workflow-openshift-aro.yaml
parameters:
- name: name
description: cluster name
value: example1

- name: nodes
description: number of nodes
value: "4"
kind: optional

- name: machine-type
description: node machine type
value: Standard_D4s_v3
kind: optional

artifacts:
- name: kubeconfig
description: Kube config for connecting to this cluster

- name: dotenv
description: Environment variables used to access the cluster and consoles

- name: data
description: An archive that includes ssh keys to connect to cluster nodes

#####################
# Openshift ROSA #
#####################
- id: rosa
name: ROSA
description: Openshift ROSA cluster
availability: alpha
workflow: configuration/workflow-openshift-rosa.yaml
parameters:
- name: name
description: cluster name
value: example1

- name: nodes
description: number of nodes
value: "4"
kind: optional

- name: machine-type
description: node machine type
value: m5.xlarge
kind: optional

artifacts:
- name: kubeconfig
description: Kube config for connecting to this cluster

- name: dotenv
description: Environment variables used to access the cluster and consoles

- name: data
description: An archive that includes ssh keys to connect to cluster nodes
4 changes: 2 additions & 2 deletions chart/infra-server/static/workflow-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
archive:
tar: {}
container:
image: gcr.io/stackrox-infra/automation-flavors/aks:0.2.2
image: gcr.io/stackrox-infra/automation-flavors/aks:0.2.14
imagePullPolicy: Always
args:
- create
Expand Down Expand Up @@ -92,7 +92,7 @@ spec:

- name: destroy
container:
image: gcr.io/stackrox-infra/automation-flavors/aks:0.2.2
image: gcr.io/stackrox-infra/automation-flavors/aks:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
8 changes: 6 additions & 2 deletions chart/infra-server/static/workflow-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
- name: kubeconfig
path: /data/kubeconfig.yaml
optional: true
archive:
none: {}

- name: tfstate
globalName: global-tfstate
Expand All @@ -94,14 +96,16 @@ spec:
- name: url
path: /data/url
optional: true
archive:
none: {}

- name: SSH_ACCESS
path: /data/SSH_ACCESS.md
archive:
none: {}

container:
image: gcr.io/stackrox-infra/automation-flavors/demo:0.2.5
image: gcr.io/stackrox-infra/automation-flavors/demo:0.2.14
imagePullPolicy: Always
args:
- create
Expand Down Expand Up @@ -174,7 +178,7 @@ spec:
path: /data/tfvars
optional: true
container:
image: gcr.io/stackrox-infra/automation-flavors/demo:0.2.5
image: gcr.io/stackrox-infra/automation-flavors/demo:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
4 changes: 2 additions & 2 deletions chart/infra-server/static/workflow-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
archive:
tar: {}
container:
image: gcr.io/stackrox-infra/automation-flavors/eks:0.1.7
image: gcr.io/stackrox-infra/automation-flavors/eks:0.2.14
imagePullPolicy: Always
args:
- create
Expand Down Expand Up @@ -85,7 +85,7 @@ spec:
- name: destroy
activeDeadlineSeconds: 3600
container:
image: gcr.io/stackrox-infra/automation-flavors/eks:0.1.7
image: gcr.io/stackrox-infra/automation-flavors/eks:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
4 changes: 2 additions & 2 deletions chart/infra-server/static/workflow-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
- name: success

container:
image: gcr.io/stackrox-infra/automation-flavors/example:v0.0.0-27-g4924d62
image: gcr.io/stackrox-infra/automation-flavors/example:0.2.14
args:
- create
- "--sleep={{inputs.parameters.sleep}}"
Expand All @@ -65,7 +65,7 @@ spec:
- name: success

container:
image: gcr.io/stackrox-infra/automation-flavors/example:v0.0.0-27-g4924d62
image: gcr.io/stackrox-infra/automation-flavors/example:0.2.14
args:
- destroy
- "--sleep={{inputs.parameters.sleep}}"
Expand Down
8 changes: 6 additions & 2 deletions chart/infra-server/static/workflow-gke-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ spec:
artifacts:
- name: kubeconfig
path: /outputs/kubeconfig
archive:
none: {}
- name: connect
path: /outputs/connect.sh
archive:
none: {}
- name: SSH_ACCESS
path: /outputs/SSH_ACCESS.md
archive:
Expand All @@ -54,7 +58,7 @@ spec:
valueFrom:
path: /outputs/cluster_name
container:
image: gcr.io/stackrox-infra/automation-flavors/gke-default:0.2.5
image: gcr.io/stackrox-infra/automation-flavors/gke-default:0.2.14
imagePullPolicy: Always
args:
- create
Expand All @@ -77,7 +81,7 @@ spec:
- name: destroy
activeDeadlineSeconds: 3600
container:
image: gcr.io/stackrox-infra/automation-flavors/gke-default:0.2.5
image: gcr.io/stackrox-infra/automation-flavors/gke-default:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
4 changes: 2 additions & 2 deletions chart/infra-server/static/workflow-kops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
archive:
tar: {}
container:
image: gcr.io/stackrox-infra/automation-flavors/kops:0.1.7
image: gcr.io/stackrox-infra/automation-flavors/kops:0.2.14
imagePullPolicy: Always
args:
- create
Expand Down Expand Up @@ -101,7 +101,7 @@ spec:
- name: destroy
activeDeadlineSeconds: 3600
container:
image: gcr.io/stackrox-infra/automation-flavors/kops:0.1.7
image: gcr.io/stackrox-infra/automation-flavors/kops:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
4 changes: 2 additions & 2 deletions chart/infra-server/static/workflow-openshift-4-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:

- name: create
container:
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.10
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.14
imagePullPolicy: Always
volumeMounts:
- name: data
Expand Down Expand Up @@ -192,7 +192,7 @@ spec:

- name: destroy
container:
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.10
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
4 changes: 2 additions & 2 deletions chart/infra-server/static/workflow-openshift-4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
archive:
tar: {}
container:
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.12
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.14
imagePullPolicy: Always
args:
- create
Expand Down Expand Up @@ -111,7 +111,7 @@ spec:

- name: destroy
container:
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.12
image: gcr.io/stackrox-infra/automation-flavors/openshift-4:0.2.14
imagePullPolicy: Always
args:
- destroy
Expand Down
139 changes: 139 additions & 0 deletions chart/infra-server/static/workflow-openshift-aro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: aro-
spec:
entrypoint: start
arguments:
parameters:
- name: name
- name: nodes
value: "4"
- name: machine-type
value: "Standard_D4s_v3"
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Mi

templates:
- name: start
steps:
- - name: create
template: create

- - name: gather
template: gather

- - name: wait
template: wait

- - name: destroy
template: destroy

- name: create
activeDeadlineSeconds: 7200
container:
image: gcr.io/stackrox-infra/automation-flavors/openshift-aro:0.2.14
imagePullPolicy: Always
args:
- create
- "{{workflow.parameters.name}}"
env:
- name: AZURE_SUBSCRIPTION_ID
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SUBSCRIPTION_ID
- name: AZURE_SP_CLIENT_ID
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SP_CLIENT_ID
- name: AZURE_SP_TENANT_ID
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SP_TENANT_ID
- name: AZURE_SP_SECRET_VAL
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SP_SECRET_VAL
- name: REDHAT_PULL_SECRET_BASE64
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: REDHAT_PULL_SECRET_BASE64
- name: NODE_COUNT
value: "{{workflow.parameters.nodes}}"
- name: INSTANCE_TYPE
value: "{{workflow.parameters.machine-type}}"
- name: CREATION_SOURCE
value: "infra"
volumeMounts:
- name: data
mountPath: /data

- name: gather
container:
image: busybox
imagePullPolicy: Always
command: [echo, "gathering artifacts"]
volumeMounts:
- name: data
mountPath: /data
outputs:
artifacts:
- name: kubeconfig
path: /data/kubeconfig
archive:
none: {}
- name: dotenv
path: /data/dotenv
archive:
none: {}
- name: data
path: /data
archive:
tar: {}

- name: wait
suspend: {}

- name: destroy
activeDeadlineSeconds: 3600
container:
image: gcr.io/stackrox-infra/automation-flavors/openshift-aro:0.2.14
imagePullPolicy: Always
args:
- destroy
- "{{workflow.parameters.name}}"
env:
- name: AZURE_SUBSCRIPTION_ID
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SUBSCRIPTION_ID
- name: AZURE_SP_CLIENT_ID
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SP_CLIENT_ID
- name: AZURE_SP_TENANT_ID
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SP_TENANT_ID
- name: AZURE_SP_SECRET_VAL
valueFrom:
secretKeyRef:
name: aro-cluster-manager
key: AZURE_SP_SECRET_VAL
volumeMounts:
- name: data
mountPath: /data
Loading

0 comments on commit 74fdfd4

Please sign in to comment.