Skip to content

feat: add scaletest load generation infrastructure #15816

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jan 13, 2025
Merged

feat: add scaletest load generation infrastructure #15816

merged 36 commits into from
Jan 13, 2025

Conversation

f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Dec 10, 2024

Closes coder/internal#149

This creates workspaces in each region and runs traffic generation against the workspaces colocated in the region.

@f0ssel f0ssel changed the base branch from main to f0ssel/scaletest December 10, 2024 19:24
Base automatically changed from f0ssel/scaletest to main December 12, 2024 14:28
@f0ssel f0ssel changed the title feat: scaletest load generation infrastructure feat: add scaletest load generation infrastructure Dec 17, 2024
@github-actions github-actions bot added the stale This issue is like stale bread. label Dec 31, 2024
@github-actions github-actions bot closed this Jan 3, 2025
@f0ssel f0ssel reopened this Jan 13, 2025
@f0ssel f0ssel marked this pull request as ready for review January 13, 2025 16:10
@f0ssel f0ssel requested a review from johnstcn January 13, 2025 16:13
@johnstcn johnstcn removed the stale This issue is like stale bread. label Jan 13, 2025
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking on my side 👍 Nice work!

required_providers {
coder = {
source = "coder/coder"
version = "~> 0.23.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update to a newer version of the provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup!

Comment on lines +150 to +168
name = "cli"
image = "${var.coder_image_repo}:${var.coder_image_tag}"
command = [
"/opt/coder",
"--verbose",
"--url=${local.deployments.primary.url}",
"--token=${trimspace(data.local_file.api_key.content)}",
"templates",
"push",
"--directory=/home/coder/template",
"--provisioner-tag=scope=organization",
"--provisioner-tag=deployment=primary",
"--yes",
"kubernetes-primary"
]
volume_mount {
name = "coder-template"
mount_path = "/home/coder/template/main.tf"
sub_path = "main.tf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future enhancement idea: could we use the coderd Terrraform provider for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coderd provider can't be used here because it needs a valid coder token up front, and we don't have one since we create coder in the same apply. We've discussed plans to make this possible in the future but it's currently not possible with the provider.

Comment on lines +142 to +146
kubelet_config {
cpu_manager_policy = ""
cpu_cfs_quota = false
pod_pids_limit = 0
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, what made you need to set this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting drift on created clusters with this set

create = local.traffic_types[each.key].job_timeout
}

depends_on = [time_sleep.wait_baseline, time_sleep.wait_traffic[each.key]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for reviewers: these introduce a transitive dependency on the create-workspaces jobs.

Comment on lines +38 to +41
- name: "CODER_PROVISIONER_DAEMON_NAME"
valueFrom:
fieldRef:
fieldPath: metadata.name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we should add by default to the coder-provisioner Helm chart?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be useful as a default as long as you can override it

@f0ssel f0ssel enabled auto-merge (squash) January 13, 2025 16:55
@f0ssel f0ssel merged commit 0008c13 into main Jan 13, 2025
31 checks passed
@f0ssel f0ssel deleted the f0ssel/loadgen branch January 13, 2025 17:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C210K: Distributed load generator
2 participants