-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
32 lines (26 loc) · 922 Bytes
/
Copy pathmain.tf
File metadata and controls
32 lines (26 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module "loadtest" {
# https://registry.terraform.io/modules/marcosborges/loadtest-distribuited/aws/latest
source = "marcosborges/loadtest-distribuited/aws"
name = "provision-name"
nodes_size = var.node_size
executor = "locust"
loadtest_dir_source = var.loadtest_dir_source
# LEADER ENTRYPOINT
loadtest_entrypoint = <<-EOT
nohup locust \
-f ${var.locust_plan_filename} \
--web-port=8080 \
--expect-workers=${var.node_size} \
--master > locust-leader.out 2>&1 &
EOT
# NODES ENTRYPOINT
node_custom_entrypoint = <<-EOT
nohup locust \
-f ${var.locust_plan_filename} \
--worker \
--master-host={LEADER_IP} > locust-worker.out 2>&1 &
EOT
subnet_id = data.aws_subnet.current.id
locust_plan_filename = var.locust_plan_filename
ssh_export_pem = false
}