- LodeRunner is the load client that waits for TestRun entries in CosmosDB, and execute those load tests
- LodeRunner.API is a service that creates LoadTestConfig and TestRun entries in CosmosDB for LodeRunner to use in order to execute load tests
- LodeRunner.UI utilizes the LodeRunner.API endpoints to provide a user-friendly interface to create LoadTestConfigs and TestRun entries in CosmosDB
NOTE All components of the loderunner ecosystem have additional functionality that are not listed here
- Bash shell
- Tested on: Visual Studio Codespaces, Mac, Ubuntu, Windows with WSL2)
- Not supported: WSL1 or Cloud Shell
- jq:
sudo apt-get install jq
- tr:
sudo apt-get install translate
- Azure CLI (download)
- Docker CLI (download)
- .NET 5.0 (download)
- Visual Studio Code (optional) (download)
- Open codespaces in https://github.com/retaildevcrews/loderunner
- Verify in the loderunner directory
pwd
- Set the endpoint LodeRunner.UI makes API calls to
- In Codespaces, navigate to the
PORTS
terminal - Identify port
LodeRunner API (32088)
and hover over theLocal Address
- Click on the clipboard icon to copy the local address
- Open
deploy/loderunner/local/4-loderunner-ui.yaml
- Under
env
>name: "LRAPI_DNS"
, set thevalue
to copied LodeRunner.API URL - Prevent accidental commits with
git update-index --assume-unchanged deploy/loderunner/local/4-loderunner-ui.yaml
- In Codespaces, navigate to the
- Set environmental variables with CosmosDB values for K8S generic secret
-
Set CosmosDB:
export LR_DB=LodeRunnerDB
-
Set CosmosDB Collection:
export LR_COL=LodeRunner
-
Set CosmosDB using CosmosDB Emulator running locally:
-
Set CosmosDB URL:
export LR_URL=https://${COSMOS_EMULATOR_NAME}.documents.azure.com
-
Set CosmosDB Key:
export COSMOS_KEY_CMD="docker top ${COSMOS_EMULATOR_NAME} |grep -oP '\/Key=(\w.*) '|head -n 1 | awk -F' ' '{print \$1}' | awk -F 'Key=' '{print \$2}'" export LR_KEY=$(eval $COSMOS_KEY_CMD)
-
-
Set CosmosDB using shared dev DB:
- Set CosmosDB URL:
export LR_URL=https://ngsa-asb-dev-cosmos.documents.azure.com:443/
- Add Your IP Address To CosmosDB Firewall Allow List: LodeRunner.Data
- Set Command to Get CosmosDB Key with Read-Write permissions
- Log Into Azure:
az login --use-device-code
- Set Subscription:
az account set -s COSMOSDB_SUBSCRIPTION_NAME_OR_ID
- Set Command:
export LR_KEY=$(eval az cosmosdb keys list -n ngsa-asb-dev-cosmos -g rg-ngsa-asb-dev-cosmos --query primaryMasterKey -o tsv)
- Set CosmosDB URL:
-
- Save environmental variables for future re-run via
./deploy/loderunner/local/saveenv.sh
- Start the k3d cluster
make create
- Deploy pods
Note: monitoring and fluentbit namespaces are not readymake all
: LodeRunner, LodeRunner.API, LodeRunner.UI, ngsa-app, prometheus, grafana, fluentbit, jumpboxmake lr-local
: LodeRunner, LodeRunner.API, LodeRunner.UI
- Set LodeRunner.API port visibility to public
- In Codespaces, navigate to the
PORTS
terminal - Identify port
LodeRunner API (32088)
and right-click on theVisibility
- Hover over
Port Visibility
and selectPublic
- In Codespaces, navigate to the