Recording HTTP traffic in Istio

Disclaimer: This release contains access to the recording of the HTTP traffic in Istio on Rational® Test Automation Server from Rational® Integration Tester as a Tech Preview feature. The Tech Preview is intended for you to view the capabilities of virtualized services offered by Rational® Test Automation 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. IBM provides the information without obligation of support and "as is" without warranty of any kind.

You can in combination with Rational® Test Automation 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 Rational® Test Automation Server:
  • Installed Rational® Test Automation Server with the demo configuration. Refer to the Installation of Rational® Test Automation Server topics in the Server documentation.
  • Installed the sample Bookinfo application into a namespace called bookinfo in the same Kubernetes cluster as Rational® Test Automation 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 Rational® Test Automation Server execution service account test-system:rockstar-execution. This rolebinding allows Rational® Test Automation 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 Rational® Integration Tester:
  • Configured your user offline token that you generated on Rational® Test Automation Server in the Server Settings tab in Rational® Integration Tester so that Rational® Integration Tester can access Rational® Test Automation Server. See Accessing Rational Test Automation 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 Rational® Test Automation 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 is displayed.

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

    As the service hostname 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 Rational® Integration Tester.
  5. Click the Recording tab, and select the Istio option.

    Rational® Integration Tester 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 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.