You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 16, 2024. It is now read-only.
StormForge optimize experiment of a web-server using the [voting-webapp example](https://github.com/dockersamples/example-voting-app). We optimize for the `cost` and `latency` using metrics provided by two load test generators:
3
+
This examples shows how StormForge optimizes a web-server using the [voting-webapp example](./voting-webapp). We optimize for the `cost` and `latency` using metrics provided by two load test generators:
You must have a Kubernetes cluster. We recommend using a cluster with 4 nodes, 16 vCPUs (4 on each node) and 32GB of memory (8 on each node). Additionally, you will need a local configured copy of `kubectl`.
10
+
11
+
Additionally, you will need a local configured copy of `kubectl` and to initialize StormForge Optimize in your cluster. You can download a binary for your platform from the [installation guide](https://docs.stormforge.io/getting-started/install/) and run `stormforge init` (while connected to your cluster).
Locust makes repeated HTTP calls to the voting service of the voting app, thereby simulating user load on the application.
3
4
This example shows how to optimize the voting app using the metrics built into Locust. This is useful when tuning an application that does not have metrics yet.
4
5
5
-
## Deploy the voting app
6
+
Note that the `experiment.yaml` is written to run the optimization in the default namespace.
6
7
7
-
Run
8
-
```
9
-
kustomize build . | kubectl apply -f -
10
-
```
11
-
## Create an experiment
8
+
## Usage
12
9
13
-
Once the voting app is ready, launch an experiment using:
10
+
Run `kustomize build . | kubectl apply -f -` to deploy the voting app in the default namespace.
14
11
15
-
```
16
-
kubectl apply -f experiment.yaml
17
-
```
12
+
Once the voting app is ready, launch an experiment using `kubectl apply -f experiment.yaml`
Copy file name to clipboardExpand all lines: webserver/voting-webapp/README.md
+3-16Lines changed: 3 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,5 @@
1
1
# Web App Example
2
2
3
-
## Running The Experiment
4
-
From `examples/voting-webapp` execute
5
-
6
-
`kubectl apply -k .`
7
-
8
3
## Introduction
9
4
A simple distributed application based on the official Docker [voting app](https://github.com/dockersamples/example-voting-app).
10
5
This application allows users to vote on "cats" vs. "dogs", and serves the results in a simple web page.
@@ -19,17 +14,9 @@ The application architecture is made of 5 components (see diagram below):
19
14
20
15

21
16
22
-
In this example, we demonstrate how to tune a typical application with several components, using [Locust](https://locust.io/). Locust makes repeated HTTP calls to the voting service, thereby simulating user load on the application.
23
-
24
-
## Prerequisites
25
-
26
-
You must have a Kubernetes cluster. We recommend using a cluster with 4 nodes, 16 vCPUs (4 on each node) and 32GB of memory (8 on each node). Additionally, you will need a local configured copy of `kubectl`.
27
-
28
-
Additionally, you will need a local configured copy of `kubectl` and to initialize StormForge Optimize in your cluster. You can download a binary for your platform from the [installation guide](https://docs.stormforge.io/getting-started/install/) and run `stormforge init` (while connected to your cluster).
29
-
30
-
## Example Resources
17
+
## Resources
31
18
32
-
The resources in this directory aren't going to launch experiments in StormForge Optimize in and off themselves. For that, see [locust-metrics](../webserver/locust-metrics). Nevertheless, here is a short description for each of them.
19
+
The resources in this directory aren't going to launch experiments in StormForge Optimize in and off themselves. For that, see [locust-metrics](../locust-metrics). Nevertheless, here is a short description for each of them.
33
20
34
21
`application/kustomization.yaml`
35
22
: The input to Kustomize used to build the Kubernetes object manifests for this sample application.
@@ -56,4 +43,4 @@ The resources in this directory aren't going to launch experiments in StormForge
56
43
: This directory contains files required to run the results exporter. The exporter's role is to expose the throughput metric over HTTP (in contrast to the original websocket implementation in the results service) so that it can be collected by the jsonpath metric collector.
57
44
`app.py` contains the exporter application, `requirements.txt` are the python library requirements and `Dockerfile` contains the Docker commands to run the exporter container. There is no need to build the image; the folder is only included for reference.
58
45
59
-
More information can be found on the [docker example voting app](https://github.com/dockersamples/example-voting-app) and [Locust](https://docs.locust.io/en/stable/)docs.
46
+
More information can be found on the [docker example voting app](https://github.com/dockersamples/example-voting-app)docs.
0 commit comments