From e48faa914477f1a062053930bc52e4920e01dd4c Mon Sep 17 00:00:00 2001 From: Alex Wong Date: Tue, 12 Mar 2019 14:59:55 +0800 Subject: [PATCH] add docs for ngrinder load testing --- docs/gitbook/how-it-works.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/gitbook/how-it-works.md b/docs/gitbook/how-it-works.md index 317ae262..1a02ad1e 100644 --- a/docs/gitbook/how-it-works.md +++ b/docs/gitbook/how-it-works.md @@ -567,4 +567,33 @@ FROM quay.io/stefanprodan/flagger-loadtester: RUN curl -Lo /usr/local/bin/my-cli https://github.com/user/repo/releases/download/ver/my-cli \ && chmod +x /usr/local/bin/my-cli -``` \ No newline at end of file +``` + +### Load Testing Delegation + +The load tester can also forward testing tasks to external tools, by now [nGrinder](https://github.com/naver/ngrinder) +is supported. + +To use this feature, add a load test task of type 'ngrinder' to the canary analysis spec: + +```yaml +webhooks: + - name: load-test-post + url: http://flagger-loadtester.test/ + timeout: 5s + metadata: + # type of this load test task, cmd or ngrinder + type: ngrinder + # base url of your nGrinder controller server + server: http://ngrinder-server:port + # ID of an existing test to clone from + clone: 100 + # user name and bae64 encoded password to authenticate against the nGrinder server + username: admin + passwd: YWRtaW4= + # the interval between between nGrinder test status polling, default to 1s + pollInterval: 5s +``` +When the canary analysis starts, the load tester will initiate a [clone_and_start request](https://github.com/naver/ngrinder/wiki/REST-API-PerfTest) +to the nGrinder server and start a new performance test. the load tester will periodically poll the nGrinder server +for the status of the test, and prevent duplicate requests from being sent in subsequent analysis loops. \ No newline at end of file