Skip to content

Commit

Permalink
Add infra availability for HyperShift Clusters (cloud-bulldozer#265)
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Sindhur Malleni <[email protected]>

Signed-off-by: Sai Sindhur Malleni <[email protected]>
  • Loading branch information
smalleni authored and rsevilla87 committed Jul 10, 2023
1 parent 1787ba2 commit 167abf3
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"hosted_cluster_nodepool_size": 0,
"hosted_cluster_network_type": "OpenShiftSDN",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge",
"hc_install_interval": 60
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"hosted_cluster_instance_type": "m5.2xlarge",
"hosted_cluster_network_type": "OVNKubernetes",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"hosted_cluster_instance_type": "m5.2xlarge",
"hosted_cluster_network_type": "OVNKubernetes",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"hosted_cluster_nodepool_size": 0,
"hosted_cluster_network_type": "OpenShiftSDN",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"hosted_cluster_instance_type": "m5.2xlarge",
"hosted_cluster_network_type": "OVNKubernetes",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"hosted_cluster_instance_type": "m5.4xlarge",
"hosted_cluster_network_type": "OpenShiftSDN",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"hosted_cluster_instance_type": "m5.4xlarge",
"hosted_cluster_network_type": "OpenShiftSDN",
"hosted_control_plane_availability": "HighlyAvailable",
"hosted_infra_availability": "HighlyAvailable",
"openshift_workload_node_instance_type": "r5.4xlarge"
}
10 changes: 6 additions & 4 deletions dags/openshift_nightlies/scripts/install/hypershift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ create_cluster(){
export COMPUTE_WORKERS_NUMBER=$(cat ${json_file} | jq -r .hosted_cluster_nodepool_size)
export COMPUTE_WORKERS_TYPE=$(cat ${json_file} | jq -r .hosted_cluster_instance_type)
export NETWORK_TYPE=$(cat ${json_file} | jq -r .hosted_cluster_network_type)
export REPLICA_TYPE=$(cat ${json_file} | jq -r .hosted_control_plane_availability)
export CONTROLPLANE_REPLICA_TYPE=$(cat ${json_file} | jq -r .hosted_control_plane_availability)
export INFRA_REPLICA_TYPE=$(cat ${json_file} | jq -r .hosted_infra_availability)
export CPO_IMAGE=$(cat ${json_file} | jq -r .control_plane_operator_image)
export RELEASE_IMAGE=$(cat ${json_file} | jq -r .hosted_cluster_release_image)
echo $PULL_SECRET > pull-secret
Expand All @@ -139,7 +140,7 @@ create_cluster(){
if [[ $RELEASE_IMAGE != "" ]]; then
RELEASE="--release-image=$RELEASE_IMAGE"
fi
hypershift create cluster aws --name $HOSTED_CLUSTER_NAME --additional-tags User:${GITHUB_USERNAME}, mgmt-cluster:${MGMT_CLUSTER_NAME} --node-pool-replicas=$COMPUTE_WORKERS_NUMBER --base-domain $BASEDOMAIN --pull-secret pull-secret --aws-creds aws_credentials --region $AWS_REGION --control-plane-availability-policy $REPLICA_TYPE --network-type $NETWORK_TYPE --instance-type $COMPUTE_WORKERS_TYPE ${RELEASE} ${CPO_IMAGE_ARG}
hypershift create cluster aws --name $HOSTED_CLUSTER_NAME --additional-tags User:${GITHUB_USERNAME}, mgmt-cluster:${MGMT_CLUSTER_NAME} --node-pool-replicas=$COMPUTE_WORKERS_NUMBER --base-domain $BASEDOMAIN --pull-secret pull-secret --aws-creds aws_credentials --region $AWS_REGION --control-plane-availability-policy $CONTROLPLANE_REPLICA_TYPE --infra-availability-policy $INFRA_REPLICA_TYPE --network-type $NETWORK_TYPE --instance-type $COMPUTE_WORKERS_TYPE ${RELEASE} ${CPO_IMAGE_ARG}
echo "Wait till hosted cluster got created and in progress.."
kubectl wait --for=condition=available=false --timeout=3600s hostedcluster -n clusters $HOSTED_CLUSTER_NAME
kubectl get hostedcluster -n clusters $HOSTED_CLUSTER_NAME
Expand All @@ -152,13 +153,14 @@ create_cluster(){
create_empty_cluster(){
echo "Create None type Hosted cluster.."
export NETWORK_TYPE=$(cat ${json_file} | jq -r .hosted_cluster_network_type)
export REPLICA_TYPE=$(cat ${json_file} | jq -r .hosted_control_plane_availability)
export CONTROLPLANE_REPLICA_TYPE=$(cat ${json_file} | jq -r .hosted_control_plane_availability)
export INFRA_REPLICA_TYPE=$(cat ${json_file} | jq -r .hosted_infra_availability)
echo $PULL_SECRET > pull-secret
CPO_IMAGE_ARG=""
if [[ $CPO_IMAGE != "" ]] ; then
CPO_IMAGE_ARG="--control-plane-operator-image=$CPO_IMAGE"
fi
hypershift create cluster none --name $HOSTED_CLUSTER_NAME --node-pool-replicas=0 --base-domain $BASEDOMAIN --pull-secret pull-secret --control-plane-availability-policy $REPLICA_TYPE --network-type $NETWORK_TYPE ${CPO_IMAGE_ARG}
hypershift create cluster none --name $HOSTED_CLUSTER_NAME --node-pool-replicas=0 --base-domain $BASEDOMAIN --pull-secret pull-secret --control-plane-availability-policy $CONTROLPLANE_REPLICA_TYPE --infra-availability-policy $INFRA_REPLICA_TYPE --network-type $NETWORK_TYPE ${CPO_IMAGE_ARG}
echo "Wait till hosted cluster got created and in progress.."
kubectl wait --for=condition=available=false --timeout=60s hostedcluster -n clusters $HOSTED_CLUSTER_NAME
kubectl get hostedcluster -n clusters $HOSTED_CLUSTER_NAME
Expand Down

0 comments on commit 167abf3

Please sign in to comment.