Closed dsteindo closed 2 years ago
If all you need is to vary the node_index
param, you can probably use the ${count.index}
like what the sample did with the worker name.
resource "azurerm_container_group" "jmeter_workers" {
count = var.JMETER_WORKERS_COUNT
name = "${var.PREFIX}-worker${count.index}"
Thank you for your reply @devlie
We updated the main.tf file section resource "azurerm_container_group" "jmeter_workers"
commands = [
"/bin/sh",
"-c",
"cp -r /jmeter/* .; /entrypoint.sh -s -J server.rmi.ssl.disable=true -Djava.rmi.server.hostname=$(ifconfig eth0 | grep 'inet addr:' | awk '{gsub(\"addr:\", \"\"); print $2}') -Jnode_index=${count.index} -Jusers_per_node=${var.USERS_PER_NODE}",
]
works as a charm :)
Hi there,
I need some help with some specific task.
We need to run 4 worker nodes with each 500 threads = unique users The users will be calculated based on the current thread number and node_index. Also users are unique as we calculate the offset based on the number of users per node and node index.
Here is the script if someone is interested![image](https://user-images.githubusercontent.com/7224159/131343576-0a13106b-9566-4d6a-8331-b2eded32844a.png)
This works fine when running locally with following command for first node:
for second node
How can I make this work with this terraform setup? I need to make sure that every user is unique across all nodes and ideally I do not need to maintain some CSV, as we have the need to vary between test cases and go up to 10000 users as well.
Thank you in Advance!