From 3a0777c063f4bfd82b33ed65cc377efc6ba2a2e9 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 8 Feb 2022 16:30:35 -0600 Subject: [PATCH 1/9] added 'able' perf testing environment --- .gitlab/.gitlab-ci.yml | 6 -- qa/scripts/ableRunGauntlet.sh | 16 ++++++ qa/scripts/ableSetupGauntlet.sh | 86 +++++++++++++++++++++++++++++ qa/scripts/ableTeardownGauntlet.sh | 7 +++ qa/scripts/ableTestGauntlet.sh | 12 ++++ qa/scripts/runSamsungGauntlet.sh | 3 - qa/scripts/runSmokeTest.sh | 4 -- qa/scripts/setupSamsungGauntlet.sh | 3 - qa/scripts/setupSmokeTest.sh | 3 - qa/scripts/teardownSmokeTest.sh | 3 - qa/scripts/testSmokeTest.sh | 3 - qa/tf/ci/smoketest/variables.tf | 4 -- qa/tf/gauntlet/able/main.tf | 16 ++++++ qa/tf/gauntlet/able/outputs.tf | 19 +++++++ qa/tf/gauntlet/able/provider.tf | 4 ++ qa/tf/gauntlet/able/tf.auto.tfvars | 2 + qa/tf/gauntlet/able/variables.tf | 14 +++++ qa/tf/gauntlet/samsung/variables.tf | 5 -- 18 files changed, 176 insertions(+), 34 deletions(-) create mode 100644 qa/scripts/ableRunGauntlet.sh create mode 100755 qa/scripts/ableSetupGauntlet.sh create mode 100755 qa/scripts/ableTeardownGauntlet.sh create mode 100755 qa/scripts/ableTestGauntlet.sh create mode 100644 qa/tf/gauntlet/able/main.tf create mode 100644 qa/tf/gauntlet/able/outputs.tf create mode 100644 qa/tf/gauntlet/able/provider.tf create mode 100644 qa/tf/gauntlet/able/tf.auto.tfvars create mode 100644 qa/tf/gauntlet/able/variables.tf diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 4c0cb0c3b..8bfd7af0c 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -328,7 +328,6 @@ smoke test: AWS_ACCESS_KEY_ID: $AWS_FBCI_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY TF_VAR_cluster_prefix: "" - TF_VAR_branch: "" tags: - aws - docker @@ -360,8 +359,6 @@ smoke test: - export PATH=$PATH:/usr/local/go/bin - TF_VAR_cluster_prefix="smoke-$(openssl rand -base64 12 | tr -d /=+ | cut -c -16)" - echo "Cluster Prefix --> $TF_VAR_cluster_prefix" - - TF_VAR_branch=$CI_COMMIT_BRANCH - - echo "Branch --> $TF_VAR_branch" script: - ./qa/scripts/setupSmokeTest.sh - ./qa/scripts/testSmokeTest.sh @@ -387,7 +384,6 @@ gauntlet: AWS_ACCESS_KEY_ID: $AWS_FBCI_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY TF_VAR_cluster_prefix: "" - TF_VAR_branch: "" tags: - aws - docker @@ -419,8 +415,6 @@ gauntlet: - export PATH=$PATH:/usr/local/go/bin - TF_VAR_cluster_prefix="gauntlet-$(openssl rand -base64 12 | tr -d /=+ | cut -c -16)" - echo "Cluster Prefix --> $TF_VAR_cluster_prefix" - - TF_VAR_branch=$CI_COMMIT_BRANCH - - echo "Branch --> $TF_VAR_branch" script: - ./qa/scripts/setupSamsungGauntlet.sh - ./qa/scripts/testSamsungGauntlet.sh diff --git a/qa/scripts/ableRunGauntlet.sh b/qa/scripts/ableRunGauntlet.sh new file mode 100644 index 000000000..a5659f1fc --- /dev/null +++ b/qa/scripts/ableRunGauntlet.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# requires TF_VAR_cluster_prefix env var to be set +if [ -z ${TF_VAR_cluster_prefix+x} ]; then + echo "setting TF_VAR_cluster_prefix"; + export TF_VAR_cluster_prefix="able-$(openssl rand -base64 12 | tr -d /=+ | cut -c -16)" + echo "TF_VAR_cluster_prefix is set to '$TF_VAR_cluster_prefix'"; +else + echo "TF_VAR_cluster_prefix is set to '$TF_VAR_cluster_prefix'"; +fi + +$SCRIPT_DIR/ableSetupGauntlet.sh +$SCRIPT_DIR/ableTestGauntlet.sh +$SCRIPT_DIR/ableTeardownGauntlet.sh diff --git a/qa/scripts/ableSetupGauntlet.sh b/qa/scripts/ableSetupGauntlet.sh new file mode 100755 index 000000000..e5813c7e2 --- /dev/null +++ b/qa/scripts/ableSetupGauntlet.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +# To run script: ./SetupGauntlet.sh +export TF_IN_AUTOMATION=1 + +if [ -z ${TF_VAR_cluster_prefix+x} ]; then + echo "TF_VAR_cluster_prefix is unset"; + exit 1 +else + echo "TF_VAR_cluster_prefix is set to '$TF_VAR_cluster_prefix'"; +fi + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source $SCRIPT_DIR/utilCluster.sh + +pushd ./qa/tf/gauntlet/able +echo "Running terraform init..." +terraform init -input=false +echo "Running terraform apply..." +terraform apply -input=false -auto-approve +terraform output -json > outputs.json +popd + +# get the first ingest host +INGESTNODE0=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +echo "using INGESTNODE0 ${INGESTNODE0}" + +# get the first data host +DATANODE0=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +echo "using DATANODE0 ${DATANODE0}" + + +DEPLOYED_CLUSTER_PREFIX=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.cluster_prefix][0]["value"]') +echo "Using DEPLOYED_CLUSTER_PREFIX: ${DEPLOYED_CLUSTER_PREFIX}" + +DEPLOYED_CLUSTER_REPLICA_COUNT=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.fb_cluster_replica_count][0]["value"]') +echo "Using DEPLOYED_CLUSTER_REPLICA_COUNT: ${DEPLOYED_CLUSTDEPLOYED_CLUSTER_REPLICA_COUNTER_PREFIX}" + +DEPLOYED_DATA_IPS=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.data_node_ips][0]["value"][]') +echo "DEPLOYED_DATA_IPS: {" +echo "${DEPLOYED_DATA_IPS}" +echo "}" + +DEPLOYED_DATA_IPS_LEN=`echo "$DEPLOYED_DATA_IPS" | wc -l` + +DEPLOYED_INGEST_IPS=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.ingest_ips][0]["value"][]') +echo "DEPLOYED_INGEST_IPS: {" +echo "${DEPLOYED_INGEST_IPS}" +echo "}" + +DEPLOYED_INGEST_IPS_LEN=`echo "$DEPLOYED_INGEST_IPS" | wc -l` + +#wait until we can connect to one of the hosts +for i in {0..24} +do + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd" + if [ $? -eq 0 ] + then + echo "Cluster is up after ${i} tries." + break + fi + sleep 10 +done + +ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd" +if [ $? -ne 0 ] +then + echo "Unable to connect to cluster - giving up" + exit 1 +fi + +setupClusterNodes + +# verify featurebase running +echo "Verifying featurebase cluster running..." +curl -s http://${DATANODE0}:10101/status +if (( $? != 0 )) +then + echo "Featurebase cluster not running" + exit 1 +fi + +echo "Cluster running." + + + diff --git a/qa/scripts/ableTeardownGauntlet.sh b/qa/scripts/ableTeardownGauntlet.sh new file mode 100755 index 000000000..061782132 --- /dev/null +++ b/qa/scripts/ableTeardownGauntlet.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# To run script: ./ableTeardownGauntlet.sh + +cd qa/tf/gauntlet/able +export TF_IN_AUTOMATION=1 +terraform destroy -auto-approve diff --git a/qa/scripts/ableTestGauntlet.sh b/qa/scripts/ableTestGauntlet.sh new file mode 100755 index 000000000..d414545e4 --- /dev/null +++ b/qa/scripts/ableTestGauntlet.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# get the first ingest host +INGESTNODE0=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +echo "using INGESTNODE0 ${INGESTNODE0}" + +# get the first data host +DATANODE0=$(cat ./qa/tf/gauntlet/able/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +echo "using DATANODE0 ${DATANODE0}" + + +echo "Done." \ No newline at end of file diff --git a/qa/scripts/runSamsungGauntlet.sh b/qa/scripts/runSamsungGauntlet.sh index 37cc0a930..6c1822c91 100644 --- a/qa/scripts/runSamsungGauntlet.sh +++ b/qa/scripts/runSamsungGauntlet.sh @@ -2,9 +2,6 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -# requires TF_VAR_branch env var to be set -if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi - # requires TF_VAR_cluster_prefix env var to be set if [ -z ${TF_VAR_cluster_prefix+x} ]; then echo "setting TF_VAR_cluster_prefix"; diff --git a/qa/scripts/runSmokeTest.sh b/qa/scripts/runSmokeTest.sh index 6b598995e..8d4ff1923 100755 --- a/qa/scripts/runSmokeTest.sh +++ b/qa/scripts/runSmokeTest.sh @@ -2,10 +2,6 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -# requires TF_VAR_branch env var to be set -if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi - # requires TF_VAR_cluster_prefix env var to be set if [ -z ${TF_VAR_cluster_prefix+x} ]; then echo "setting TF_VAR_cluster_prefix"; diff --git a/qa/scripts/setupSamsungGauntlet.sh b/qa/scripts/setupSamsungGauntlet.sh index e7929ea9f..1e6060f2e 100755 --- a/qa/scripts/setupSamsungGauntlet.sh +++ b/qa/scripts/setupSamsungGauntlet.sh @@ -3,9 +3,6 @@ # To run script: ./setupSamsungGauntlet.sh export TF_IN_AUTOMATION=1 -# requires TF_VAR_branch env var to be set -if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi - SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source $SCRIPT_DIR/utilCluster.sh diff --git a/qa/scripts/setupSmokeTest.sh b/qa/scripts/setupSmokeTest.sh index 1059e5f29..997974494 100755 --- a/qa/scripts/setupSmokeTest.sh +++ b/qa/scripts/setupSmokeTest.sh @@ -3,9 +3,6 @@ # To run script: ./setupSmokeTest.sh export TF_IN_AUTOMATION=1 -# requires TF_VAR_branch env var to be set -if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi - SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source $SCRIPT_DIR/utilCluster.sh diff --git a/qa/scripts/teardownSmokeTest.sh b/qa/scripts/teardownSmokeTest.sh index 76eeb564b..21e9f390a 100755 --- a/qa/scripts/teardownSmokeTest.sh +++ b/qa/scripts/teardownSmokeTest.sh @@ -2,9 +2,6 @@ # To run script: ./teardownSmokeTest.sh -# requires TF_VAR_branch env var to be set -if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi - cd qa/tf/ci/smoketest export TF_IN_AUTOMATION=1 terraform destroy -auto-approve diff --git a/qa/scripts/testSmokeTest.sh b/qa/scripts/testSmokeTest.sh index b6ba34e7f..b27b12931 100755 --- a/qa/scripts/testSmokeTest.sh +++ b/qa/scripts/testSmokeTest.sh @@ -1,8 +1,5 @@ #!/bin/bash -# requires TF_VAR_branch env var to be set -if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi - SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source $SCRIPT_DIR/utilCluster.sh diff --git a/qa/tf/ci/smoketest/variables.tf b/qa/tf/ci/smoketest/variables.tf index 578305341..a327ea4ff 100644 --- a/qa/tf/ci/smoketest/variables.tf +++ b/qa/tf/ci/smoketest/variables.tf @@ -13,7 +13,3 @@ variable "cluster_prefix" { description = "This is a identifier that will be prefixed to created resources" } -variable "branch" { - type = string - description = "The branch we are on" -} \ No newline at end of file diff --git a/qa/tf/gauntlet/able/main.tf b/qa/tf/gauntlet/able/main.tf new file mode 100644 index 000000000..3434c407d --- /dev/null +++ b/qa/tf/gauntlet/able/main.tf @@ -0,0 +1,16 @@ +module "samsung-cluster" { + source = "../../.modules/featurebase-cluster" + cluster_prefix = var.cluster_prefix + region = var.region + profile = var.profile + fb_data_node_type = "m6g.xlarge" + fb_data_disk_iops = 10000 + fb_data_node_count = 5 + fb_ingest_type = "m6g.large" + fb_ingest_disk_iops = 10000 + fb_ingest_node_count = 5 + vpc_id = "vpc-05a26a122f961dc2b" + vpc_cidr_block = "10.0.0.0/16" + vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",] + vpc_private_subnets = ["subnet-0319dde319380326f","subnet-0517ca9a646d80f88","subnet-05a7b685ed27eb1cf",] +} \ No newline at end of file diff --git a/qa/tf/gauntlet/able/outputs.tf b/qa/tf/gauntlet/able/outputs.tf new file mode 100644 index 000000000..c00860a34 --- /dev/null +++ b/qa/tf/gauntlet/able/outputs.tf @@ -0,0 +1,19 @@ +output "ingest_ips" { + description = "List of ingest IPs" + value = module.samsung-cluster.ingest_ips +} + +output "data_node_ips" { + description = "List of data node IPs" + value = module.samsung-cluster.data_node_ips +} + +output "cluster_prefix" { + description = "The cluster prefix used" + value = module.samsung-cluster.cluster_prefix +} + +output "fb_cluster_replica_count" { + description = "The cluster replica count used" + value = module.samsung-cluster.fb_cluster_replica_count +} diff --git a/qa/tf/gauntlet/able/provider.tf b/qa/tf/gauntlet/able/provider.tf new file mode 100644 index 000000000..c0fc95d9d --- /dev/null +++ b/qa/tf/gauntlet/able/provider.tf @@ -0,0 +1,4 @@ +provider "aws" { + region = var.region + profile = var.profile +} \ No newline at end of file diff --git a/qa/tf/gauntlet/able/tf.auto.tfvars b/qa/tf/gauntlet/able/tf.auto.tfvars new file mode 100644 index 000000000..ac6de62a6 --- /dev/null +++ b/qa/tf/gauntlet/able/tf.auto.tfvars @@ -0,0 +1,2 @@ +region = "us-east-2" +profile = "service-terraform" \ No newline at end of file diff --git a/qa/tf/gauntlet/able/variables.tf b/qa/tf/gauntlet/able/variables.tf new file mode 100644 index 000000000..e55c7936d --- /dev/null +++ b/qa/tf/gauntlet/able/variables.tf @@ -0,0 +1,14 @@ +variable "region" { + description = "The AWS region in which the VPC should be built" + type = string +} + +variable "profile" { + description = "The name of the AWS profile Terraform should use for auth." + type = string +} + +variable "cluster_prefix" { + type = string + description = "This is a identifier that will be prefixed to created resources" +} diff --git a/qa/tf/gauntlet/samsung/variables.tf b/qa/tf/gauntlet/samsung/variables.tf index 578305341..e55c7936d 100644 --- a/qa/tf/gauntlet/samsung/variables.tf +++ b/qa/tf/gauntlet/samsung/variables.tf @@ -12,8 +12,3 @@ variable "cluster_prefix" { type = string description = "This is a identifier that will be prefixed to created resources" } - -variable "branch" { - type = string - description = "The branch we are on" -} \ No newline at end of file From bb1f4039742b8aaaf27495fb41ce52391450292b Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Thu, 10 Feb 2022 13:56:59 -0600 Subject: [PATCH 2/9] fixes to able defn --- qa/tf/.modules/featurebase-cluster/main.tf | 2 +- qa/tf/gauntlet/able/main.tf | 11 ++++++----- qa/tf/gauntlet/able/outputs.tf | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/qa/tf/.modules/featurebase-cluster/main.tf b/qa/tf/.modules/featurebase-cluster/main.tf index d21fbd4df..026fe3c6a 100644 --- a/qa/tf/.modules/featurebase-cluster/main.tf +++ b/qa/tf/.modules/featurebase-cluster/main.tf @@ -13,7 +13,7 @@ data "aws_ami" "amazon_linux_2" { filter { name = "architecture" - values = ["arm64"] + values = ["arm64", "x86_64"] } } diff --git a/qa/tf/gauntlet/able/main.tf b/qa/tf/gauntlet/able/main.tf index 3434c407d..e15309423 100644 --- a/qa/tf/gauntlet/able/main.tf +++ b/qa/tf/gauntlet/able/main.tf @@ -1,14 +1,15 @@ -module "samsung-cluster" { +module "able-cluster" { source = "../../.modules/featurebase-cluster" cluster_prefix = var.cluster_prefix region = var.region profile = var.profile - fb_data_node_type = "m6g.xlarge" + fb_data_node_type = "m6i.12xlarge" fb_data_disk_iops = 10000 - fb_data_node_count = 5 - fb_ingest_type = "m6g.large" + fb_data_node_count = 3 + fb_ingest_type = "m6i.2xlarge" fb_ingest_disk_iops = 10000 - fb_ingest_node_count = 5 + fb_ingest_disk_size_gb = 500 + fb_ingest_node_count = 1 vpc_id = "vpc-05a26a122f961dc2b" vpc_cidr_block = "10.0.0.0/16" vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",] diff --git a/qa/tf/gauntlet/able/outputs.tf b/qa/tf/gauntlet/able/outputs.tf index c00860a34..43acb92ab 100644 --- a/qa/tf/gauntlet/able/outputs.tf +++ b/qa/tf/gauntlet/able/outputs.tf @@ -1,19 +1,19 @@ output "ingest_ips" { description = "List of ingest IPs" - value = module.samsung-cluster.ingest_ips + value = module.able-cluster.ingest_ips } output "data_node_ips" { description = "List of data node IPs" - value = module.samsung-cluster.data_node_ips + value = module.able-cluster.data_node_ips } output "cluster_prefix" { description = "The cluster prefix used" - value = module.samsung-cluster.cluster_prefix + value = module.able-cluster.cluster_prefix } output "fb_cluster_replica_count" { description = "The cluster replica count used" - value = module.samsung-cluster.fb_cluster_replica_count + value = module.able-cluster.fb_cluster_replica_count } From 90d897ad7d5b0c7a03a12f0afbca811f93c6d693 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Thu, 10 Feb 2022 14:00:06 -0600 Subject: [PATCH 3/9] address merge conflict --- .gitlab/.gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index fdbfda5cd..6ac388ff8 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -419,8 +419,6 @@ gauntlet: - export PATH=$PATH:/usr/local/go/bin - TF_VAR_cluster_prefix="gauntlet-$(openssl rand -base64 12 | tr -d /=+ | cut -c -16)" - echo "Cluster Prefix --> $TF_VAR_cluster_prefix" - - TF_VAR_branch=$CI_COMMIT_BRANCH - - echo "Branch --> $TF_VAR_branch" - export INSTANCE_ID=$(curl --silent --fail "http://169.254.169.254/latest/meta-data/instance-id" | tee instance_id) - aws autoscaling set-instance-protection --instance-ids "$INSTANCE_ID" --auto-scaling-group-name $ASG_NAME --protected-from-scale-in --profile $INFRA_PROFILE script: From 92d491682de835663333a9c6c2c1ce1b44355d1a Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Fri, 11 Feb 2022 15:38:33 -0600 Subject: [PATCH 4/9] added perf test --- .gitlab/.gitlab-ci.yml | 9 +++++++++ .gitlab/.perf-able-gitlab-ci.yml | 11 +++++++++++ .../{ableRunGauntlet.sh => perf/able/ableRun.sh} | 6 +++--- .../{ableSetupGauntlet.sh => perf/able/ableSetup.sh} | 4 ++-- .../able/ableTeardown.sh} | 2 +- .../{ableTestGauntlet.sh => perf/able/ableTest.sh} | 0 qa/scripts/perf/able/script.js | 7 +++++++ qa/tf/.modules/featurebase-cluster/main.tf | 2 ++ 8 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 .gitlab/.perf-able-gitlab-ci.yml rename qa/scripts/{ableRunGauntlet.sh => perf/able/ableRun.sh} (82%) rename qa/scripts/{ableSetupGauntlet.sh => perf/able/ableSetup.sh} (97%) rename qa/scripts/{ableTeardownGauntlet.sh => perf/able/ableTeardown.sh} (68%) rename qa/scripts/{ableTestGauntlet.sh => perf/able/ableTest.sh} (100%) create mode 100644 qa/scripts/perf/able/script.js diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 9dc197cfd..68280eaa8 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -12,6 +12,7 @@ stages: - build - integration - gauntlet + - performance - post build smoke build: @@ -467,3 +468,11 @@ s3 dump: - job: build for darwin arm64 - job: build for linux amd64 - job: build for linux arm64 + +perf_able: + stage: performance + trigger: + include: .perf-able-gitlab-ci.yml + rules: + - changes: + - featurebase/* \ No newline at end of file diff --git a/.gitlab/.perf-able-gitlab-ci.yml b/.gitlab/.perf-able-gitlab-ci.yml new file mode 100644 index 000000000..25b590f3c --- /dev/null +++ b/.gitlab/.perf-able-gitlab-ci.yml @@ -0,0 +1,11 @@ +stages: + - loadtest + +loadtest: + image: + name: loadimpact/k6:latest + entrypoint: [''] + stage: loadtest + script: + - echo "executing local k6 in k6 container..." + - k6 run ./qa/scripts/perf/able/script.js diff --git a/qa/scripts/ableRunGauntlet.sh b/qa/scripts/perf/able/ableRun.sh similarity index 82% rename from qa/scripts/ableRunGauntlet.sh rename to qa/scripts/perf/able/ableRun.sh index a5659f1fc..92ca26987 100644 --- a/qa/scripts/ableRunGauntlet.sh +++ b/qa/scripts/perf/able/ableRun.sh @@ -11,6 +11,6 @@ else echo "TF_VAR_cluster_prefix is set to '$TF_VAR_cluster_prefix'"; fi -$SCRIPT_DIR/ableSetupGauntlet.sh -$SCRIPT_DIR/ableTestGauntlet.sh -$SCRIPT_DIR/ableTeardownGauntlet.sh +$SCRIPT_DIR/ableSetup.sh +$SCRIPT_DIR/ableTest.sh +$SCRIPT_DIR/ableTeardown.sh diff --git a/qa/scripts/ableSetupGauntlet.sh b/qa/scripts/perf/able/ableSetup.sh similarity index 97% rename from qa/scripts/ableSetupGauntlet.sh rename to qa/scripts/perf/able/ableSetup.sh index e5813c7e2..f76aa7fe6 100755 --- a/qa/scripts/ableSetupGauntlet.sh +++ b/qa/scripts/perf/able/ableSetup.sh @@ -1,6 +1,6 @@ #!/bin/bash -# To run script: ./SetupGauntlet.sh +# To run script: ./ableSetup.sh export TF_IN_AUTOMATION=1 if [ -z ${TF_VAR_cluster_prefix+x} ]; then @@ -11,7 +11,7 @@ else fi SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -source $SCRIPT_DIR/utilCluster.sh +source $SCRIPT_DIR/../..utilCluster.sh pushd ./qa/tf/gauntlet/able echo "Running terraform init..." diff --git a/qa/scripts/ableTeardownGauntlet.sh b/qa/scripts/perf/able/ableTeardown.sh similarity index 68% rename from qa/scripts/ableTeardownGauntlet.sh rename to qa/scripts/perf/able/ableTeardown.sh index 061782132..5ca1a2dde 100755 --- a/qa/scripts/ableTeardownGauntlet.sh +++ b/qa/scripts/perf/able/ableTeardown.sh @@ -1,6 +1,6 @@ #!/bin/bash -# To run script: ./ableTeardownGauntlet.sh +# To run script: ./ableTeardown.sh cd qa/tf/gauntlet/able export TF_IN_AUTOMATION=1 diff --git a/qa/scripts/ableTestGauntlet.sh b/qa/scripts/perf/able/ableTest.sh similarity index 100% rename from qa/scripts/ableTestGauntlet.sh rename to qa/scripts/perf/able/ableTest.sh diff --git a/qa/scripts/perf/able/script.js b/qa/scripts/perf/able/script.js new file mode 100644 index 000000000..77b293c66 --- /dev/null +++ b/qa/scripts/perf/able/script.js @@ -0,0 +1,7 @@ +import http from 'k6/http'; +import { sleep } from 'k6'; + +export default function () { + http.get('https://test.k6.io'); + sleep(1); +} \ No newline at end of file diff --git a/qa/tf/.modules/featurebase-cluster/main.tf b/qa/tf/.modules/featurebase-cluster/main.tf index 026fe3c6a..57b478b4d 100644 --- a/qa/tf/.modules/featurebase-cluster/main.tf +++ b/qa/tf/.modules/featurebase-cluster/main.tf @@ -38,6 +38,7 @@ resource "aws_instance" "fb_cluster_nodes" { volume_type = var.fb_data_disk_type volume_size = var.fb_data_disk_size_gb iops = var.fb_data_disk_iops + encrypted = true } tags = { @@ -70,6 +71,7 @@ resource "aws_instance" "fb_ingest" { volume_type = var.fb_ingest_disk_type volume_size = var.fb_ingest_disk_size_gb iops = var.fb_ingest_disk_iops + encrypted = true } tags = { From 06e70d41e9d9be015c085d8a726262729b19c47f Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Sat, 12 Feb 2022 11:22:03 -0600 Subject: [PATCH 5/9] added a job to clean up files --- .gitlab/.gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index a1432e3b0..2b67dc285 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -25,6 +25,14 @@ smoke build: - echo "Let's just see if it compiles... (sometimes the linter gives unclear errors if it doesn't)" - go build ./... +un-firetruck build: + stage: lint + rules: + - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' + script: + - echo "Removes some files which cause problems" + - rm -rf internal/clustertests/results + golangci-lint: image: golangci/golangci-lint:v1.39.0 stage: lint From 63621732886d8351a695285f4f83b735a0db43df Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Sat, 12 Feb 2022 11:30:04 -0600 Subject: [PATCH 6/9] testing a theory --- internal/clustertests/results/coverage.out | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 internal/clustertests/results/coverage.out diff --git a/internal/clustertests/results/coverage.out b/internal/clustertests/results/coverage.out new file mode 100644 index 000000000..e69de29bb From f35741adcfdd2ae86060871649af50f94277ca9c Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Mon, 14 Feb 2022 10:46:58 -0600 Subject: [PATCH 7/9] removing experiments --- .gitlab/.gitlab-ci.yml | 8 -------- internal/clustertests/results/coverage.out | 0 2 files changed, 8 deletions(-) delete mode 100644 internal/clustertests/results/coverage.out diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 2b67dc285..a1432e3b0 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -25,14 +25,6 @@ smoke build: - echo "Let's just see if it compiles... (sometimes the linter gives unclear errors if it doesn't)" - go build ./... -un-firetruck build: - stage: lint - rules: - - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' - script: - - echo "Removes some files which cause problems" - - rm -rf internal/clustertests/results - golangci-lint: image: golangci/golangci-lint:v1.39.0 stage: lint diff --git a/internal/clustertests/results/coverage.out b/internal/clustertests/results/coverage.out deleted file mode 100644 index e69de29bb..000000000 From f97878edcfc76184c802405e05ad1f1ef6c70d35 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Mon, 14 Feb 2022 16:31:55 -0600 Subject: [PATCH 8/9] fixed arch problem --- qa/scripts/perf/able/ableSetup.sh | 2 +- qa/tf/.modules/featurebase-cluster/main.tf | 2 +- qa/tf/.modules/featurebase-cluster/variables.tf | 5 +++++ qa/tf/gauntlet/able/main.tf | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/qa/scripts/perf/able/ableSetup.sh b/qa/scripts/perf/able/ableSetup.sh index f76aa7fe6..30a868b69 100755 --- a/qa/scripts/perf/able/ableSetup.sh +++ b/qa/scripts/perf/able/ableSetup.sh @@ -11,7 +11,7 @@ else fi SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -source $SCRIPT_DIR/../..utilCluster.sh +source $SCRIPT_DIR/../../utilCluster.sh pushd ./qa/tf/gauntlet/able echo "Running terraform init..." diff --git a/qa/tf/.modules/featurebase-cluster/main.tf b/qa/tf/.modules/featurebase-cluster/main.tf index 57b478b4d..325516bfc 100644 --- a/qa/tf/.modules/featurebase-cluster/main.tf +++ b/qa/tf/.modules/featurebase-cluster/main.tf @@ -13,7 +13,7 @@ data "aws_ami" "amazon_linux_2" { filter { name = "architecture" - values = ["arm64", "x86_64"] + values = var.fb_cluster_arch } } diff --git a/qa/tf/.modules/featurebase-cluster/variables.tf b/qa/tf/.modules/featurebase-cluster/variables.tf index 4d7762d7e..7f7bf2e95 100644 --- a/qa/tf/.modules/featurebase-cluster/variables.tf +++ b/qa/tf/.modules/featurebase-cluster/variables.tf @@ -3,6 +3,11 @@ variable "cluster_prefix" { description = "This is a identifier that will be prefixed to created resources" } +variable "fb_cluster_arch" { + type = list(string) + default = ["arm64"] +} + variable "fb_ingest_type" { type = string default = "c6g.2xlarge" diff --git a/qa/tf/gauntlet/able/main.tf b/qa/tf/gauntlet/able/main.tf index e15309423..514f52173 100644 --- a/qa/tf/gauntlet/able/main.tf +++ b/qa/tf/gauntlet/able/main.tf @@ -3,10 +3,10 @@ module "able-cluster" { cluster_prefix = var.cluster_prefix region = var.region profile = var.profile - fb_data_node_type = "m6i.12xlarge" + fb_data_node_type = "m6g.12xlarge" fb_data_disk_iops = 10000 fb_data_node_count = 3 - fb_ingest_type = "m6i.2xlarge" + fb_ingest_type = "m6g.2xlarge" fb_ingest_disk_iops = 10000 fb_ingest_disk_size_gb = 500 fb_ingest_node_count = 1 From fdb500898de868b1bb6dcc119f29054b269be67c Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 15 Feb 2022 07:59:33 -0600 Subject: [PATCH 9/9] fixed path --- .gitlab/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index a1432e3b0..48e92cf3a 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -481,7 +481,7 @@ s3 dump: perf_able: stage: performance trigger: - include: .perf-able-gitlab-ci.yml + include: .gitlab/.perf-able-gitlab-ci.yml rules: - changes: - featurebase/* \ No newline at end of file