-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release of infinitemonkeys helm chart (#2610)
* rerelease of infinitemonkeys helm chart, adding readme, minor refactor removing nested docker install from Dockerfile * removing unneeded dependencies, updating vars and readme * introducing jvm limits for monkey-server pods * use JAVA_OPTS, Java 8 style flags * add delay-pool argument to the controller * decreasing waits between monkey startups, adding java-opts readme section, fixing indentation * adding action for monkey image push to quay * starting pods in parallel, adding ENV vars with expected app timeout settings to monkey-controller * debugging new quay push action * debugging new quay push action * debugging new quay push action * debugging new quay push action * changes to monkey-dashboard * disabling image build for PR branch * updating readme on cluster resource use --------- Co-authored-by: Mathias Staab <[email protected]>
- Loading branch information
1 parent
4aeb41c
commit 06a032e
Showing
14 changed files
with
2,413 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: quay.io infinitemonkeys image build & push | ||
|
||
on: | ||
push: | ||
branches: ['develop'] | ||
paths: ['monkeys/**'] | ||
|
||
jobs: | ||
quay_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: wire+kalium_github_actions | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./monkeys/docker/Dockerfile | ||
platforms: linux/amd64 | ||
tags: quay.io/wire/infinitemonkeys | ||
push: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
|
||
name: infinitemonkeys | ||
type: application | ||
version: 0.1.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# infinitemonkeys - load testing tool for Wire | ||
|
||
This Helm chart provides: | ||
|
||
- A group of StatefulSets deploying one monkeyController and N monkeyServers | ||
- Integration Prometheus-Operator via PodMonitors and a Grafana Dashboard | ||
|
||
## Architecture | ||
|
||
The Controller will instruct the Servers what to do, via files/config.json. | ||
The config schema can be [viewed here](https://github.com/wireapp/kalium/blob/develop/monkeys/schema.json). | ||
Currently, config options for a single backend are exposed via values.yaml, but it is possible | ||
to add several backends and let the Servers send messages between them. In that case, it's recommended to edit | ||
the config.json file directly prior (re)deployment. | ||
|
||
|
||
## Scaling | ||
|
||
The application is capable scaling to 100s of monkeys, given sufficient cluster resources. We've determined | ||
that as of now (2024-03), one Controller can handle about 350 monkeys before running into concurrency issues. | ||
|
||
In order to support a deployment with 350 monkeys (plus Owner plus Controller), the cluster should have a total of at least: | ||
|
||
* 192 GiB RAM | ||
* 40 (v)CPU | ||
|
||
Equivalent to about 500 MiB RAM and per monkey and 10 monkeys per vCPU. During tests it's been determined that | ||
a minimum of six nodes with 32G RAM and 8 vCPU each are sufficient, with about 87% total cluster RAM usage. | ||
Depending on the specific actions which the monkeys are supposed to perform, more compute power might be needed down the line. | ||
|
||
|
||
## Log output | ||
|
||
The Servers echo all logging to stdout. The Controller writes to a local log within it's pod in `/wire/cryptobox/monkeys.log`. | ||
|
||
|
||
## JVM Optimizations | ||
|
||
JVM options are exposed as a config block in `values.yaml`, in order to reduce memory footprint of the monkey servers. | ||
At this point, the amount of RAM needed by each monkey is down about 50% compared to non-optimized defaults. | ||
|
||
|
||
## Limitations | ||
|
||
The total number of all users as defined via `monkeyController.userCount` (or directly in config.json backend sections) needs | ||
to be matched by `monkeyServer.replicaCount`, as N+1, since there's always one additional team owner monkey. | ||
|
||
|
||
## References | ||
|
||
1. - [Infinite Monkeys documentation](https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/878182477/Infinite+Monkeys+IM) | ||
2. - [JVM tuning in K8s](https://www.padok.fr/en/blog/jvm-oom) |
Oops, something went wrong.