Running Virtual Services on Private Locations

After you have created a virtual service, you can configure it to run on a private location.

 

  1. Navigate to the Service Virtualization tab and click Virtual Services.

  2. 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.

  3. If you plan to run the virtual service in a private location, select a preferred port in the Port field.
    preferred-port.png

Virtual Services on Private Locations using Docker

On the Parameters tab of a mock service, you can configure authentication:

  1. Select an SSL Authentication type:

    • No Authentication (default)

    • 1-way SSL

    • 2-way SSL

  2. If you selected SSL:
    1. Select an existing Keystore or upload a new one.
    2. 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 a private 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.
To update the preferred port for a virtual service running in a Docker-based private location, stop the running virtual service, update the existing preferred port to the new port number, and then run the virtual service again. If the port is available, it will be assigned to the virtual service.

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.
    You can view the Service ID in the Service drop-down list and copy it to clipboard.

    show-service-id.png
  • Port

    8080 for transaction virtual services.
  • Namespace

    Your Kubernetes namespace.
  • Sub-domain

    Configured as a part of an agent set up.
Virtual Service names can be more than 40 characters. If the first 40 characters of the name conflict with any other existing virtual service name, a unique ID is added to the endpoint in the following format:
http(s)://(mock-name[40])(some uid[4])(serviceid[9])-<port>-<namespace>.<sub-domain>
In a very rare case for virtual service deployments in a private cloud: If you specify a virtual service name to be a lowercase alphanumeric string with 128-character length, it is treated as an encoded string and the old format for endpoints is used to support backward compatibility.
The old format for Transaction virtual services is the following:
http(s)://servicemock<mock_id>-8080-<k8s_namespace>.<sub-domain>