Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-20252: add rosa hcp option #1053

Merged
merged 106 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
c1e7183
use rosa dev branch flavor image
davdhacs Aug 29, 2023
469b5d4
add managed-cp option to rosa form
davdhacs Aug 30, 2023
3009b1a
region param
davdhacs Aug 30, 2023
c46d9d4
use aws region param
davdhacs Aug 30, 2023
67ed251
update image to log region
davdhacs Aug 30, 2023
2575a03
rosa image with newer(gh) cli
davdhacs Aug 30, 2023
11f35a5
update
davdhacs Aug 30, 2023
639ce7d
fixed rosa cli download
davdhacs Aug 30, 2023
9d250ec
update re-roll
davdhacs Sep 6, 2023
0799887
Merge branch 'master' into ROX-19302-rosa-hcp-option
davdhacs Oct 9, 2023
a813364
Merge branch 'master' into ROX-19302-rosa-hcp-option
davdhacs Oct 20, 2023
b35566d
latest rosa flavor
davdhacs Oct 20, 2023
bed69f9
latest flavor img
davdhacs Oct 27, 2023
8fa421c
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Nov 8, 2023
36481c5
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Nov 10, 2023
4a505fc
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Nov 15, 2023
2799cbe
latest dev img
davdhacs Nov 22, 2023
84b24b2
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Nov 22, 2023
4cf0132
empty commit
tommartensen Nov 23, 2023
77ecf93
Revert "Bump namor from 2.0.3 to 3.0.1 in /ui (#969)"
tommartensen Nov 23, 2023
f88edee
Merge remote-tracking branch 'origin/tm/revert-namor' into ROX-20252-…
davdhacs Nov 28, 2023
e49dfd8
update image
davdhacs Nov 28, 2023
cbc7766
again
davdhacs Nov 28, 2023
6c7f12c
again
davdhacs Nov 28, 2023
09d24ba
and again
davdhacs Nov 29, 2023
8b50fc3
Revert "again"
davdhacs Nov 29, 2023
2e7c4c8
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Nov 29, 2023
44c9ffe
bump
davdhacs Nov 29, 2023
efa886d
bump
davdhacs Nov 29, 2023
00b80da
bump
davdhacs Nov 29, 2023
7092d4d
bump
davdhacs Nov 29, 2023
9afd15d
bump
davdhacs Nov 29, 2023
8e0d615
bump
davdhacs Nov 30, 2023
66ada70
bump
davdhacs Nov 30, 2023
7f23a4c
bump
davdhacs Nov 30, 2023
01668c4
bump
davdhacs Nov 30, 2023
19cdf5a
bump
davdhacs Nov 30, 2023
14037bb
bump
davdhacs Nov 30, 2023
1aca2a4
bump
davdhacs Nov 30, 2023
e8b8c9e
bump
davdhacs Dec 1, 2023
c7c9192
bump
davdhacs Dec 1, 2023
b7c55c8
bump
davdhacs Dec 1, 2023
e23c3f6
bump
davdhacs Dec 5, 2023
5280b56
remove aws default region var
davdhacs Dec 5, 2023
9137830
bump
davdhacs Dec 5, 2023
033eb26
bump
davdhacs Dec 5, 2023
0b4fb75
bump
davdhacs Dec 6, 2023
6fae866
bump
davdhacs Dec 6, 2023
d855755
bump
davdhacs Dec 6, 2023
fde6ca3
bump
davdhacs Dec 6, 2023
84ea8fb
bump
davdhacs Dec 6, 2023
bbe98e8
bump
davdhacs Dec 6, 2023
8180c10
bump
davdhacs Dec 6, 2023
7aac8cc
bump
davdhacs Dec 8, 2023
13590f2
bump
davdhacs Dec 8, 2023
a1bcba1
bump
davdhacs Dec 8, 2023
f04fcdf
bump
davdhacs Dec 8, 2023
215f1e5
before role switch
davdhacs Dec 8, 2023
0f00907
at dash
davdhacs Dec 8, 2023
099516e
latest
davdhacs Dec 8, 2023
5abf5b8
bump
davdhacs Dec 11, 2023
32da955
check patch
davdhacs Dec 11, 2023
98a2738
bump
davdhacs Dec 12, 2023
6f78685
bump
davdhacs Dec 12, 2023
57b39be
bump
davdhacs Dec 12, 2023
944cf8c
'bump
davdhacs Dec 12, 2023
2172f8d
bump
davdhacs Dec 12, 2023
1675132
bump
davdhacs Dec 12, 2023
73a234a
bump
davdhacs Dec 12, 2023
8ae3b99
bump
davdhacs Dec 12, 2023
9bd2f3e
bump
davdhacs Dec 12, 2023
b20bc61
bump
davdhacs Dec 12, 2023
c2ea257
bump
davdhacs Dec 13, 2023
5536ff6
add separate rosa-hcp flavor option
davdhacs Dec 13, 2023
a9bc80e
fix rosa_args loc
davdhacs Dec 13, 2023
1cf62cd
bump
davdhacs Dec 13, 2023
8275be1
push rosa-hcp into secrets
davdhacs Dec 13, 2023
5c6c2af
bump
davdhacs Dec 13, 2023
2573354
bump
davdhacs Dec 13, 2023
b6f2ef8
bump
davdhacs Dec 13, 2023
403ea5e
bump
davdhacs Dec 14, 2023
f81f4e9
bump
davdhacs Dec 14, 2023
49e787a
bump
davdhacs Dec 14, 2023
2ad9019
bump
davdhacs Dec 15, 2023
97801c1
bump
davdhacs Dec 15, 2023
2694921
bump
davdhacs Dec 15, 2023
c628ce2
bump
davdhacs Dec 15, 2023
250aa59
bump
davdhacs Dec 15, 2023
22c2cfa
bump
davdhacs Dec 15, 2023
a85d100
bump
davdhacs Dec 16, 2023
c871295
add help to new rosa args
davdhacs Dec 16, 2023
8a06884
add subnets arg for hcp
davdhacs Dec 16, 2023
cb3df41
bump
davdhacs Dec 16, 2023
9539e0c
fix name case
davdhacs Dec 16, 2023
6a274f3
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Dec 19, 2023
2098433
use tag, flavor merged
davdhacs Dec 19, 2023
ebdc961
rename as hypershift
davdhacs Dec 19, 2023
075ac88
fix default for subnets
davdhacs Dec 19, 2023
58bb7ed
fix console url
davdhacs Dec 19, 2023
56a2dfb
allow fix from flavor
davdhacs Dec 19, 2023
a7d0479
remove port
davdhacs Dec 19, 2023
04806d5
Merge branch 'master' into ROX-20252-add-rosa-hcp-option
davdhacs Dec 20, 2023
740aa58
markdown in rosa-args help
davdhacs Dec 20, 2023
a2c2626
remove hcp option from rosa flavor form
davdhacs Dec 21, 2023
d95bb3a
markdown formatting
davdhacs Dec 21, 2023
a20dcf8
expand note about managed_cp arg
davdhacs Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions chart/infra-server/static/flavors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,28 @@
value: "4"
kind: optional

- name: aws-region
description: aws region for cluster
value: "us-east-2"
kind: optional

- name: managed-cp
description: Use managed control-plane?
value: "false"
kind: optional
help: |
Run as ROSA HCP?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this parameter be exposed to the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure. I like showing that both ROSA flavors are the same, but with different default values. But it may just be confusing? I wondered if I should reset the ROSA flavor to be the same as it was before this change(?).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think it is confusing now, because you could set Use Managed Control Plane to true in classic ROSA - what would the effect be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, you can change the arguments in the rosa flavor form to match the defaults in the hcp/hypershift form and you'll get a matching cluster. So it just provides different default settings, and the managed_cp toggles hypershift on/off.


- name: rosa-args
description: additional rosa cli args
value: ""
kind: optional
help: |
Arguments such as,
--sts
--private-link
See `rosa create cluster --help`
davdhacs marked this conversation as resolved.
Show resolved Hide resolved

- name: machine-type
description: node machine type
value: m5.xlarge
Expand All @@ -796,6 +818,80 @@
- name: cluster-console-password
description: The password to login at the openshift console

########################
# Openshift ROSA HCP #
########################
- id: rosahcp
name: Hypershift on ROSA (HCP)
description: Openshift ROSA HCP (Hypershift ManagedCP) cluster
availability: stable
workflow: configuration/workflow-openshift-rosa-hcp.yaml
parameters:
- name: name
description: cluster name
value: example1

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

- name: aws-region
description: aws region for cluster
value: "us-east-1"
kind: optional

- name: managed-cp
description: Use managed control-plane?
value: "true"
kind: optional
help: |
Run as ROSA HCP?

- name: subnet-ids
description: Subnets for the cluster.
value: ""
kind: optional
help: |
Set like "public_subnet,private_subnet"
It will be placed in the command like `rosa create cluster --subnet-ids $SUBNET_IDS`
Set empty for the installer to create a new empty vpc and subnets.

- name: rosa-args
description: additional rosa cli args
value: "--sts"
kind: optional
help: |
Arguments such as,
--sts
--private-link
See `rosa create cluster --help`

- name: machine-type
description: node machine type
value: m5.2xlarge
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

- name: cluster-console-url
description: The URL for the openshift console
tags: [url]

- name: cluster-console-username
description: The username to login at the openshift console

- name: cluster-console-password
description: The password to login at the openshift console

#########################
# Openshift OSD on AWS #
#########################
Expand Down
179 changes: 179 additions & 0 deletions chart/infra-server/static/workflow-openshift-rosa-hcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: rosa-
spec:
entrypoint: start
arguments:
parameters:
- name: name
- name: rosa-args
value: ""
- name: aws-region
value: "us-east-1"
- name: managed-cp
value: true
- name: subnet-ids
value: ""
- name: nodes
value: "2"
- name: machine-type
value: "m5.2xlarge"
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: quay.io/stackrox-io/ci:automation-flavors-rosa-0.9.5
imagePullPolicy: Always
command:
- ./entrypoint.sh
args:
- create
- "{{workflow.parameters.name}}"
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: AWS_SECRET_ACCESS_KEY
- name: REDHAT_PULL_SECRET_BASE64
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: REDHAT_PULL_SECRET_BASE64
- name: OPENSHIFT_CLUSTER_MANAGER_API_TOKEN
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: OPENSHIFT_CLUSTER_MANAGER_API_TOKEN
- name: ROSA_ARGS
value: "{{workflow.parameters.rosa-args}}"
- name: AWS_REGION
value: "{{workflow.parameters.aws-region}}"
- name: MANAGED_CP
value: "{{workflow.parameters.managed-cp}}"
- name: SUBNET_IDS
value: "{{workflow.parameters.subnet-ids}}"
- 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
script:
image: busybox
command: [sh]
source: |
cd /data
. ./dotenv
if [[ -z "${CONSOLE_ENDPOINT// /}" ]]; then
CONSOLE_ENDPOINT="https://console-openshift-console.apps.rosa${API_ENDPOINT#https://api}"
echo "$CONSOLE_ENDPOINT" \
| sed -e 's/:[0-9]*$//' > cluster-console-url
else
echo "${CONSOLE_ENDPOINT}" > cluster-console-url
fi
echo "${CONSOLE_USER}" > cluster-console-username
echo "${CONSOLE_PASSWORD}" > cluster-console-password
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: cluster-console-url
path: /data/cluster-console-url
archive:
none: {}
- name: cluster-console-username
path: /data/cluster-console-username
archive:
none: {}
- name: cluster-console-password
path: /data/cluster-console-password
archive:
none: {}

- name: wait
suspend: {}

- name: destroy
activeDeadlineSeconds: 3600
container:
image: quay.io/stackrox-io/ci:automation-flavors-rosa-0.9.5
imagePullPolicy: Always
command:
- ./entrypoint.sh
args:
- destroy
- "{{workflow.parameters.name}}"
env:
- name: AWS_REGION
value: "{{workflow.parameters.aws-region}}"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: AWS_SECRET_ACCESS_KEY
- name: OPENSHIFT_CLUSTER_MANAGER_API_TOKEN
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: OPENSHIFT_CLUSTER_MANAGER_API_TOKEN
- name: REDHAT_PULL_SECRET_BASE64
valueFrom:
secretKeyRef:
name: osd-access-secrets
key: REDHAT_PULL_SECRET_BASE64
volumeMounts:
- name: data
mountPath: /data
18 changes: 16 additions & 2 deletions chart/infra-server/static/workflow-openshift-rosa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ spec:
arguments:
parameters:
- name: name
- name: rosa-args
value: ""
- name: aws-region
value: "us-east-2"
- name: managed-cp
value: false
- name: nodes
value: "4"
- name: machine-type
Expand Down Expand Up @@ -38,7 +44,7 @@ spec:
- name: create
activeDeadlineSeconds: 7200
container:
image: quay.io/stackrox-io/ci:automation-flavors-rosa-0.7.5
image: quay.io/stackrox-io/ci:automation-flavors-rosa-0.9.5
imagePullPolicy: Always
command:
- ./entrypoint.sh
Expand Down Expand Up @@ -66,6 +72,12 @@ spec:
secretKeyRef:
name: osd-access-secrets
key: OPENSHIFT_CLUSTER_MANAGER_API_TOKEN
- name: ROSA_ARGS
value: "{{workflow.parameters.rosa-args}}"
- name: AWS_REGION
value: "{{workflow.parameters.aws-region}}"
- name: MANAGED_CP
value: "{{workflow.parameters.managed-cp}}"
- name: NODE_COUNT
value: "{{workflow.parameters.nodes}}"
- name: INSTANCE_TYPE
Expand Down Expand Up @@ -122,14 +134,16 @@ spec:
- name: destroy
activeDeadlineSeconds: 3600
container:
image: quay.io/stackrox-io/ci:automation-flavors-rosa-0.7.5
image: quay.io/stackrox-io/ci:automation-flavors-rosa-0.9.5
imagePullPolicy: Always
command:
- ./entrypoint.sh
args:
- destroy
- "{{workflow.parameters.name}}"
env:
- name: AWS_REGION
value: "{{workflow.parameters.aws-region}}"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
Expand Down
3 changes: 3 additions & 0 deletions chart/infra-server/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ data:
workflow-openshift-rosa.yaml: |-
{{- .Files.Get "static/workflow-openshift-rosa.yaml" | b64enc | nindent 4 }}

workflow-openshift-rosa-hcp.yaml: |-
{{- .Files.Get "static/workflow-openshift-rosa-hcp.yaml" | b64enc | nindent 4 }}

workflow-osd-aws.yaml: |-
{{- .Files.Get "static/workflow-osd-aws.yaml" | b64enc | nindent 4 }}

Expand Down
Loading