Running Virtual Services on Private Locations
After you have created a virtual service, you can configure it to run on a private location.
-
Navigate to the Service Virtualization tab and click Virtual Services.
-
Under Create Log, enable or disable logging on the Private Location. If enabled, it will create one log file per virtual service on the Private Location, or if the file exists, append the log.
-
If you plan to run the virtual service in a private location, select a preferred port in the Port field.
Virtual Services on Private Locations using Docker
On the Parameters tab of a mock service, you can configure authentication:
-
Select an SSL Authentication type:
-
No Authentication (default)
-
1-way SSL
-
2-way SSL
-
- If you selected SSL:
- Select an existing Keystore or upload a new one.
- Provide the Keystore Password and the password used to access individual keys in the keystore.
(Optional) To define how to identify during SSL/TLS communication using an alias for aprivate key entry
defined in your keystore, select the Alias and provide an Alias Password.
Select a Preferred Port
If you plan to run the virtual service in a private location and you are creating a Docker-based transaction virtual service, you can define a preferred port. If the port is available, it will be assigned to the virtual service.
- If you leave the Port field blank, a port is chosen from the range defined for the Private location. For more information, see Setting Port Range on Your Agent.
- If the preferred port is outside of the defined port range, a notification message is shown and a new port within the defined range has to be entered.
- If an existing service is running on the preferred port already, a notification message appears when you run the virtual service. BlazeMeter then selects the first available port within the defined range.
Virtual Services on Private Locations using Kubernetes
Rules for Endpoints Generated for Kubernetes Virtual Services Deployment
For a private location that uses Kubernetes, the URL format is the following:
http(s)://(mock-name[40])(serviceid[9])-<port>-<namespace>.<sub-domain>
- Virtual Service Name
First 40 lowercase alpha numeric characters of the virtual service name. - Service ID
ID associated with the service name. Service ID is used in the endpoints that are generated after you deploy your virtual service. When you know your service ID, you can predict the format of your virtual service endpoint. - Port
8080 for transaction virtual services. - Namespace
Your Kubernetes namespace. - Sub-domain
Configured as a part of an agent set up.
http(s)://(mock-name[40])(some uid[4])(serviceid[9])-<port>-<namespace>.<sub-domain>
The old format for Transaction virtual services is the following:
http(s)://servicemock<mock_id>-8080-<k8s_namespace>.<sub-domain>