Using Docker
Last updated
Last updated
In this guide, we will be using to mirror the traffic to HyperTest. We will install and start Goreplay in your itself.
Update your application's Dockerfile as per the below example or create a new one
application_port: <port on which your app is running>
hypertest_logger_url: <hypertest-vm-ip>:<hypertest-logger-port> or <hypertest_service_logger_ingress_url>
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
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.
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.