Skip to content

Introduce test-scale script#2578

Merged
siggy merged 3 commits intomasterfrom
siggy/scale-test
Apr 1, 2019
Merged

Introduce test-scale script#2578
siggy merged 3 commits intomasterfrom
siggy/scale-test

Conversation

@siggy
Copy link
Member

@siggy siggy commented Mar 28, 2019

Introduce a bin/test-scale script to deploy Linkerd alongside sample
apps at scale.

This script deploys the following:

  • Linkerd control-plane, with service profiles
  • 5 namespaces x 5 replicas of each:
    • Emojivoto demo app
    • Books demo app, with service profiles
    • Lifecycle / bb test environment

Fixes #2517

Signed-off-by: Andrew Seigner [email protected]

@siggy siggy self-assigned this Mar 28, 2019
@l5d-bot
Copy link
Collaborator

l5d-bot commented Mar 28, 2019

@siggy siggy force-pushed the siggy/scale-test branch from 3d3851e to fb8a7eb Compare March 28, 2019 06:51
@admc admc mentioned this pull request Mar 28, 2019
25 tasks
@l5d-bot
Copy link
Collaborator

l5d-bot commented Mar 28, 2019

@l5d-bot
Copy link
Collaborator

l5d-bot commented Mar 28, 2019

bin/test-scale Outdated
BOOKS_APP=$(curl -s https://raw.githubusercontent.com/BuoyantIO/booksapp/master/k8s/mysql-app.yml)

# add "-sleep=10ms" param to the traffic app (~100rps)
traffic_param=" - \"-webapp:7000\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://raw.githubusercontent.com/BuoyantIO/booksapp/master/k8s/mysql-app.yml, "webapp:7000" is given instead of "-webapp:7000". Therefore, the value $traffic_param is not substituted by $sleep_param. Also in sleep parameter extra - should be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harsh-98 Nice catch, thanks!

@l5d-bot
Copy link
Collaborator

l5d-bot commented Mar 29, 2019

siggy added 2 commits March 29, 2019 16:48
Introduce a `bin/test-scale` script to deploy Linkerd alongside sample
apps at scale.

This script deploys the following:
- Linkerd control-plane, with service profiles
- 5 namespaces x 5 replicas of each:
  - Emojivoto demo app
  - Books demo app, with service profiles
  - Lifecycle / bb test environment

Fixes #2517

Signed-off-by: Andrew Seigner <[email protected]>
@siggy siggy force-pushed the siggy/scale-test branch from 1cfcc39 to 0e6b00c Compare March 29, 2019 23:48
@l5d-bot
Copy link
Collaborator

l5d-bot commented Mar 30, 2019

Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good 👍
My Minikube is choking on it, but I'll let you know if I can have it work.
Any chance of adding these namespaces into bin/test-cleanup?

if [ -z "$linkerd_path" ]; then
echo "usage: $(basename "$0") /path/to/linkerd [namespace]" >&2
exit 64
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of set -eu, if no args args are provided to the script it fails at line 50 without a chance to output the usage message.

@alpeb
Copy link
Member

alpeb commented Apr 1, 2019

I could make it work for 3 namespaces and 3 replicas

image

But the lifecycle namespaces stop showing stats after the first redeployment. This is the log from the redeployer pod:

redeploying bb-terminus deployment
error: SchemaError(io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy): invalid object doesn't have additional properties
sleeping for 60 seconds...

Signed-off-by: Andrew Seigner <[email protected]>
@siggy
Copy link
Member Author

siggy commented Apr 1, 2019

@alpeb Re: the cleanup script, I opted to document a bin/test-cleanup l5d-scale command:
https://github.com/linkerd/linkerd2/pull/2578/files#diff-6bbf111168957115fe11f1cc2a6d0277R347

That script already defaults to l5d-integration to accomodate cleaning up the integration tests, and I didn't want to use the same default namespaces for the scale tests. Another option would be to create a bin/test-scale-cleanup script that wraps bin/test-cleanup with a new default, but I was trying to avoid adding yet another script into bin. :)

Re: that redeployer issue, I'm not really sure what's going on. I'm surprised to see an error related to DaemonSetUpdateStrategy, as everything in lifecycle is a deployment. What kind of k8s cluster is this? I've been testing with AKS and Docker For Mac.

For reference, here's the relevant part of that script:
https://github.com/linkerd/linkerd-examples/blob/master/lifecycle/lifecycle.yml#L383-L390
...and the expected output from redeployer:

$ kubectl -n l5d-scale-lifecycle-1 logs -f deploy/redeployer redeployer
found 2 running pods
pod "bb-terminus-78669d6ccd-2sj9p" deleted
sleeping for 30 seconds...
pod "bb-terminus-78669d6ccd-xkt4x" deleted
bouncing services...
service "bb-terminus1" deleted
service "bb-terminus1" created
service "bb-terminus2" deleted
service "bb-terminus2" created
service "bb-terminus3" deleted
service "bb-terminus3" created
service "bb-terminus4" deleted
service "bb-terminus4" created
service "bb-terminus5" deleted
service "bb-terminus5" created
service "bb-terminus6" deleted
service "bb-terminus6" created
service "bb-terminus7" deleted
service "bb-terminus7" created
service "bb-terminus8" deleted
service "bb-terminus8" created
service "bb-terminus9" deleted
service "bb-terminus9" created
service "bb-terminus10" deleted
service "bb-terminus10" created
sleeping for 30 seconds...
redeploying bb-terminus deployment
deployment.extensions "bb-terminus" configured
sleeping for 60 seconds...
found 2 running pods

@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 1, 2019

@alpeb
Copy link
Member

alpeb commented Apr 1, 2019

Ok I think bin/test-cleanup l5d-scale is enough 👍

Regarding that daemonset error it appears it's some sort of RBAC error despite the error message. I'm testing with Minikube on Linux. Still digging...

Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It all worked fine after upgrading the lachlanevenson/k8s-kubectl image version tag 👍

@siggy siggy merged commit 38f504b into master Apr 1, 2019
@siggy siggy deleted the siggy/scale-test branch April 1, 2019 19:52
KatherineMelnyk pushed a commit to KatherineMelnyk/linkerd2 that referenced this pull request Apr 5, 2019
Introduce a `bin/test-scale` script to deploy Linkerd alongside sample
apps at scale.

This script deploys the following:
- Linkerd control-plane, with service profiles
- 5 namespaces x 5 replicas of each:
  - Emojivoto demo app
  - Books demo app, with service profiles
  - Lifecycle / bb test environment

Fixes linkerd#2517

Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: [email protected] <[email protected]>
KatherineMelnyk pushed a commit to KatherineMelnyk/linkerd2 that referenced this pull request Apr 5, 2019
Introduce a `bin/test-scale` script to deploy Linkerd alongside sample
apps at scale.

This script deploys the following:
- Linkerd control-plane, with service profiles
- 5 namespaces x 5 replicas of each:
  - Emojivoto demo app
  - Books demo app, with service profiles
  - Lifecycle / bb test environment

Fixes linkerd#2517

Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants