Recording HTTP traffic in Istio

Disclaimer: This release contains access to the recording of the HTTP traffic in Istio on HCL OneTest Server from HCL OneTest API as a Tech Preview feature. The Tech Preview is intended for you to view the capabilities of virtualized services offered by HCL OneTest Server, and to provide your feedback to the product team. You are permitted to use the information only for evaluation purposes and not for use in a production environment. HCL provides the information without obligation of support and "as is" without warranty of any kind.

You can in combination with HCL OneTest Server, which is installed with the demo configuration, record HTTP requests and responses that are sent and received by services deployed in the Istio services mesh.

Before you begin

You must have completed the following tasks on HCL OneTest Server:
  • Installed HCL OneTest Server with the demo configuration. Refer to the Installation of HCL OneTest Server topics in the Server documentation.
  • Installed the sample Bookinfo application into a namespace called bookinfo in the same Kubernetes cluster as HCL OneTest Server.
    Note: The Bookinfo application in this example task uses a gateway URL as http://www.rtas-bookinfo.com.
  • Created a Kubernetes rolebinding between the cluster role rockstar-execution-istio-test-system and the HCL OneTest Server execution service account test-system:rockstar-execution. This rolebinding allows HCL OneTest Server to manage the required Kubernetes resources in the bookinfo namespace so that the HTTP traffic going through Istio can be recorded.
You must have completed that following tasks in HCL OneTest API:
  • Configured your user offline token that you generated on HCL OneTest Server in the Server Settings tab in HCL OneTest API so that HCL OneTest API can access HCL OneTest Server. See Accessing HCL OneTest Server.

About this task

The sample Bookinfo application is a demo application provided by Istio that demonstrates the various features of Istio. This task first walks you through recording the service to service requests received by the reviews microservice and then through the recording of ingress requests (requests made from outside the cluster, for example from a browser) to the productpage microservice. These recorded messages can then be used to create a stub which can then be run on HCL OneTest Server to virtualize the actual service.

Procedure

  1. Create an HTTP Connection in the Logical View.

    You must enter reviews in the name field. A logical HTTP Connection resource is created and a physical Web Server resource also called reviews is created and bound together in the current environment.

  2. Open the physical Web Server resource by right clicking the logical HTTP Connection, and then selecting Physical Resource.

    The Web Server dialog box is displayed.

  3. Enter the name of the service as reviews in the Host field.

    As the service host name is resolved against the namespace it is contained in, you can enter the alternate names of the service. For example, reviews.bookinfo, reviews.bookinfo.svc or reviews.bookinfo.svc.cluster.local.

  4. Enter 9080 as the port in the Port field.
    Restriction: The Test Transport action is not supported for Kubernetes services because the web server configured in the settings tab is a service within the Kubernetes cluster and the host and port that are configured are not reachable to HCL OneTest API.
  5. Click the Recording tab, and select the Istio option.

    HCL OneTest API instructs the recording studio to use Istio when recording this transport. The transport is now ready to be used to record the HTTP requests and responses going to the reviews service of the BookInfo application.

  6. Switch to the Recording Studio perspective, and then click the Add monitor button.

    The resource selector dialog box is displayed.

  7. Select the logical HTTP Connection for the reviews service.
  8. Start recording by clicking the Record button.
  9. Open a browser and open the URL http://www.rtas-bookinfo.com/productpage.

Results

You can view a request and response in the Recording Studio.