- Notifications
You must be signed in to change notification settings - Fork1
matt-merman/SDCC
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The aim is to implement two election distributed algorithms (i.e.Chang and Roberts algorithm,Bully algorithm). Furthermore, the following services must be implemented:
- Register service;
- Heartbeat monitoring service;
- Logging information service;
To deploy the application should be usedDocker containers onEC2 instance.
For the local execution are requiredDocker andDocker Compose. Furthermore, arequirements.txt file has been defined to install all the python external libraries:
# to execute in SDCC/sdcc/pip install -r requirements.txt
The complete list of flags is:
$ python3 run.py -h usage: run.py [-h] [-v] [-d] [-a {ring,bully}] [-c CONFIG_FILE] Implementation of distributed election algorithms. Generic node. optional arguments: -h, --help show thishelp message andexit -v, --verbose increase output verbosity -d, --delay generate a random delay to forwarding messages -a {ring,bully}, --algorithm {ring,bully} ring by default -c CONFIG_FILE, --config_file CONFIG_FILE needed a config filein json format
Thelocal_config.json (inSDCC/sdcc) file has been defined to manage all network settings (i.e., IP addresses, port numbers). To display the options set:
python3 run.py -h
Firstly you make running the register node:
# to execute in SDCC/sdcc/register. The -v flag provides a verbose execution (i.e., all messages received and sent are shown)python3 run.py -v -c ../local_config.json
A single node can be executed as:
# to execute in SDCC/sdcc/node. Without the '-a bully' option node runs the ring-based alg.python3 run.py -v -a bully -c ../local_config.json
Test execution can be handled as:
# to execute in SDCC/sdccsudopython3run_tests.py
Ansible service is used to automate the Docker installation and to copy the application code.
# To check the ec2 instance (optional)ansible -i hosts.ini -m ping all# To execute ansible in SDCC/sdcc/ansibleansible-playbook -v -i hosts.ini deploy.yaml# Connect to the EC2 instancessh -i"SDCC_key.pem" ubuntu@ip_instance# To execute the whole applicationsudo docker-compose up
Please seereport for more details.
About
Implementation of distributed election algorithms.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.