-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
162 additions
and
42 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
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
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,45 @@ | ||
# Pre-steps | ||
|
||
Build the image | ||
|
||
```bash | ||
docker image build -t lffg/number-fact:latest ./tests/containers/number-fact | ||
``` | ||
|
||
# Single node | ||
|
||
Start: | ||
|
||
```bash | ||
docker compose -f ./tests/perf-analysis/single-node/docker-compose.yml up | ||
``` | ||
|
||
In another terminal session: | ||
|
||
```bash | ||
k6 run ./tests/perf-analysis/test.js | ||
``` | ||
|
||
# Tucano multi node | ||
|
||
```bash | ||
docker compose -f ./tests/perf-analysis/tuc-multi-node/docker-compose.yml up | ||
``` | ||
|
||
Ensure that ctl log shows that 3 worker nodes joined the cluster. | ||
|
||
Deploy the application: | ||
|
||
```bash | ||
./tucano -c localhost service deploy --id="number-fact" --image="lffg/number-fact" --public --concurrency="1" | ||
``` | ||
|
||
Ensure that all deployments went right. | ||
|
||
In another terminal session: | ||
|
||
```bash | ||
k6 run ./tests/perf-analysis/test.js | ||
``` | ||
|
||
# Tucano multi node (4x) |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
services: | ||
server01: | ||
build: ../../containers/number-fact | ||
hostname: html1 | ||
networks: | ||
- tucano-cluster-net | ||
ports: | ||
|
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,51 @@ | ||
services: | ||
ctl: | ||
build: | ||
context: ../../.. # repo root | ||
dockerfile: ./dockerfiles/node.dockerfile | ||
args: | ||
CRATE: ctl | ||
entrypoint: | ||
- /usr/local/bin/ctl | ||
networks: [tucano-cluster-net] | ||
ports: | ||
- "8080:8080" # balancer | ||
- "7070:7070" # http | ||
environment: | ||
RUST_LOG: info,ctl=trace | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: "0.25" | ||
memory: "128MB" | ||
|
||
worker1: &w1 | ||
depends_on: [ctl] | ||
build: | ||
context: ../../.. # repo root | ||
dockerfile: ./dockerfiles/node.dockerfile | ||
args: | ||
CRATE: worker | ||
entrypoint: | ||
- /usr/local/bin/worker | ||
- -c=ctl | ||
networks: | ||
- tucano-cluster-net | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
environment: | ||
RUST_LOG: info,worker=trace | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: "0.25" | ||
memory: "128MB" | ||
|
||
worker2: | ||
<<: *w1 | ||
worker3: | ||
<<: *w1 | ||
|
||
networks: | ||
tucano-cluster-net: | ||
attachable: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
cargo build -q | ||
cargo build | ||
./target/debug/cli "$@" |
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