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

ci-operator/templates/openshift/installer/cluster-launch-installer-upi*: Switch on BRANCH for RHCOS AMI #6248

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.1"
- name: CLUSTER_TYPE
value: aws
- name: CONFIG_SPEC
Expand Down Expand Up @@ -307,6 +309,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.1"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.2"
- name: CLUSTER_TYPE
value: aws
- name: CONFIG_SPEC
Expand Down Expand Up @@ -702,6 +704,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.2"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.3"
- name: CLUSTER_TYPE
value: aws
- name: CONFIG_SPEC
Expand Down Expand Up @@ -579,6 +581,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.3"
- name: CLUSTER_TYPE
value: gcp
- name: CONFIG_SPEC
Expand Down Expand Up @@ -652,6 +656,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.3"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.4"
- name: CLUSTER_TYPE
value: aws
- name: CONFIG_SPEC
Expand Down Expand Up @@ -581,6 +583,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.4"
- name: CLUSTER_TYPE
value: gcp
- name: CONFIG_SPEC
Expand Down Expand Up @@ -654,6 +658,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.4"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.5"
- name: CLUSTER_TYPE
value: aws
- name: CONFIG_SPEC
Expand Down Expand Up @@ -575,6 +577,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.5"
- name: CLUSTER_TYPE
value: gcp
- name: CONFIG_SPEC
Expand Down Expand Up @@ -647,6 +651,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.5"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.3"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.4"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.5"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.1"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down Expand Up @@ -730,6 +732,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.1"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.2"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down Expand Up @@ -1040,6 +1042,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.2"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.3"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down Expand Up @@ -1042,6 +1044,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.3"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.4"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down Expand Up @@ -995,6 +997,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.4"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.5"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down Expand Up @@ -988,6 +990,8 @@ presubmits:
command:
- ci-operator
env:
- name: BRANCH
value: "4.5"
- name: CLUSTER_TYPE
value: vsphere
- name: CONFIG_SPEC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ kind: Template
apiVersion: template.openshift.io/v1

parameters:
- name: BRANCH
- name: JOB_NAME_SAFE
required: true
- name: JOB_NAME_HASH
Expand Down Expand Up @@ -1265,7 +1266,13 @@ objects:

# begin bootstrapping
if [[ "${CLUSTER_TYPE}" == "aws" ]]; then
RHCOS_AMI=ami-014ce8846db8b463d # FIXME: assumes AWS_REGION is us-east-1
case "${BRANCH}" in # FIXME: assumes AWS_REGION is us-east-1
4.1) RHCOS_AMI=ami-046fe691f52a953f9;;
4.2) RHCOS_AMI=ami-01e7fdcb66157b224;;
4.3) RHCOS_AMI=ami-014ce8846db8b463d;;
*) RHCOS_AMI=ami-014ce8846db8b463d;;
esac
echo "RHCOS AMI: ${RHCOS_AMI}"

# FIXME: get epel-release or otherwise add awscli to our UPI image
export PATH="${HOME}/.local/bin:${PATH}"
Expand Down Expand Up @@ -1504,14 +1511,18 @@ objects:
for INDEX in 0 1 2
do
SUBNET="PRIVATE_SUBNET_${INDEX}"
case "${BRANCH}" in
4.1) SUBNET_KEY=WorkerSubnet;;
*) SUBNET_KEY=Subnet;;
esac
aws cloudformation create-stack \
--stack-name "${CLUSTER_NAME}-compute-${INDEX}" \
--template-body "$(cat "/var/lib/openshift-install/upi/${CLUSTER_TYPE}/cloudformation/06_cluster_worker_node.yaml")" \
--tags "${TAGS}" \
--parameters \
ParameterKey=InfrastructureName,ParameterValue="${INFRA_ID}" \
ParameterKey=RhcosAmi,ParameterValue="${RHCOS_AMI}" \
ParameterKey=Subnet,ParameterValue="${!SUBNET}" \
ParameterKey="${SUBNET_KEY},ParameterValue=${!SUBNET}" \
ParameterKey=WorkerSecurityGroupId,ParameterValue="${WORKER_SECURITY_GROUP}" \
ParameterKey=IgnitionLocation,ParameterValue="https://api-int.${CLUSTER_NAME}.${base_domain}:22623/config/worker" \
ParameterKey=CertificateAuthorities,ParameterValue="${IGNITION_CA}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ kind: Template
apiVersion: template.openshift.io/v1

parameters:
- name: BRANCH
- name: JOB_NAME_SAFE
required: true
- name: JOB_NAME_HASH
Expand Down Expand Up @@ -575,7 +576,13 @@ objects:

# begin bootstrapping
if [[ "${CLUSTER_TYPE}" == "aws" ]]; then
RHCOS_AMI=ami-014ce8846db8b463d # FIXME: assumes AWS_REGION is us-east-1
case "${BRANCH}" in # FIXME: assumes AWS_REGION is us-east-1
4.1) RHCOS_AMI=ami-046fe691f52a953f9;;
4.2) RHCOS_AMI=ami-01e7fdcb66157b224;;
4.3) RHCOS_AMI=ami-014ce8846db8b463d;;
*) RHCOS_AMI=ami-014ce8846db8b463d;;
Copy link
Member

Choose a reason for hiding this comment

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

This is OK but I would prefer automating openshift/installer#2092 (comment)

esac
echo "RHCOS AMI: ${RHCOS_AMI}"

# FIXME: get epel-release or otherwise add awscli to our UPI image
export PATH="${HOME}/.local/bin:${PATH}"
Expand Down Expand Up @@ -721,14 +728,18 @@ objects:
for INDEX in 0 1 2
do
SUBNET="PRIVATE_SUBNET_${INDEX}"
case "${BRANCH}" in
4.1) SUBNET_KEY=WorkerSubnet;;
*) SUBNET_KEY=Subnet;;
esac
aws cloudformation create-stack \
--stack-name "${CLUSTER_NAME}-compute-${INDEX}" \
--template-body "$(cat "/var/lib/openshift-install/upi/${CLUSTER_TYPE}/cloudformation/06_cluster_worker_node.yaml")" \
--tags "${TAGS}" \
--parameters \
ParameterKey=InfrastructureName,ParameterValue="${INFRA_ID}" \
ParameterKey=RhcosAmi,ParameterValue="${RHCOS_AMI}" \
ParameterKey=Subnet,ParameterValue="${!SUBNET}" \
ParameterKey="${SUBNET_KEY},ParameterValue=${!SUBNET}" \
ParameterKey=WorkerSecurityGroupId,ParameterValue="${WORKER_SECURITY_GROUP}" \
ParameterKey=IgnitionLocation,ParameterValue="https://api-int.${CLUSTER_NAME}.${base_domain}:22623/config/worker" \
ParameterKey=CertificateAuthorities,ParameterValue="${IGNITION_CA}" \
Expand Down