|
| 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 |
0 commit comments