Skip to content

Commit e584122

Browse files
committed
Add operator and test environment readme
1 parent 44c1707 commit e584122

File tree

8 files changed

+43
-264
lines changed

8 files changed

+43
-264
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ ansible-playbook -i inventory.yaml setup_playbook.yaml --extra-vars "sysbox_ver=
7979

8080
This Ansible playbook installs the required software and executes the [docker-compose.yml](docker-compose.yml), deploying three DFaaS nodes containers, and a fourth container called [operator](operator), which deploys functions on DFaaS nodes and starts specified load tests.
8181

82+
If you have four different VMs it's recommended to deploy the entire system exploiting the playbook and configuration files in [test_environment](test_environment).
83+
8284
#### Manual
8385

8486
_Ansible_

dfaasoperator.env

-6
This file was deleted.

docker/dfaas-operator.dockerfile

-16
This file was deleted.

docker/files/operator_entrypoint.sh

-81
This file was deleted.

operator/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Operator
2+
The Operator container executes the [operator_entrypoint.sh](./docker/files/operator_entrypoint.sh) script to deploy functions on specified DFaaS nodes and execute load tests exploiting [Vegeta](https://github.com/tsenart/vegeta).
3+
4+
The operator can be configured editing the [dfaasoperator.env](dfaasoperator.env), specifying the IP of the target nodes, the functions to deploy, and the configuration of each Vegeta attack.
5+
When operator starts, it performs healthchecks on the target nodes, then deploys the selected functions. After that, it waits for a certain amount of time (specified in the configuration) allowing the nodes proxies to reconfigure with the new functions endpoints, then launches Vegeta attacks.
6+
The operator can execute multiple parallel Vegeta attacks, specifying the amount of time to wait before starting each attack. For each attack is also necessary to specify duration, rate, and the HTTP request.
7+
For single Vegeta attacks the operator generates some plots exploiting the [plot-results.py](docker/files/plot-results.py) script. When all the attacks are terminated, the operator merges all the `results.json` files generated by Vegeta, obtaining the `merged-results.json` file. This is used to generate other plots with the [plot-results.py](docker/files/plot-results.py) script, aggregating all attacks results.
8+
If specified in the environment file, after load tests the operator deletes the deployed functions from target nodes.
9+
10+
_Note: before deploying the operator it's also necessary to configure the [plot-results.py](docker/files/plot-results.py) script to generate correct plots for merged results._

test_environment/README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Multiple VMs Environment
2+
This environment has been exploited to execute some comparison tests beetween the old load balancing strategy adopted by the DFaaS Agent, and the newly implemented Node Margin Strategy.
3+
It consists of three DFaaS nodes, called "Node Light" (2 CPU, 8 GB RAM), "Node Mid" (4 CPU, 16 GB RAM) and "Node Heavy" (6 CPU, 24 GB RAM), and an "Operator" node which automatically deploys functions on other nodes and starts load tests. The technical specifications of the three DFaaS nodes correspond to the specifications of the three nodes types on which the predictive models exploited by the Node Margin Strategy have been trained.
4+
To deploy this environment you need three VMs with the specifications reported above, and antoher VM for the [Operator](../operator).
5+
6+
## Setup and deploy the environment
7+
Install [Ansible](https://www.ansible.com/), an agentless automation tool that you install on a single host, referred to as the control node.
8+
Then, using the [setup_playbook.yaml](setup_playbook.yaml) file, your Ansible control node can setup the environment to execute DFaaS on the managed node(s) specified in an inventory file.
9+
10+
Run the `ansible-playbook` command on the control node using an inventory file configured like [inventory_example.yaml](inventory_example.yaml), to execute the tasks specified in the playbook with the following options:
11+
12+
`-i` : path to an inventory file
13+
`--extra-vars` : to specify the Sysbox version and shiftfs branch to be installed
14+
`--tags` : to specify steps of the playbook to be executed
15+
16+
> The following command assumes you are using Ubuntu 20.04 LTS with kernel version 5.4.
17+
18+
```shell
19+
ansible-playbook -i inventory.yaml setup_playbook.yaml --extra-vars "sysbox_ver=0.5.2 shiftfs_ver=k5.4" --tags "installation, deploy, start"
20+
```
21+
22+
Tags have the following meaning:
23+
- `installation`: install required software
24+
- `deploy`: copy files and build Docker images of DFaaS nodes on VMs
25+
- `start`: run DFaaS nodes containers
26+
- `deploy-operator`: copy files and build Docker image on Operator node VM
27+
- `start-operator`: run DFaaS Operator container
28+
- `stop`: stop DFaaS nodes running containers
29+
- `leave-swarm`: each VM leaves the Docker Swarm cluster
30+
- `remove`: delete from VMs DFaaS directory and Docker images
31+
- `remove-operator`: delete from Operator node VM the operator directory and Docker image

utils/plot-requirements.txt

-3
This file was deleted.

utils/plot.py

-158
This file was deleted.

0 commit comments

Comments
 (0)