Skip to content

Commit bc97eaa

Browse files
authored
feat(scaletest): add scaletest-runner template (#9662)
Closes #9571
1 parent d0d64bb commit bc97eaa

14 files changed

+956
-1
lines changed

cli/exp_scaletest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
857857
Flag: "use-host-login",
858858
Env: "CODER_SCALETEST_USE_HOST_LOGIN",
859859
Default: "false",
860-
Description: "Use the use logged in on the host machine, instead of creating users.",
860+
Description: "Use the user logged in on the host machine, instead of creating users.",
861861
Value: clibase.BoolOf(&useHostUser),
862862
},
863863
}

scaletest/setup/scaletest-sa.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: scaletest-sa
6+
namespace: coder-big
7+
---
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: Role
10+
metadata:
11+
name: scaletest-role
12+
namespace: coder-big
13+
rules:
14+
- apiGroups:
15+
- ""
16+
resources: ["*"]
17+
verbs:
18+
- get
19+
- list
20+
- watch
21+
- create
22+
- update
23+
- patch
24+
- delete
25+
- deletecollection
26+
---
27+
apiVersion: rbac.authorization.k8s.io/v1
28+
kind: RoleBinding
29+
metadata:
30+
name: scaletest-rolebinding
31+
namespace: coder-big
32+
subjects:
33+
- kind: ServiceAccount
34+
name: scaletest-sa
35+
roleRef:
36+
kind: Role
37+
name: scaletest-role
38+
---
39+
apiVersion: rbac.authorization.k8s.io/v1
40+
kind: RoleBinding
41+
metadata:
42+
name: coder-provisioner-podmonitor-rolebinding
43+
namespace: coder-big
44+
subjects:
45+
- kind: ServiceAccount
46+
name: coder-provisioner
47+
roleRef:
48+
kind: Role
49+
name: coder-podmonitor
50+
---
51+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This image is used to run scaletest jobs and, although it is inside
2+
# the template directory, it is built separately and pushed to
3+
# gcr.io/coder-dev-1/scaletest-runner:latest.
4+
#
5+
# Future improvements will include versioning and including the version
6+
# in the template push.
7+
8+
FROM codercom/enterprise-base:ubuntu
9+
10+
ARG DEBIAN_FRONTEND=noninteractive
11+
12+
USER root
13+
14+
# TODO(mafredri): Remove unneeded dependencies once we have a clear idea of what's needed.
15+
RUN wget --quiet -O /tmp/terraform.zip https://releases.hashicorp.com/terraform/1.5.7/terraform_1.5.7_linux_amd64.zip \
16+
&& unzip /tmp/terraform.zip -d /usr/local/bin \
17+
&& rm /tmp/terraform.zip \
18+
&& terraform --version
19+
20+
RUN wget --quiet -O /tmp/envsubst "https://github.com/a8m/envsubst/releases/download/v1.2.0/envsubst-$(uname -s)-$(uname -m)" \
21+
&& chmod +x /tmp/envsubst \
22+
&& mv /tmp/envsubst /usr/local/bin
23+
24+
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
25+
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
26+
&& apt-get update \
27+
&& apt-get install --yes \
28+
google-cloud-cli \
29+
jq \
30+
kubectl \
31+
zstd \
32+
&& gcloud --version \
33+
&& kubectl version --client \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
USER coder
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Scaletest Runner
3+
description: Run a scaletest.
4+
tags: [local]
5+
---
6+
7+
# Scaletest Runner
8+
9+
Run a scaletest.

0 commit comments

Comments
 (0)