This repo contains a Helm chart that can be used to deploy Daytrader Microservices onto a supported Kubernetes cluster.
When kubernetes cluster is ready,
- Clone the
deploy-daytrader
app in your root node i.e.node-0
. You can use the commandgit clone https://github.com/ssmtariq/deploy-daytrader.git
- Open terminal in
node-0
and change directory todeploy-daytrader
app bycd deploy-daytrader
- [Optional] To change the docker image tag to be deployed
- Open
helm/Chart.yaml
file and update the fieldappVersion
. For instance, defaultappVersion: 4.0.18
toappVersion: optimized
.
- Open
- Check the
.env
file and setAPP_VERSION
which represents the tag in docker-hub for DayTrader microservice imagesREPOSITORY_ROOT
which represents the repository name in docker-hub for DayTrader microservice images
- Open the
helm/values.yaml
file- Update the
cluster->dns
property with dns value (not IP address) of the root nodenode-0
of your kubernetes cluster. Make sure you typed them in lower-case - Update the
image->namespace
with docker-hub repo name (if-required)
- Update the
- Now, to install DayTrader microservices run
sh scripts/install-daytrader.sh
.
Once installed, run sh scripts/port-forward.sh
to forward the daytrader application to http://localhost:5443.
Keep the scripts/port-forward.sh
script running in a terminal and then the daytrader app will be available at your machine at http://localhost:5443/
Try curl https://localhost:5443/
before checking from the web browser
If you run the commands from vscode terminal, also check if the PORT is being forwarded correctly
To update the helm chart or running images, make any changes required to the templates and run sh scripts/upgrade-daytrader.sh
.
To uninstall the application, run sh scripts/uninstall-daytrader.sh
.
- While keeping the script
scripts/port-forward.sh
running open the urlhttps://localhost:5443/
in your browser to browse DayTrader - Save test result in a file for example
kubectl logs --follow -l app=daytrader-portfolios>DT-10K-requests-original-iteration-1.txt
- Go to
Configuration
tab and follow the configuration steps update upto(Re)-populate DayTrader Database
sequantially - Open
Blazemeter
Google Chrome extension (assuming you're using Google chrome browser) and ensure that you are Logged in - On
Blazemeter
start recording - Click the
Test DayTrader Scenario
, then clickQuotes/Trade
and then click the option (button)buy
- Now stop recording in
Blazemeter
and save the test plan as.jmx
file by clickingSave as
option - Open the
.jmx
file in Apache JMeter (currently using version 5.4.3), add 2 listenersView Results Tree
,Summary Report
underThread Group->Test
- Set filename to the above listeners just added
- Update Thread Group for
Number of Threads
,Ramp-up period
andLoop Count
as required. For instance 16, 16, and 625 - Now start testing and observe result in
View Results Tree