Deploy OctoPerf On-Premise Infra on Kubernetes¶
This tutorial installs OctoPerf On-Premise Infra on a Kubernetes cluster with the OctoPerf Helm charts, then registers a Kubernetes agent that runs the load generators as pods of the same cluster. It uses minikube, a single-node cluster on your own computer, to try the charts before installing them on a real cluster.
Prerequisites¶
This tutorial requires:
- a computer running Linux with at least
4CPUs and8 GBof RAM available for the cluster, - Docker, used by minikube to run the Kubernetes node,
- minikube,
- kubectl, to interact with the cluster,
- Helm
3, to install the charts, gitandmake.
It also supposes you know the basic Kubernetes concepts: pods, deployments, services and ingresses.
Overview¶
The helm-charts repository provides two charts:
| Chart | What it installs |
|---|---|
enterprise-edition |
The OctoPerf server: backend, web UI, MCP server, documentation and an Elasticsearch database |
kubernetes-agent |
A Kubernetes agent: it connects to the server and starts each load generator as a pod of the cluster |
The ingresses of the enterprise-edition chart are served by a Traefik v3 ingress controller. The minikube example of the chart installs it for you.
The tutorial goes through these steps:
- Start a minikube cluster,
- Install Traefik and OctoPerf with the minikube example of the
enterprise-editionchart, - Create an account and an on-premise provider in the web UI,
- Install the
kubernetes-agentchart with the Helm command that OctoPerf gives, - Validate a Virtual User and launch a test on the agent.
Start Minikube¶
Start a cluster with enough resources for OctoPerf and its load generators, for example 8 CPUs and 16 GB of memory:
minikube start --driver=docker --cpus=8 --memory=16g
Then get the IP of the minikube node:
minikube ip
192.168.49.2
With the docker driver, the IP is 192.168.49.2. The minikube example of the chart reaches OctoPerf on 192.168.49.2.sslip.io, a name that the public sslip.io DNS service resolves to 192.168.49.2. Your browser, the agent and the other pods of the cluster all use this address.
Info
If minikube ip returns another IP, replace 192.168.49.2 with it in the values.yaml file of the example (see Install OctoPerf).
The ingress addon of minikube installs another ingress controller (ingress-nginx). Make sure it is disabled:
minikube addons disable ingress
Install OctoPerf¶
Clone the helm-charts repository and go to the minikube example of the enterprise-edition chart:
git clone https://github.com/OctoPerf/helm-charts.git
cd helm-charts/enterprise-edition/examples/minikube
make install
make install runs two steps:
- It enables the
default-storageclassandstorage-provisioneraddons of minikube, for the persistent volume of Elasticsearch, and installs Traefik with its official Helm chart and the settings oftraefik-values.yaml. Traefik listens on port80of the minikube node, - It installs the
enterprise-editionchart in theoctoperfnamespace, with the settings ofvalues.yaml.
The values.yaml of the example sets the public address of the server and the Elasticsearch connection:
mcpServer:
enabled: true
applicationYml: |-
server:
hostname: 192.168.49.2.sslip.io
public:
port: 80
backend:
applicationYml: |-
server:
hostname: 192.168.49.2.sslip.io
public:
port: 80
elasticsearch:
hostname: elasticsearch-master-headless
# Must match elasticsearch password
password: "0ct0P3rf"
ingress:
enabled: true
hosts:
- 192.168.49.2.sslip.io
The applicationYml blocks are the application.yml of the backend and of the MCP server: any setting of the server can be added there. The example also disables the documentation and the utility server, and gives Elasticsearch a single node with a small volume.
The first start takes a few minutes, while the cluster downloads the images. Check the pods of the octoperf namespace:
kubectl -n octoperf get pods
NAME READY STATUS RESTARTS AGE
elasticsearch-master-0 1/1 Running 0 3m
enterprise-edition-backend-0 1/1 Running 1 3m
enterprise-edition-frontend-7fb545c9c7-rdc6s 1/1 Running 0 3m
enterprise-edition-mcp-server-b57668fd9-m85wd 1/1 Running 0 2m
The backend may restart once and the MCP server a few times while Elasticsearch and the backend start: this is expected. Once all the pods are ready, open http://192.168.49.2.sslip.io/ui in your web browser.
Info
The configuration of this example is meant for a test on minikube. The README of the enterprise-edition chart lists all the settings, see also Going further.
Create an Account and a Provider¶
OctoPerf On-Premise Infra starts empty. To run a test, you need an account and load generators:
- Sign up to create an account. The server comes with a default license for 50 concurrent virtual users,
- Open Workspace > On Premises and create an On-Premise provider, for example named
Minikube, with itsdefaultlocation, - At the end of the wizard, open the Add Agent dialog, select the location, go to the Installation step and choose Kubernetes.
The token is masked on the screen, the command copied with Copy Command holds it. The token identifies the provider, the location and the name of the agent.
Install the Kubernetes Agent¶
In a terminal, run the two commands of the Installation step:
- Check Helm 3 or later and access to the cluster: it prints the version of Helm and the address of the minikube cluster,
- Install OctoPerf agent: it adds the OctoPerf chart repository, then installs the
kubernetes-agentchart in theoctoperfnamespace, next to OctoPerf. Its server URL is the address of the minikube example,http://192.168.49.2.sslip.io.
The copied command looks like this:
helm repo add octoperf https://helm.octoperf.com --force-update
helm install red-john-smith octoperf/kubernetes-agent \
--namespace octoperf --create-namespace \
--set token='<token>' \
--set serverUrl='http://192.168.49.2.sslip.io'
The agent appears in the Agents table of the Providers page after a few seconds. Click Refresh Agents if it does not:
Info
With the docker driver of minikube, the agent reports the memory of the host computer, not the memory given to minikube. The load generators are sized with the Amount of memory per agent in MB of the provider (see Memory configuration): keep it below the memory of the minikube node.
Run a Test¶
The agent is now ready to run load generators:
- Validate a Virtual User in the location of the provider: the agent starts a load generator pod, runs one iteration and deletes the pod,
- Create a scenario that uses this location, then launch it. The scenario check of the launch wizard tells whether the agents have enough capacity for the load.
During the test, the load generator runs as a pod named after the agent, next to the agent pod:
kubectl -n octoperf get pods
NAME READY STATUS RESTARTS AGE
enterprise-edition-backend-0 1/1 Running 0 6m
kubernetes-agent-684bfcd869-vk9gl 1/1 Running 0 44m
yellow-curt-johns-trev 1/1 Running 0 26s
The agent deletes the load generator pods at the end of the test.
Going Further¶
Before installing the charts on a production cluster, review these settings of the enterprise-edition chart:
- the public hostname, in
ingress.hostsand in theapplicationYmlof the backend and of the MCP server, and TLS on the Traefik side, - the request read timeout of Traefik,
60sby default, to raise for the upload of large JMeter projects and CSV files, - Elasticsearch: the cluster of the chart with several nodes and persistent volumes, or an existing cluster with
elasticsearch.enabled: false, - your license file, under
backend.licenseFile.
For the agents:
- install one Kubernetes agent per node that runs load generators: an agent only starts pods on its own node. From the chart
18.0.1, several agents share a cluster, each one on its own node. Reopen the Add Agent dialog for each agent: a command run twice gives two agents the same name, - uninstall an agent with
helm uninstall <agent name> --namespace octoperf, see Stop an agent, - set the resources, tolerations, image pull secrets and security context of the load generator pods in the values of the kubernetes-agent chart, see Kubernetes agent.
When upgrading from an earlier version, read the upgrade procedure and the migration guide: from 18.0.0, the chart uses Traefik instead of ingress-nginx, and the agents must be installed again with a new token.
To remove the test installation, delete the minikube cluster:
minikube delete


