- Notifications
You must be signed in to change notification settings - Fork928
docs: use scale testing utility#12643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
23 commits Select commitHold shift + click to select a range
301cf48
deduplicate knowledge scale.md
mtojekbc14264
Merge branch 'main' into 12426-own-scale-tests
mtojekfa60b7c
Upload coder templates
mtojek358f990
make fmt
mtojek51f9f0c
Use mock Grafana url
mtojek4bafa5c
READMEs
mtojek7dc0d5e
More todos
mtojek7df6afe
Move scaletests
mtojek03279ae
Move around templates
mtojek4fc7143
command
mtojekfeb8f9f
WIP
mtojek01c4297
Clusters
mtojeke9b7803
no pod monitor
mtojek04fdb52
Mention graphs
mtojek9a53217
Cian's comments
mtojekd1b0ddc
WIP
mtojekfe4e743
Noted
mtojeke91f036
Fix
mtojekef25826
Merge branch 'main' into 12426-own-scale-tests
mtojeke9189e3
Use template vars
mtojek00eecf5
Add note
mtojek6a69f7b
Fix: nodepool
mtojek8d16090
Try: force make gen
mtojekFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions.github/workflows/ci.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
288 changes: 153 additions & 135 deletionsdocs/admin/scale.md
Large diffs are not rendered by default.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
7 changes: 7 additions & 0 deletionsscaletest/templates/kubernetes-large/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#kubernetes-large | ||
Provisions a large-sized workspace with no persistent storage. | ||
_Note_: It is assumed you will be running workspaces on a dedicated GKE nodepool. | ||
By default, this template sets a node affinity of`cloud.google.com/gke-nodepool` =`big-workspaces`. | ||
The nodepool affinity can be customized with the variable`kubernetes_nodepool_workspaces`. |
88 changes: 88 additions & 0 deletionsscaletest/templates/kubernetes-large/main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
terraform { | ||
required_providers { | ||
coder={ | ||
source="coder/coder" | ||
version="~> 0.7.0" | ||
} | ||
kubernetes={ | ||
source="hashicorp/kubernetes" | ||
version="~> 2.18" | ||
} | ||
} | ||
} | ||
provider"coder" {} | ||
provider"kubernetes" { | ||
config_path=null# always use host | ||
} | ||
variable"kubernetes_nodepool_workspaces" { | ||
description="Kubernetes nodepool for Coder workspaces" | ||
type=string | ||
default="big-workspaces" | ||
} | ||
data"coder_workspace""me" {} | ||
resource"coder_agent""main" { | ||
os="linux" | ||
arch="amd64" | ||
startup_script_timeout=180 | ||
startup_script="" | ||
} | ||
resource"kubernetes_pod""main" { | ||
count=data.coder_workspace.me.start_count | ||
metadata { | ||
name="coder-${lower(data.coder_workspace.me.owner)}-${lower(data.coder_workspace.me.name)}" | ||
namespace="coder-big" | ||
labels={ | ||
"app.kubernetes.io/name"="coder-workspace" | ||
"app.kubernetes.io/instance"="coder-workspace-${lower(data.coder_workspace.me.owner)}-${lower(data.coder_workspace.me.name)}" | ||
} | ||
} | ||
spec { | ||
security_context { | ||
run_as_user="1000" | ||
fs_group="1000" | ||
} | ||
container { | ||
name="dev" | ||
image="docker.io/codercom/enterprise-minimal:ubuntu" | ||
image_pull_policy="Always" | ||
command=["sh","-c",coder_agent.main.init_script] | ||
security_context { | ||
run_as_user="1000" | ||
} | ||
env { | ||
name="CODER_AGENT_TOKEN" | ||
value=coder_agent.main.token | ||
} | ||
resources { | ||
requests={ | ||
"cpu"="4" | ||
"memory"="4Gi" | ||
} | ||
limits={ | ||
"cpu"="4" | ||
"memory"="4Gi" | ||
} | ||
} | ||
} | ||
affinity { | ||
node_affinity { | ||
required_during_scheduling_ignored_during_execution { | ||
node_selector_term { | ||
match_expressions { | ||
key="cloud.google.com/gke-nodepool" | ||
operator="In" | ||
values=["${var.kubernetes_nodepool_workspaces}"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletionsscaletest/templates/kubernetes-medium-greedy/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#kubernetes-medium-greedy | ||
Provisions a medium-sized workspace with no persistent storage. Greedy agent variant. | ||
_Note_: It is assumed you will be running workspaces on a dedicated GKE nodepool. | ||
By default, this template sets a node affinity of`cloud.google.com/gke-nodepool` =`big-workspaces`. | ||
The nodepool affinity can be customized with the variable`kubernetes_nodepool_workspaces`. |
202 changes: 202 additions & 0 deletionsscaletest/templates/kubernetes-medium-greedy/main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
terraform { | ||
required_providers { | ||
coder={ | ||
source="coder/coder" | ||
version="~> 0.7.0" | ||
} | ||
kubernetes={ | ||
source="hashicorp/kubernetes" | ||
version="~> 2.18" | ||
} | ||
} | ||
} | ||
provider"coder" {} | ||
provider"kubernetes" { | ||
config_path=null# always use host | ||
} | ||
variable"kubernetes_nodepool_workspaces" { | ||
description="Kubernetes nodepool for Coder workspaces" | ||
type=string | ||
default="big-workspaces" | ||
} | ||
data"coder_workspace""me" {} | ||
resource"coder_agent""main" { | ||
os="linux" | ||
arch="amd64" | ||
startup_script_timeout=180 | ||
startup_script="" | ||
# Greedy metadata (3072 bytes base64 encoded is 4097 bytes). | ||
metadata { | ||
display_name="Meta 01" | ||
key="01_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 02" | ||
key="0_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 03" | ||
key="03_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 04" | ||
key="04_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 05" | ||
key="05_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 06" | ||
key="06_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 07" | ||
key="07_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 08" | ||
key="08_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 09" | ||
key="09_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 10" | ||
key="10_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 11" | ||
key="11_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 12" | ||
key="12_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 13" | ||
key="13_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 14" | ||
key="14_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 15" | ||
key="15_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
metadata { | ||
display_name="Meta 16" | ||
key="16_meta" | ||
script="dd if=/dev/urandom bs=3072 count=1 status=none | base64" | ||
interval=1 | ||
timeout=10 | ||
} | ||
} | ||
resource"kubernetes_pod""main" { | ||
count=data.coder_workspace.me.start_count | ||
metadata { | ||
name="coder-${lower(data.coder_workspace.me.owner)}-${lower(data.coder_workspace.me.name)}" | ||
namespace="coder-big" | ||
labels={ | ||
"app.kubernetes.io/name"="coder-workspace" | ||
"app.kubernetes.io/instance"="coder-workspace-${lower(data.coder_workspace.me.owner)}-${lower(data.coder_workspace.me.name)}" | ||
} | ||
} | ||
spec { | ||
security_context { | ||
run_as_user="1000" | ||
fs_group="1000" | ||
} | ||
container { | ||
name="dev" | ||
image="docker.io/codercom/enterprise-minimal:ubuntu" | ||
image_pull_policy="Always" | ||
command=["sh","-c",coder_agent.main.init_script] | ||
security_context { | ||
run_as_user="1000" | ||
} | ||
env { | ||
name="CODER_AGENT_TOKEN" | ||
value=coder_agent.main.token | ||
} | ||
resources { | ||
requests={ | ||
"cpu"="2" | ||
"memory"="2Gi" | ||
} | ||
limits={ | ||
"cpu"="2" | ||
"memory"="2Gi" | ||
} | ||
} | ||
} | ||
affinity { | ||
node_affinity { | ||
required_during_scheduling_ignored_during_execution { | ||
node_selector_term { | ||
match_expressions { | ||
key="cloud.google.com/gke-nodepool" | ||
operator="In" | ||
values=["${var.kubernetes_nodepool_workspaces}"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletionsscaletest/templates/kubernetes-medium/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#kubernetes-medium | ||
Provisions a medium-sized workspace with no persistent storage. | ||
_Note_: It is assumed you will be running workspaces on a dedicated GKE nodepool. | ||
By default, this template sets a node affinity of`cloud.google.com/gke-nodepool` =`big-workspaces`. | ||
The nodepool affinity can be customized with the variable`kubernetes_nodepool_workspaces`. |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.