Deploy the dynamic infrastructure agent
The dynamic infrastructure agent connects your Openshift or Kubernetes cluster to NeoLoad Web through outbound-only connections. This setup is more secure than client-based providers because your cluster doesn't expose inbound API access. Once the agent is running, you can create an agent-based infrastructure provider in NeoLoad Web to automatically provision controllers and load generators for your load tests.
Before you start
Make sure you have the following:
-
A running Openshift or Kubernetes cluster (opens in new tab) version 1.9.0 to 1.30.0.
-
Helm CLI (opens in new tab) version 3.2 or later.
-
A NeoLoad Web long-term access token.
-
Permissions to create namespaces, service accounts, roles, and role bindings in your cluster.
Deploy the agent
Use the Neotys Helm chart to deploy the agent. It configures the agent so that NeoLoad Web can interact with your Kubernetes cluster. To deploy the agent, follow these steps:
-
Add the Neotys Helm repository:
helm repo add neotys https://helm.prod.neotys.com/stable/helm repo update -
Download the values file from the Neotys-Labs GitHub repository (opens in new tab):
wget https://raw.githubusercontent.com/Neotys-Labs/helm-dynamic-infrastructure/master/values-custom.yaml -
Update the values-custom.yaml file with your configuration. For available options, check out Configuration reference.
-
Install the Helm chart:
helm install my-release neotys/nlweb-dynamic-infrastructure --create-namespace -n my-namespace -f ./values-custom.yaml --set agent.neoloadWebApiToken=YOUR_TOKEN
Pass sensitive values like your API token with --set on the command line. Don't store them in the values file.
Create an agent-based infrastructure provider
Once your agent is deployed, create an infrastructure provider for load testing:
-
In NeoLoad Web, go to Settings > Resources > Infrastructure providers.
-
Select Add provider, then select Agent-based.
-
In the Add agent-based infrastructure provider dialog, configure the following:
-
Provider name: Define a name for this provider.
-
Available agents: Select the agent you deployed. The agent appears here once it connects to NeoLoad Web.
-
Namespace: This field is read-only. It displays the Kubernetes namespace where the agent is deployed.
-
-
Select Add.
Your infrastructure provider is now ready. You can select it when you configure dynamic zones for your tests.
Uninstall the agent
To uninstall the agent, run the following command:
helm uninstall my-release -n my-namespace
Configuration reference
This section explains the parameters you can configure in your values-custom.yaml file to customize your agent deployment.
To configure the agent connection to NeoLoad Web and set its identity, use these parameters:
|
Parameter |
Description |
Default |
|---|---|---|
|
agent.neoloadWebApiToken |
NeoLoad Web long-term token. |
— |
|
agent.neoloadWebApiUrl |
The URL to NeoLoad Web API (V3). Verify it matches your environment. |
https://neoload-api.saas.neotys.com |
|
agent.isOpenShiftCluster |
Set to |
false |
|
agent.name |
Name displayed in NeoLoad Web. |
Combination of namespace and release name |
|
agent.uuid |
Unique identifier of the agent. Leave empty to auto-generate. Only set this if you need to reinstall and keep the same agent identity in NeoLoad Web. |
— |
To customize the agent container image or use a specific version, use these parameters:
|
Parameter |
Description |
Default |
|---|---|---|
|
image.agent.repository |
The agent image repository to pull from. |
neotys/neoload-web-dynamic-infrastructure-agent |
|
image.agent.tag |
The agent image tag. |
— |
|
image.agent.pullPolicy |
The agent image pull policy. |
IfNotPresent |
To add custom metadata so you can organize agent resources or integrate the agent with other tools, configure these parameters:
|
Parameter |
Description |
Default |
|---|---|---|
|
neoload.labels.agent |
Add labels to agent resources, for example |
{} |
|
neoload.annotations.deployment.agent |
Add annotations to agent deployment, for example |
{} |
|
neoload.annotations.pod.agent |
Add annotations to agent pod, for example |
{} |
If your cluster pulls controller and load generator images from a private registry, configure these parameters:
|
Parameter |
Description |
Default |
|---|---|---|
|
registryKey.enabled |
Enable registry authentication. |
false |
|
registryKey.registry |
Docker registry URL. |
— |
|
registryKey.username |
Username for registry authentication. |
— |
|
registryKey.password |
Password for registry authentication. Pass this with |
— |
For proxy credentials, create a Kubernetes secret before you install the chart and reference it using the secret name and key parameters. Alternatively, you can pass credentials in plain text, but we recommend that you use secrets for increased security.
If your agent needs to connect through a proxy, configure these parameters:
|
Parameter |
Description |
Default |
|---|---|---|
|
proxy.enabled |
Enable proxy connection. |
false |
|
proxy.host |
Proxy server host. Required parameter. |
— |
|
proxy.port |
Proxy server port. Required parameter. |
— |
|
proxy.user.value |
Proxy username in plain text. |
— |
|
proxy.user.secretName |
Name of an existing Kubernetes secret that contains the proxy username. |
— |
|
proxy.user.secretKey |
Key of the Kubernetes secret with the proxy username. |
— |
|
proxy.password.value |
Proxy password in plain text. |
— |
|
proxy.password.secretName |
Name of an existing Kubernetes secret that contains the proxy password. |
— |
|
proxy.password.secretKey |
Key of the Kubernetes secret with the proxy password. |
— |
When you install the Helm chart, it creates the following resources in your cluster:
-
A namespace called my-namespace.
-
A role called my-release-role with permissions to manage deployments, replicasets, pods, events, and replication controllers.
-
A role binding called my-release-rolebinding.
-
A service account called my-release-sa.
-
A config map called my-release-nlweb-dynamic-infrastructure-agent-config for agent environment variables.
-
A secret called my-release-nlweb-dynamic-infrastructure-nlweb-secrets to store the NeoLoad Web long-term token.
-
A deployment called my-release-nlweb-dynamic-infrastructure-agent for the agent pod.
The agent deployment requires one replica because only one agent with the same ID can connect to NeoLoad Web at a time. Multiple replicas will cause concurrency issues.
What's next?
Now that you've deployed your dynamic infrastructure agent, you can do the following:
-
Configure zones to assign the infrastructure provider to a dynamic zone.
-
Run a test with your dynamic infrastructure.