Skip to content

Commit

Permalink
Use default machinepool instead of additional autoscaling one
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Hajas <mhajas@redhat.com>
  • Loading branch information
mhajas committed Oct 22, 2024
1 parent 6eb3efd commit e95c9d4
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 35 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/keycloak-scalability-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ jobs:
tar xfvz benchmark/target/keycloak-benchmark-*.tar.gz
mv keycloak-benchmark-* keycloak-benchmark
- name: Allow cluster to scale
if: ${{ !inputs.skipCreateDeployment }}
run: rosa edit machinepool -c ${{ inputs.clusterName }} --min-replicas 4 --autorepair scaling

- name: Create Keycloak deployment
if: ${{ !inputs.skipCreateDeployment }}
uses: ./.github/actions/keycloak-create-deployment
Expand Down Expand Up @@ -181,10 +177,6 @@ jobs:
with:
project: ${{ env.PROJECT }}

- name: Scale down the cluster
if: ${{ (success() || failure()) && !inputs.skipDeleteProject }}
run: rosa edit machinepool -c ${{ inputs.clusterName }} --min-replicas 0 --autorepair scaling

archive:
name: Commit results to Git repository
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/rosa-multi-az-cluster-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ jobs:
aws-default-region: ${{ vars.AWS_DEFAULT_REGION }}
rosa-token: ${{ secrets.ROSA_TOKEN }}

- name: Scale ROSA clusters
run: |
rosa edit machinepool -c ${{ env.CLUSTER_PREFIX }}-a --min-replicas 4 --max-replicas 15 --autorepair scaling
rosa edit machinepool -c ${{ env.CLUSTER_PREFIX }}-b --min-replicas 4 --max-replicas 15 --autorepair scaling
- name: Setup Go Task
uses: ./.github/actions/task-setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ Updated information about the upcoming release are available https://github.com/
Each test ran for 10 minutes.

. Setup ROSA cluster as default.
. Scale machine pool.
+
[source,bash,subs="+quotes"]
----
rosa edit machinepool -c **<clustername>** --min-replicas 4 --autorepair scaling
----
. Deploy Keycloak and Monitoring
+
[source,bash]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,6 @@ The standard setup of nodes might be too small for running a load test, at the s
To scale the cluster on demand, the standard setup has a machine pool named `scaling` with instances of type `m5.2xlarge` which is auto-scaled based on the current demand from 4 to 15 instances.
However, auto-scaling of worker nodes is quite time-consuming as nodes are scaled one by one.

To scale the machine pool faster, issue a command like the following, and the additional nodes will be spawned at the same time:

[source,bash,subs=+quotes]
----
rosa edit machinepool -c _**clustername**_ --min-replicas 4 --autorepair scaling
----

To allow scaling the machine pool back to 0, use a command like the following:

[source,bash,subs=+quotes]
----
rosa edit machinepool -c _**clustername**_ --min-replicas 0 --autorepair scaling
----

To use different instance types, use `rosa create machinepool` to create additional machine pools

[#aws-efs-as-readwritemany-storage]
Expand Down
2 changes: 1 addition & 1 deletion provision/aws/rosa_create_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi

SCALING_MACHINE_POOL=$(rosa list machinepools -c "${CLUSTER_NAME}" -o json | jq -r '.[] | select(.id == "scaling") | .id')
if [[ "${SCALING_MACHINE_POOL}" != "scaling" ]]; then
rosa create machinepool -c "${CLUSTER_NAME}" --instance-type "${COMPUTE_MACHINE_TYPE:-m5.2xlarge}" --max-replicas 15 --min-replicas 1 --name scaling --enable-autoscaling --autorepair
rosa create machinepool -c "${CLUSTER_NAME}" --instance-type "${COMPUTE_MACHINE_TYPE:-m5.2xlarge}" --max-replicas 15 --min-replicas 0 --name scaling --enable-autoscaling --autorepair
fi

cd ${SCRIPT_DIR}
Expand Down
1 change: 1 addition & 0 deletions provision/opentofu/modules/rosa/hcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ resource "rhcs_cluster_rosa_hcp" "rosa_hcp_cluster" {
)
sts = local.sts_roles
replicas = var.replicas
compute_machine_type = var.instance_type
version = var.openshift_version
wait_for_create_complete = true
}
Expand Down
2 changes: 1 addition & 1 deletion provision/opentofu/modules/rosa/hcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ variable "instance_type" {

variable "replicas" {
type = number
default = 2
default = 6
nullable = false
}

0 comments on commit e95c9d4

Please sign in to comment.