mirror of
https://github.com/fleetdm/fleet
synced 2026-04-27 00:17:21 +00:00
- Removes timestamp from osquery_perf image - Adds `default: 0` to loadtest osquery_perf workflow, `variable: loadtest_containers_starting_index` - Adds `variable: sleep_time` to loadtest osquery_perf workflow - Adds osquery_perf docker repository in ECR - Adds support for `sleep_time` to `enroll.sh` - Updates terraform variables to enforce `git_branch` or `git_tag` for osquery_perf
33 lines
943 B
Bash
Executable file
33 lines
943 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
# Script for enrolling osquery-perf hosts by `terraform apply`ing in increments of 8 `loadtest` containers.
|
|
# NOTE(lucas): This is the currently known configuration that won't tip the loadtest environment,
|
|
# but maybe in the future we can be more aggressive (and reduce enroll time).
|
|
#
|
|
# ./enroll.sh my-branch 8 240
|
|
|
|
BRANCH_NAME=$1
|
|
START_INDEX=$2
|
|
END_INDEX=$3
|
|
INCREMENT=8
|
|
SLEEP_TIME_SECONDS=${4:-60}
|
|
|
|
if [ -z "$BRANCH_NAME" ]; then
|
|
echo "Missing BRANCH_NAME"
|
|
fi
|
|
if [ -z "$START_INDEX" ]; then
|
|
echo "Missing START_INDEX"
|
|
fi
|
|
if [ -z "$END_INDEX" ]; then
|
|
echo "Missing END_INDEX"
|
|
fi
|
|
|
|
# We add this check to avoid terraform (error-prone) locking in case of typos.
|
|
# read -p "You will use BRANCH_NAME=$BRANCH_NAME. Continue? "
|
|
|
|
set -x
|
|
|
|
for (( c=$START_INDEX; c<=$END_INDEX; c+=$INCREMENT )); do
|
|
terraform apply -var git_tag_branch=$BRANCH_NAME -var loadtest_containers=$c -auto-approve
|
|
sleep $SLEEP_TIME_SECONDS
|
|
done
|