Skip to content

Commit 5d26637

Browse files
authored
feat(scaletest): add license and experiment to scaletest (#8222)
* add license and experiment to scaletest Signed-off-by: Spike Curtis <spike@coder.com> * appease lint & fmt Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
1 parent 96435ee commit 5d26637

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

dogfood/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ RUN apt-get update --quiet && apt-get install --yes \
159159
terraform \
160160
fish \
161161
unzip \
162-
zstd && \
162+
zstd \
163+
gettext-base && \
163164
# Delete package cache to avoid consuming space in layer
164165
apt-get clean && \
165166
# Configure FIPS-compliant policies

scaletest/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ All of the above arguments may be specified as environment variables. Consult th
4646

4747
### Prometheus Metrics
4848

49-
To capture Prometheus metrics from the loadtest, two environment
49+
To capture Prometheus metrics from the loadtest, two environment variables are required:
50+
51+
- `SCALETEST_PROMETHEUS_REMOTE_WRITE_USER`
52+
- `SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD`
53+
54+
### Enterprise License
55+
56+
To add an Enterprise license, set the `SCALETEST_CODER_LICENSE` environment variable to the JWT string
5057

5158
## Scenarios
5259

scaletest/scaletest.sh

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SCALETEST_SCENARIO="${SCALETEST_SCENARIO:-}"
1414
SCALETEST_PROJECT="${SCALETEST_PROJECT:-}"
1515
SCALETEST_PROMETHEUS_REMOTE_WRITE_USER="${SCALETEST_PROMETHEUS_REMOTE_WRITE_USER:-}"
1616
SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD="${SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD:-}"
17+
SCALETEST_CODER_LICENSE="${SCALETEST_CODER_LICENSE:-}"
1718
SCALETEST_SKIP_CLEANUP="${SCALETEST_SKIP_CLEANUP:-0}"
1819
SCALETEST_CREATE_CONCURRENCY="${SCALETEST_CREATE_CONCURRENCY:-10}"
1920
SCALETEST_TRAFFIC_BYTES_PER_TICK="${SCALETEST_TRAFFIC_BYTES_PER_TICK:-1024}"
@@ -155,6 +156,11 @@ maybedryrun "$DRY_RUN" kubectl --kubeconfig="${KUBECONFIG}" -n "coder-${SCALETES
155156
echo "Initializing Coder deployment."
156157
DRY_RUN="$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_init.sh" "${SCALETEST_CODER_URL}"
157158

159+
if [[ -n "${SCALETEST_CODER_LICENSE}" ]]; then
160+
echo "Applying Coder Enterprise License"
161+
DRY_RUN="$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_shim.sh" license add -l "${SCALETEST_CODER_LICENSE}"
162+
fi
163+
158164
echo "Creating ${SCALETEST_NUM_WORKSPACES} workspaces."
159165
DRY_RUN="$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_shim.sh" scaletest create-workspaces \
160166
--count "${SCALETEST_NUM_WORKSPACES}" \

scaletest/terraform/coder.tf

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ coder:
106106
value: "true"
107107
- name: "CODER_VERBOSE"
108108
value: "true"
109+
- name: "CODER_EXPERIMENTS"
110+
value: "${var.coder_experiments}"
109111
image:
110112
repo: ${var.coder_image_repo}
111113
tag: ${var.coder_image_tag}

scaletest/terraform/prometheus.tf

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ resource "kubernetes_secret" "prometheus-postgres-password" {
112112

113113
# Install Prometheus Postgres exporter helm chart
114114
resource "helm_release" "prometheus-exporter-chart" {
115+
depends_on = [helm_release.prometheus-chart]
115116
repository = local.prometheus_exporter_helm_repo
116117
chart = local.prometheus_exporter_helm_chart
117118
name = local.prometheus_exporter_release_name

scaletest/terraform/vars.tf

+5
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,8 @@ variable "prometheus_remote_write_send_interval" {
157157
description = "Prometheus remote write interval."
158158
default = "15s"
159159
}
160+
161+
variable "coder_experiments" {
162+
description = "Coder Experiments to enable"
163+
default = ""
164+
}

0 commit comments

Comments
 (0)