mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
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>
This commit is contained in:
@ -159,7 +159,8 @@ RUN apt-get update --quiet && apt-get install --yes \
|
||||
terraform \
|
||||
fish \
|
||||
unzip \
|
||||
zstd && \
|
||||
zstd \
|
||||
gettext-base && \
|
||||
# Delete package cache to avoid consuming space in layer
|
||||
apt-get clean && \
|
||||
# Configure FIPS-compliant policies
|
||||
|
@ -46,7 +46,14 @@ All of the above arguments may be specified as environment variables. Consult th
|
||||
|
||||
### Prometheus Metrics
|
||||
|
||||
To capture Prometheus metrics from the loadtest, two environment
|
||||
To capture Prometheus metrics from the loadtest, two environment variables are required:
|
||||
|
||||
- `SCALETEST_PROMETHEUS_REMOTE_WRITE_USER`
|
||||
- `SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD`
|
||||
|
||||
### Enterprise License
|
||||
|
||||
To add an Enterprise license, set the `SCALETEST_CODER_LICENSE` environment variable to the JWT string
|
||||
|
||||
## Scenarios
|
||||
|
||||
|
@ -14,6 +14,7 @@ SCALETEST_SCENARIO="${SCALETEST_SCENARIO:-}"
|
||||
SCALETEST_PROJECT="${SCALETEST_PROJECT:-}"
|
||||
SCALETEST_PROMETHEUS_REMOTE_WRITE_USER="${SCALETEST_PROMETHEUS_REMOTE_WRITE_USER:-}"
|
||||
SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD="${SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD:-}"
|
||||
SCALETEST_CODER_LICENSE="${SCALETEST_CODER_LICENSE:-}"
|
||||
SCALETEST_SKIP_CLEANUP="${SCALETEST_SKIP_CLEANUP:-0}"
|
||||
SCALETEST_CREATE_CONCURRENCY="${SCALETEST_CREATE_CONCURRENCY:-10}"
|
||||
SCALETEST_TRAFFIC_BYTES_PER_TICK="${SCALETEST_TRAFFIC_BYTES_PER_TICK:-1024}"
|
||||
@ -155,6 +156,11 @@ maybedryrun "$DRY_RUN" kubectl --kubeconfig="${KUBECONFIG}" -n "coder-${SCALETES
|
||||
echo "Initializing Coder deployment."
|
||||
DRY_RUN="$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_init.sh" "${SCALETEST_CODER_URL}"
|
||||
|
||||
if [[ -n "${SCALETEST_CODER_LICENSE}" ]]; then
|
||||
echo "Applying Coder Enterprise License"
|
||||
DRY_RUN="$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_shim.sh" license add -l "${SCALETEST_CODER_LICENSE}"
|
||||
fi
|
||||
|
||||
echo "Creating ${SCALETEST_NUM_WORKSPACES} workspaces."
|
||||
DRY_RUN="$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_shim.sh" scaletest create-workspaces \
|
||||
--count "${SCALETEST_NUM_WORKSPACES}" \
|
||||
|
@ -106,6 +106,8 @@ coder:
|
||||
value: "true"
|
||||
- name: "CODER_VERBOSE"
|
||||
value: "true"
|
||||
- name: "CODER_EXPERIMENTS"
|
||||
value: "${var.coder_experiments}"
|
||||
image:
|
||||
repo: ${var.coder_image_repo}
|
||||
tag: ${var.coder_image_tag}
|
||||
|
@ -112,6 +112,7 @@ resource "kubernetes_secret" "prometheus-postgres-password" {
|
||||
|
||||
# Install Prometheus Postgres exporter helm chart
|
||||
resource "helm_release" "prometheus-exporter-chart" {
|
||||
depends_on = [helm_release.prometheus-chart]
|
||||
repository = local.prometheus_exporter_helm_repo
|
||||
chart = local.prometheus_exporter_helm_chart
|
||||
name = local.prometheus_exporter_release_name
|
||||
|
@ -157,3 +157,8 @@ variable "prometheus_remote_write_send_interval" {
|
||||
description = "Prometheus remote write interval."
|
||||
default = "15s"
|
||||
}
|
||||
|
||||
variable "coder_experiments" {
|
||||
description = "Coder Experiments to enable"
|
||||
default = ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user