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-daytraderapp 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-0and change directory todeploy-daytraderapp bycd deploy-daytrader - [Optional] To change the docker image tag to be deployed
- Open
helm/Chart.yamlfile and update the fieldappVersion. For instance, defaultappVersion: 4.0.18toappVersion: optimized.
- Open
- Check the
.envfile and setAPP_VERSIONwhich represents the tag in docker-hub for DayTrader microservice imagesREPOSITORY_ROOTwhich represents the repository name in docker-hub for DayTrader microservice images
- Open the
helm/values.yamlfile- Update the
cluster->dnsproperty with dns value (not IP address) of the root nodenode-0of your kubernetes cluster. Make sure you typed them in lower-case - Update the
image->namespacewith 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.shrunning 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
Configurationtab and follow the configuration steps update upto(Re)-populate DayTrader Databasesequantially - Open
BlazemeterGoogle Chrome extension (assuming you're using Google chrome browser) and ensure that you are Logged in - On
Blazemeterstart recording - Click the
Test DayTrader Scenario, then clickQuotes/Tradeand then click the option (button)buy - Now stop recording in
Blazemeterand save the test plan as.jmxfile by clickingSave asoption - Open the
.jmxfile in Apache JMeter (currently using version 5.4.3), add 2 listenersView Results Tree,Summary ReportunderThread Group->Test - Set filename to the above listeners just added
- Update Thread Group for
Number of Threads,Ramp-up periodandLoop Countas required. For instance 16, 16, and 625 - Now start testing and observe result in
View Results Tree