-
Notifications
You must be signed in to change notification settings - Fork 48
Running Experiments: Vagrant Environment
Running Experiments: Vagrant Environment Prerequisite: Follow the instructions on the Installation and Environment Setup Page.
Vagrant: Vagrant is an automation tool for managing VMs in virtualbox. To specify the vagrant as an environment than modify the configuration file located atframework/config/VLAN_config.json as shown below. The server characteristics need to be specified in the servers list with the Ubuntu version in box variable. Note: size of the servers list should be equal to HOSTS size in main.py.
- Prepare main.py by modifying the global simulation parameters (line 59), as shown in the figure:
- Select the scheduling algorithm to run (line 96). For example, to run random scheduler use RandomScheduler(). To run GOBI scheduler use GOBIScheduler(‘energy_latency’+str(HOSTS))
- Set datacenter (line 85). Currently the simulator supports SimpleFog, BitbrainFog and AzureFog datacenter characteristics.
- Set workload generator (line 92). Currently supports a simple workload generator (SWSD) and BitBrain workload traces (BWGD).
- Run main.py (Same command in Linux/Windows)
python main.py -e Vagrant -m 0
All results would be stored in logs/ folder. The .pk file in logs/*/ directory is the same as all_datasets/framework/$ALGO/*.pk where $ALGO is the algorithm.
For multiple series of experiments, creating and destroying VMs is not time efficient. To prevent destroying VMs after execution of an experiment use the mode tag in the argument.
-m is a mode and values could be 0,1,2,3
- 0 = Create a new vagrant environment by installing all the required packages in the VLAN/Vagrant environments and destroy the environment after simulation is completed. By default mode is 0.
- 1 = Create a new vagrant environment by installing all the required packages in the VLAN/Vagrant environments and the environment is retained for repetitive simulations.
- 2 = Use the existing environment
- 3 = Use the existing environment for the experiment and then destroy the existing environment. Thus, for the first time use mode 1, then use mode 2 till you are running experiments (to not destroy the setup) and finally use model 3 to use the existing environment and destroy it at the end of the experiments.
- If setting up the vagrant environment gives the following error, change the BASE_IPS in framework/agent/codes.py so that it does not overlap with the host IP address:
The specified host network collides with a non-hostonly network!
This will cause your specified IP to be inaccessible. Please change
the IP or name of your host only network so that it no longer matches that of
a bridged or non-hostonly network.
BSD-3-Clause. Copyright (c) 2020, Shreshth Tuli. All rights reserved.