diff --git a/docs/admin/infrastructure/scale-utility.md b/docs/admin/infrastructure/scale-utility.md index b66e7fca41..6945b54bf5 100644 --- a/docs/admin/infrastructure/scale-utility.md +++ b/docs/admin/infrastructure/scale-utility.md @@ -44,7 +44,7 @@ environments. > for your users. > To avoid potential outages and orphaned resources, we recommend that you run > scale tests on a secondary "staging" environment or a dedicated -> [Kubernetes playground cluster](https://github.com/coder/coder/tree/main/scaletest/terraform). +> Kubernetes playground cluster. > > Run it against a production environment at your own risk. diff --git a/scaletest/README.md b/scaletest/README.md deleted file mode 100644 index 9fa475ae29..0000000000 --- a/scaletest/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Scale Testing - -This folder contains CLI commands, Terraform code, and scripts to aid in performing load tests of Coder. -At a high level, it performs the following steps: - -- Using the Terraform code in `./terraform`, stands up a preconfigured Google Cloud environment - consisting of a VPC, GKE Cluster, and CloudSQL instance. - > **Note: You must have an existing Google Cloud project available.** -- Creates a dedicated namespace for Coder and installs Coder using the Helm chart in this namespace. -- Configures the Coder deployment with random credentials and a predefined Kubernetes template. - > **Note:** These credentials are stored in `${PROJECT_ROOT}/scaletest/.coderv2/coder.env`. -- Creates a number of workspaces and waits for them to all start successfully. These workspaces - are ephemeral and do not contain any persistent resources. -- Waits for 10 minutes to allow things to settle and establish a baseline. -- Generates web terminal traffic to all workspaces for 30 minutes. -- Directly after traffic generation, captures goroutine and heap snapshots of the Coder deployment. -- Tears down all resources (unless `--skip-cleanup` is specified). - -## Usage - -The main entrypoint is the `scaletest.sh` script. - -```console -$ scaletest.sh --help -Usage: scaletest.sh --name --project --num-workspaces --scenario [--dry-run] [--skip-cleanup] -``` - -### Required arguments - -- `--name`: Name for the loadtest. This is added as a prefix to resources created by Terraform (e.g. `joe-big-loadtest`). -- `--project`: Google Cloud project in which to create the resources (example: `my-loadtest-project`). -- `--num-workspaces`: Number of workspaces to create (example: `10`). -- `--scenario`: Deployment scenario to use (example: `small`). See `terraform/scenario-*.tfvars`. - -> **Note:** In order to capture Prometheus metrics, you must define the environment variables -> `SCALETEST_PROMETHEUS_REMOTE_WRITE_USER` and `SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD`. - -### Optional arguments - -- `--dry-run`: Do not perform any action and instead print what would be executed. -- `--skip-cleanup`: Do not perform any cleanup. You will be responsible for deleting any resources this creates. - -### Environment Variables - -All of the above arguments may be specified as environment variables. Consult the script for details. - -### Prometheus Metrics - -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 - -A scenario defines a number of variables that override the default Terraform variables. -A number of existing scenarios are provided in `scaletest/terraform/scenario-*.tfvars`. - -For example, `scenario-small.tfvars` includes the following variable definitions: - -```hcl -nodepool_machine_type_coder = "t2d-standard-2" -nodepool_machine_type_workspaces = "t2d-standard-2" -coder_cpu = "1000m" # Leaving 1 CPU for system workloads -coder_mem = "4Gi" # Leaving 4GB for system workloads -``` - -To create your own scenario, simply add a new file `terraform/scenario-$SCENARIO_NAME.tfvars`. -In this file, override variables as required, consulting `vars.tf` as needed. -You can then use this scenario by specifying `--scenario $SCENARIO_NAME`. -For example, if your scenario file were named `scenario-big-whopper2x.tfvars`, you would specify -`--scenario=big-whopper2x`. - -## Utility scripts - -A number of utility scripts are provided in `lib`, and are used by `scaletest.sh`: - -- `coder_shim.sh`: a convenience script to run the `coder` binary with a predefined config root. - This is intended to allow running Coder CLI commands against the loadtest cluster without - modifying a user's existing Coder CLI configuration. -- `coder_init.sh`: Performs first-time user setup of an existing Coder instance, generating - a random password for the admin user. The admin user is named `admin@coder.com` by default. - Credentials are written to `scaletest/.coderv2/coder.env`. -- `coder_workspacetraffic.sh`: Runs traffic generation against the loadtest cluster and creates - a monitoring manifest for the traffic generation pod. This pod will restart automatically - after the traffic generation has completed. - -## Grafana Dashboard - -A sample Grafana dashboard is provided in `scaletest_dashboard.json`. This dashboard is intended -to be imported into an existing Grafana instance. It provides a number of useful metrics: - -- **Control Plane Resources**: CPU, memory, and network usage for the Coder deployment, as well as the number of pod restarts. -- **Database**: Rows inserted/updated/deleted/returned, active connections, and transactions per second. Fine-grained `sqlQuerier` metrics are provided for Coder's database as well, broken down my query method. -- **HTTP requests**: Number of HTTP requests per second, broken down by status code and path. -- **Workspace Resources**: CPU, memory, and network usage for all workspaces. -- **Workspace Agents**: Workspace agent network usage, connection latency, and number of active connections. -- **Workspace Traffic**: Statistics related to workspace traffic generation. -- **Internals**: Provisioner job timings, concurrency, workspace builds, and AuthZ duration. - -A subset of these metrics may be useful for a production deployment, but some are only useful -for load testing. - -> **Note:** in particular, `sqlQuerier` metrics produce a large number of time series and may cause -> increased charges in your metrics provider. diff --git a/scaletest/scaletest.sh b/scaletest/scaletest.sh deleted file mode 100755 index dd0a6cb4f4..0000000000 --- a/scaletest/scaletest.sh +++ /dev/null @@ -1,240 +0,0 @@ -#!/usr/bin/env bash - -[[ -n ${VERBOSE:-} ]] && set -x -set -euo pipefail - -PROJECT_ROOT="$(git rev-parse --show-toplevel)" -# shellcheck source=scripts/lib.sh -source "${PROJECT_ROOT}/scripts/lib.sh" - -DRY_RUN="${DRY_RUN:-0}" -SCALETEST_NAME="${SCALETEST_NAME:-}" -SCALETEST_NUM_WORKSPACES="${SCALETEST_NUM_WORKSPACES:-}" -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}" -SCALETEST_TRAFFIC_TICK_INTERVAL="${SCALETEST_TRAFFIC_TICK_INTERVAL:-10s}" -SCALETEST_DESTROY="${SCALETEST_DESTROY:-0}" - -script_name=$(basename "$0") -args="$(getopt -o "" -l create-concurrency:,destroy,dry-run,help,name:,num-workspaces:,project:,scenario:,skip-cleanup,traffic-bytes-per-tick:,traffic-tick-interval:, -- "$@")" -eval set -- "$args" -while true; do - case "$1" in - --create-concurrency) - SCALETEST_CREATE_CONCURRENCY="$2" - shift 2 - ;; - --destroy) - SCALETEST_DESTROY=1 - shift - ;; - --dry-run) - DRY_RUN=1 - shift - ;; - --help) - echo "Usage: $script_name --name --project --num-workspaces --scenario [--create-concurrency ] [--destroy] [--dry-run] [--skip-cleanup] [--traffic-bytes-per-tick ] [--traffic-tick-interval ]" - exit 1 - ;; - --name) - SCALETEST_NAME="$2" - shift 2 - ;; - --num-workspaces) - SCALETEST_NUM_WORKSPACES="$2" - shift 2 - ;; - --project) - SCALETEST_PROJECT="$2" - shift 2 - ;; - --scenario) - SCALETEST_SCENARIO="$2" - shift 2 - ;; - --skip-cleanup) - SCALETEST_SKIP_CLEANUP=1 - shift - ;; - --traffic-bytes-per-tick) - SCALETEST_TRAFFIC_BYTES_PER_TICK="$2" - shift 2 - ;; - --traffic-tick-interval) - SCALETEST_TRAFFIC_TICK_INTERVAL="$2" - shift 2 - ;; - --) - shift - break - ;; - *) - error "Unrecognized option: $1" - ;; - esac -done - -dependencies gcloud kubectl terraform - -if [[ -z "${SCALETEST_NAME}" ]]; then - echo "Must specify --name" - exit 1 -fi - -if [[ -z "${SCALETEST_PROJECT}" ]]; then - echo "Must specify --project" - exit 1 -fi - -if [[ -z "${SCALETEST_NUM_WORKSPACES}" ]]; then - echo "Must specify --num-workspaces" - exit 1 -fi - -if [[ -z "${SCALETEST_SCENARIO}" ]]; then - echo "Must specify --scenario" - exit 1 -fi - -if [[ -z "${SCALETEST_PROMETHEUS_REMOTE_WRITE_USER}" ]] || [[ -z "${SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD}" ]]; then - echo "SCALETEST_PROMETHEUS_REMOTE_WRITE_USER or SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD not specified." - echo "No prometheus metrics will be collected!" - read -p "Continue (y/N)? " -n1 -r - if [[ "${REPLY}" != [yY] ]]; then - exit 1 - fi -fi - -SCALETEST_SCENARIO_VARS="${PROJECT_ROOT}/scaletest/terraform/scenario-${SCALETEST_SCENARIO}.tfvars" -if [[ ! -f "${SCALETEST_SCENARIO_VARS}" ]]; then - echo "Scenario ${SCALETEST_SCENARIO_VARS} not found." - echo "Please create it or choose another scenario:" - find "${PROJECT_ROOT}/scaletest/terraform" -type f -name 'scenario-*.tfvars' - exit 1 -fi - -if [[ "${SCALETEST_SKIP_CLEANUP}" == 1 ]]; then - log "WARNING: you told me to not clean up after myself, so this is now your job!" -fi - -CONFIG_DIR="${PROJECT_ROOT}/scaletest/.coderv2" -if [[ -d "${CONFIG_DIR}" ]] && files=$(ls -qAH -- "${CONFIG_DIR}") && [[ -z "$files" ]]; then - echo "Cleaning previous configuration" - maybedryrun "$DRY_RUN" rm -fv "${CONFIG_DIR}/*" -fi -maybedryrun "$DRY_RUN" mkdir -p "${CONFIG_DIR}" - -SCALETEST_SCENARIO_VARS="${PROJECT_ROOT}/scaletest/terraform/scenario-${SCALETEST_SCENARIO}.tfvars" -SCALETEST_SECRETS="${PROJECT_ROOT}/scaletest/terraform/secrets.tfvars" -SCALETEST_SECRETS_TEMPLATE="${PROJECT_ROOT}/scaletest/terraform/secrets.tfvars.tpl" - -log "Writing scaletest secrets to file." -SCALETEST_NAME="${SCALETEST_NAME}" \ - SCALETEST_PROJECT="${SCALETEST_PROJECT}" \ - SCALETEST_PROMETHEUS_REMOTE_WRITE_USER="${SCALETEST_PROMETHEUS_REMOTE_WRITE_USER}" \ - SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD="${SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD}" \ - envsubst <"${SCALETEST_SECRETS_TEMPLATE}" >"${SCALETEST_SECRETS}" - -pushd "${PROJECT_ROOT}/scaletest/terraform" - -echo "Initializing terraform." -maybedryrun "$DRY_RUN" terraform init - -echo "Setting up infrastructure." -maybedryrun "$DRY_RUN" terraform apply --var-file="${SCALETEST_SCENARIO_VARS}" --var-file="${SCALETEST_SECRETS}" --var state=started --auto-approve - -if [[ "${DRY_RUN}" != 1 ]]; then - SCALETEST_CODER_URL=$(<"${CONFIG_DIR}/url") -else - SCALETEST_CODER_URL="http://coder.dryrun.local:3000" -fi -KUBECONFIG="${PROJECT_ROOT}/scaletest/.coderv2/${SCALETEST_NAME}-cluster.kubeconfig" -echo "Waiting for Coder deployment at ${SCALETEST_CODER_URL} to become ready" -max_attempts=10 -for attempt in $(seq 1 $max_attempts); do - maybedryrun "$DRY_RUN" curl --silent --fail --output /dev/null "${SCALETEST_CODER_URL}/api/v2/buildinfo" - curl_status=$? - if [[ $curl_status -eq 0 ]]; then - break - fi - if attempt -eq $max_attempts; then - echo - echo "Coder deployment failed to become ready in time!" - exit 1 - fi - echo "Coder deployment not ready yet (${attempt}/${max_attempts}), sleeping 3 seconds" - maybedryrun "$DRY_RUN" sleep 3 -done - -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" exp scaletest create-workspaces \ - --count "${SCALETEST_NUM_WORKSPACES}" \ - --template=kubernetes \ - --concurrency "${SCALETEST_CREATE_CONCURRENCY}" \ - --no-cleanup - -echo "Sleeping 10 minutes to establish a baseline measurement." -maybedryrun "$DRY_RUN" sleep 600 - -echo "Sending traffic to workspaces" -maybedryrun "$DRY_RUN" "${PROJECT_ROOT}/scaletest/lib/coder_workspacetraffic.sh" \ - --name "${SCALETEST_NAME}" \ - --traffic-bytes-per-tick "${SCALETEST_TRAFFIC_BYTES_PER_TICK}" \ - --traffic-tick-interval "${SCALETEST_TRAFFIC_TICK_INTERVAL}" -maybedryrun "$DRY_RUN" kubectl --kubeconfig="${KUBECONFIG}" -n "coder-${SCALETEST_NAME}" wait pods coder-scaletest-workspace-traffic --for condition=Ready - -echo "Sleeping 15 minutes for traffic generation" -maybedryrun "$DRY_RUN" sleep 900 - -echo "Starting pprof" -maybedryrun "$DRY_RUN" kubectl -n "coder-${SCALETEST_NAME}" port-forward deployment/coder 6061:6060 & -pfpid=$! -maybedryrun "$DRY_RUN" trap "kill $pfpid" EXIT - -echo "Waiting for pprof endpoint to become available" -pprof_attempt_counter=0 -while ! maybedryrun "$DRY_RUN" timeout 1 bash -c "echo > /dev/tcp/localhost/6061"; do - if [[ $pprof_attempt_counter -eq 10 ]]; then - echo - echo "pprof failed to become ready in time!" - exit 1 - fi - ((pprof_attempt_counter += 1)) - maybedryrun "$DRY_RUN" sleep 3 -done - -echo "Taking pprof snapshots" -maybedryrun "$DRY_RUN" curl --silent --fail --output "${SCALETEST_NAME}-heap.pprof.gz" http://localhost:6061/debug/pprof/heap -maybedryrun "$DRY_RUN" curl --silent --fail --output "${SCALETEST_NAME}-goroutine.pprof.gz" http://localhost:6061/debug/pprof/goroutine -# No longer need to port-forward -maybedryrun "$DRY_RUN" kill "$pfpid" -maybedryrun "$DRY_RUN" trap - EXIT - -if [[ "${SCALETEST_SKIP_CLEANUP}" == 1 ]]; then - echo "Leaving resources up for you to inspect." - echo "Please don't forget to clean up afterwards:" - echo "cd terraform && terraform destroy --var-file=${SCALETEST_SCENARIO_VARS} --var-file=${SCALETEST_SECRETS} --auto-approve" - exit 0 -fi - -if [[ "${SCALETEST_DESTROY}" == 1 ]]; then - echo "Destroying infrastructure" - maybedryrun "$DRY_RUN" terraform destroy --var-file="${SCALETEST_SCENARIO_VARS}" --var-file="${SCALETEST_SECRETS}" --auto-approve -else - echo "Scaling down infrastructure" - maybedryrun "$DRY_RUN" terraform apply --var-file="${SCALETEST_SCENARIO_VARS}" --var-file="${SCALETEST_SECRETS}" --var state=stopped --auto-approve -fi diff --git a/scaletest/terraform/action/.gitignore b/scaletest/terraform/action/.gitignore deleted file mode 100644 index c45cf41694..0000000000 --- a/scaletest/terraform/action/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.tfvars diff --git a/scaletest/terraform/action/cf_dns.tf b/scaletest/terraform/action/cf_dns.tf deleted file mode 100644 index 126c35c12c..0000000000 --- a/scaletest/terraform/action/cf_dns.tf +++ /dev/null @@ -1,21 +0,0 @@ -data "cloudflare_zone" "domain" { - name = var.cloudflare_domain -} - -resource "cloudflare_record" "coder" { - for_each = local.deployments - zone_id = data.cloudflare_zone.domain.zone_id - name = "${each.value.subdomain}.${var.cloudflare_domain}" - content = google_compute_address.coder[each.key].address - type = "A" - ttl = 3600 -} - -resource "cloudflare_record" "coder_wildcard" { - for_each = local.deployments - zone_id = data.cloudflare_zone.domain.id - name = each.value.wildcard_subdomain - content = cloudflare_record.coder[each.key].name - type = "CNAME" - ttl = 3600 -} diff --git a/scaletest/terraform/action/coder_helm_values.tftpl b/scaletest/terraform/action/coder_helm_values.tftpl deleted file mode 100644 index 3fc8d5dfd4..0000000000 --- a/scaletest/terraform/action/coder_helm_values.tftpl +++ /dev/null @@ -1,120 +0,0 @@ -coder: - workspaceProxy: ${workspace_proxy} - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: "cloud.google.com/gke-nodepool" - operator: "In" - values: ["${node_pool}"] - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchExpressions: - - key: "app.kubernetes.io/instance" - operator: "In" - values: ["${release_name}"] - env: - %{~ if workspace_proxy ~} - - name: "CODER_ACCESS_URL" - value: "${access_url}" - - name: "CODER_WILDCARD_ACCESS_URL" - value: "${wildcard_access_url}" - - name: CODER_PRIMARY_ACCESS_URL - value: "${primary_url}" - - name: CODER_PROXY_SESSION_TOKEN - valueFrom: - secretKeyRef: - key: token - name: "${proxy_token}" - %{~ endif ~} - %{~ if provisionerd ~} - - name: "CODER_URL" - value: "${access_url}" - - name: "CODER_PROVISIONERD_TAGS" - value: "scope=organization,deployment=${deployment}" - - name: "CODER_PROVISIONER_DAEMON_NAME" - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: "CODER_CONFIG_DIR" - value: "/tmp/config" - %{~ endif ~} - %{~ if !workspace_proxy && !provisionerd ~} - - name: "CODER_ACCESS_URL" - value: "${access_url}" - - name: "CODER_WILDCARD_ACCESS_URL" - value: "${wildcard_access_url}" - - name: "CODER_PG_CONNECTION_URL" - valueFrom: - secretKeyRef: - name: "${db_secret}" - key: url - - name: "CODER_PROVISIONER_DAEMONS" - value: "0" - - name: CODER_PROVISIONER_DAEMON_PSK - valueFrom: - secretKeyRef: - key: psk - name: "${provisionerd_psk}" - - name: "CODER_PROMETHEUS_COLLECT_AGENT_STATS" - value: "true" - - name: "CODER_PROMETHEUS_COLLECT_DB_METRICS" - value: "true" - - name: "CODER_PPROF_ENABLE" - value: "true" - %{~ endif ~} - - name: "CODER_CACHE_DIRECTORY" - value: "/tmp/coder" - - name: "CODER_TELEMETRY_ENABLE" - value: "false" - - name: "CODER_LOGGING_HUMAN" - value: "/dev/null" - - name: "CODER_LOGGING_STACKDRIVER" - value: "/dev/stderr" - - name: "CODER_PROMETHEUS_ENABLE" - value: "true" - - name: "CODER_VERBOSE" - value: "true" - - name: "CODER_EXPERIMENTS" - value: "${experiments}" - - name: "CODER_DANGEROUS_DISABLE_RATE_LIMITS" - value: "true" - - name: "CODER_DANGEROUS_ALLOW_PATH_APP_SITE_OWNER_ACCESS" - value: "true" - image: - repo: ${image_repo} - tag: ${image_tag} - replicaCount: "${replicas}" - resources: - requests: - cpu: "${cpu_request}" - memory: "${mem_request}" - limits: - cpu: "${cpu_limit}" - memory: "${mem_limit}" - securityContext: - readOnlyRootFilesystem: true - %{~ if !provisionerd ~} - service: - enable: true - sessionAffinity: None - loadBalancerIP: "${ip_address}" - %{~ endif ~} - volumeMounts: - - mountPath: "/tmp" - name: cache - readOnly: false - volumes: - - emptyDir: - sizeLimit: 1024Mi - name: cache - %{~ if !provisionerd ~} - tls: - secretNames: - - "${tls_secret_name}" - %{~ endif ~} diff --git a/scaletest/terraform/action/coder_proxies.tf b/scaletest/terraform/action/coder_proxies.tf deleted file mode 100644 index 6af3ef82bb..0000000000 --- a/scaletest/terraform/action/coder_proxies.tf +++ /dev/null @@ -1,102 +0,0 @@ -data "http" "coder_healthy" { - url = local.deployments.primary.url - // Wait up to 5 minutes for DNS to propagate - retry { - attempts = 30 - min_delay_ms = 10000 - } - - lifecycle { - postcondition { - condition = self.status_code == 200 - error_message = "${self.url} returned an unhealthy status code" - } - } - - depends_on = [helm_release.coder_primary, cloudflare_record.coder["primary"]] -} - -resource "null_resource" "api_key" { - provisioner "local-exec" { - interpreter = ["/bin/bash", "-c"] - command = < ${path.module}/.coderv2/session_token - -api_key=$(curl '${local.deployments.primary.url}/api/v2/users/me/keys/tokens' \ - -H "Coder-Session-Token: $${session_token}" \ - --data-raw '{"token_name":"terraform","scope":"all"}' \ - --insecure --silent | jq -r .key) - -echo -n $${api_key} > ${path.module}/.coderv2/api_key -EOF - } - - depends_on = [data.http.coder_healthy] -} - -data "local_file" "api_key" { - filename = "${path.module}/.coderv2/api_key" - depends_on = [null_resource.api_key] -} - -resource "null_resource" "license" { - provisioner "local-exec" { - interpreter = ["/bin/bash", "-c"] - command = < ${path.module}/.coderv2/europe_proxy_token -EOF - } - - depends_on = [null_resource.license] -} - -data "local_file" "europe_proxy_token" { - filename = "${path.module}/.coderv2/europe_proxy_token" - depends_on = [null_resource.europe_proxy_token] -} - -resource "null_resource" "asia_proxy_token" { - provisioner "local-exec" { - interpreter = ["/bin/bash", "-c"] - command = < ${path.module}/.coderv2/asia_proxy_token -EOF - } - - depends_on = [null_resource.license] -} - -data "local_file" "asia_proxy_token" { - filename = "${path.module}/.coderv2/asia_proxy_token" - depends_on = [null_resource.asia_proxy_token] -} diff --git a/scaletest/terraform/action/coder_templates.tf b/scaletest/terraform/action/coder_templates.tf deleted file mode 100644 index d27c25844b..0000000000 --- a/scaletest/terraform/action/coder_templates.tf +++ /dev/null @@ -1,340 +0,0 @@ -resource "local_file" "kubernetes_template" { - filename = "${path.module}/.coderv2/templates/kubernetes/main.tf" - content = <