To deploy your MAR-based Mock Services on a containerized VSE, install a BlazeMeter Virtual Service Environment.
You can install a BlazeMeter Virtual Service Environment on a Kubernetes cluster in a BlazeMeter private location (OPL).
Note: The BlazeMeter Virtual Service Environment feature is not available by default. Contact BlazeMeter support to request access.
Ensure that the server on which you are installing the BlazeMeter Virtual Service Environment adheres to all Kubernetes installation requirements on the Private Location System Requirements page.
A BlazeMeter Virtual Service Environment server also requires an implementation of Ingress Contour version 1.6 or higher.
Create Private Location
The BlazeMeter Virtual Service Environment must be associated with a private location (OPL) and a BlazeMeter agent.
- Click the Gear icon at the top right of the BlazeMeter UI.
- Click Private Location under Workspaces.
If you don't see this option, you don't have the appropriate credentials. Either request to become an admin in your workspace, or work with an administrator to create the private location.
- Click the Add button.
- Name the private location, choose Shared run type, and click Next.
- Select Mock Services and Service Virtualization Bridge under Functionalities, and click Create.
- Click Add Agent.
- Name the agent and click Create Agent.
A window appears that includes a Docker command for running the agent.
- Copy the Docker run command to a text file.
Install BlazeMeter Virtual Service Environment on a Kubernetes Cluster
- Create a Kubernetes deployment YAML file using the following text as a template:
- Refer to the Docker run command copied in the previous procedure, and copy the following values into the corresponding properties in the deployment file:
- Update the following values in the deployment file as needed:
- name: Provide your own cluster name.
- KUBERNETES_WEB_EXPOSE_SUB_DOMAIN: Provide the sub domain to use in all Mock Service URLs, if needed.
kubectl apply -f <deployment file name>Kubernetes creates a cluster based on the deployment file with the necessary components running for a BlazeMeter Virtual Service Environment.
The BlazeMeter Virtual Service Environment should appear on this page.
If the agent is running but you do not see anything on the Environment page, verify that your workspace has access to the BlazeMeter Virtual Service Environment feature.
The BlazeMeter Virtual Service Environment is installed. You can deploy MAR-based Mock Services to it by choosing the private location name as the Location during deployment.
Accept Mock Services Network Traffic on Kubernetes
For a Kubernetes-based deployment of a BlazeMeter Virtual Service Environment, you must perform an additional step to ensure that your Mock Service network traffic is allowed.
Once deployed, each Mock Service is assigned a fully qualified domain name. Kubernetes must have a record of this name to accept the traffic to the Mock Services endpoint.
To accept Mock Services endpoint traffic on Kubernetes, add the Mock Service's fully qualified domain name to the DNS record for your location. For local testing, you could also use the local hosts file, but in most cases, you must add to the DNS record.