This repository is now read only, for a new and actively maintained version of MockFog see MockFog2.
This project is part of MockFog which includes the following subprojects:
- MockFog-Meta Meta repository with a presentation and a demo video
- MockFog-IaC MockFog Infrastructure as Code artifacts
- MockFog-NodeManager MockFog Node Manager
- MockFog-Agent MockFog Agent
- MockFogLight A lightweight version of MockFog without a visual interface
Fog computing is an emerging computing paradigm that uses processing and storage capabilities located at the edge, in the cloud, and possibly in between. Testing fog applications, however, is hard since runtime infrastructures will typically be in use or may not exist, yet. MockFog is a tool that can be used to emulate such infrastructures in the cloud. Developers can freely design emulated fog infrastructures, configure their performance characteristics, and inject failures at runtime to evaluate their application in various deployments and failure scenarios.
If you use this software in a publication, please cite it as:
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.
@inproceedings{hasenburg_mockfog:_2019,
title = {{MockFog}: {Emulating} {Fog} {Computing} {Infrastructure} in the {Cloud}},
booktitle = {Proceedings of the First {IEEE} {International} {Conference} on {Fog} {Computing} 2019 (ICFC 2019)},
author = {Hasenburg, Jonathan and Grambow, Martin and Grunewald, Elias and Huk, Sascha and Bermbach, David},
year = {2019},
publisher = {IEEE}
}
A full list of our publications and prototypes is available on our group website.
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].
Before running any roles, you should setup a virtualenv and install all requirements
virtualenv venv
source venv/bin/activate.fish
pip install -r requirements.txt
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
- configure the topology via
testbed/topologies.py
- create the testbed definition with
python 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:
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 destroy
This 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.yml
This role:
- deploys application on nodes and starts it
- collects logs Use with:
ansible-playbook -i inventory/ec2.py --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_application.yml --tags deploy
ansible-playbook -i inventory/ec2.py --key-file=mockfog.pem --ssh-common-args="-o StrictHostKeyChecking=no" mockfog_application.yml --tags collect