This project aims to provide a light version of MockFog without a graphical user interface and the option to update characteristics at runtime to improve stability. Thus, it should be mainly used to create an infrastructure testbed.
Code is largely based on the MockFog adoption of (flonix8)[https://github.com/flonix8/master-thesis-experiment].
Related Publication: Jonathan Hasenburg, Martin Grambow, Elias Grünewald, Sascha Huk, David Bermbach. MockFog: Emulating Fog Computing Infrastructure in the Cloud. In: Proceedings of the First IEEE International Conference on Fog Computing 2019 (ICFC 2019). IEEE 2019. Bib. PDF.
Before running any roles, make sure python and virtualenv are installed
In addition:
- aws credentials configured in
~/.aws/credentials - valid AWS ssh key stored at
./mockfog.pem - read the individual READMEs for each role -> do what they say
- in Makefile set AWS ssh KEY parameter to
mockfog.pem.
- Setup python virtualenv and install dependencies -
make build - Run all MockFogLight tasks -
make mockfog - Destroy all running AWS instances -
make destroy - Clean build -
make clean
See later sections for detailed information about running specific tasks:
- configure the topology via
testbed/topology_definition.yml - create the testbed definition with
make topologyor runpython testbed/generate_testbed_definition.py
This role:
- bootstraps (or destroys) an AWS infrastructure based on the generated testbed definition
- adds the testbed_config field to hostvars; useable via other roles and templates, e.g.,
hostvars[inventory_hostname].testbed_config.bandwidth_out(actually done on the fly viaec2.py) - sets the name, internal_ip, and role tag of EC2 instances
Use with:
- To deploy topology to AWS -
make bootstrap - To destroy topology -
make destroy
or alternatively execute the following commands:
ansible-playbook --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_topology.yml --tags bootstrap
ansible-playbook --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_topology.yml --tags destroyThis role:
- configures delays via TC Use with:
ansible-playbook -i inventory/ec2.py --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_network.ymlThis role:
- Fetches MockFog instance metadata and tags mapping
- Data is stored in
mapping.ymlin the project directory
Use with:
make info
or alternatively, execute
ansible-playbook -i inventory/ec2.py --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_info.yml
This role:
- deploys MockFog agent on nodes and starts it
Use with:
make agent
or alternatively, execute
ansible-playbook -i inventory/ec2.py --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_application.yml --tags deploy_agentThis role:
- deploys application on nodes and starts it
- collects logs
Use with:
make application
or alternatively, execute
ansible-playbook -i inventory/ec2.py --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_application.yml --tags deploy