Using Docker
Find the video guide for below instructions over here.
In this guide, we will be using Goreplay to mirror the traffic to HyperTest. We will install and start Goreplay in your Dockerfile itself.
Update your application's Dockerfile as per the below example or create a new one
1. Required Parameters to run Goreplay:
application_port: <port on which your app is running>
hypertest_logger_url: <hypertest-vm-ip>:<hypertest-logger-port> or <hypertest_service_logger_ingress_url>
2. Dockerfile Changes:
Comment your CMD or ENTRYPOINT line to start your application
Download goreplay binary and extract it
Start Goreplay
Add your entrypoint command to start your application in the end
Only copy the parts from ## copy from this till ## to this. Rest is just sample Dockerfile.
Build a new docker image using the modified Dockerfile. Deploy your application using the new image.
To verify the mirroring setup, hit any api on the application and check for request in "last mirrored requests" section or Session page in HyperTest.
Debug mirroring setup via Goreplay
To debug if goreplay is receiving the traffic from your application, we will output the incoming traffic to stdout, so we can see if Goreplay is receiving requests.
Steps:
Exec into the goreplay container using below command:
if you are running as a docker container use the below command:
2. Run the following command:
The goreplay binary will be in your work directory set in Dockerfile.
Now hit any api on your application and verify if Goreplay is able to receive it.
Last updated