This project was developed as part of the 2021 semester Cloud Computing and Services lab.
+Collaborators:
+ΝΙΚΟΛΑΟΣ ΧΡΟΝΟΠΟΥΛΟΣ ΑΜ:131094,
+ΚΑΒΑΛΙΕΡΟΥ ΘΑΛΕΙΑ-ΕΛΠΙΣ ΑΜ:171009
1. Project description
+The project Data Collector Service is the default project of this semester’s lab class. We aimed at creating a swarm of microservices that serve the purposes of data collection and presentation. The project was accomplished with the help of the Swarmlab hybrid and venus.
+2. Tools / services
+ +3. The project
+3.1. First part : Deploying the network
+For this part, we used the linux lab room of the swarmlab service. By uploading a number of containers, we create a swarm of machines. These machines can collect data of any type, but for the testing purposes of this project they will collect data from /tmp/log-in directory. The automated data collection is achieved with the tool fluentd. With ansible, we managed to orchestrate the swarm machines in order to act the same way.
+From the Manager machine of the swarm, follow the steps:
+1 | +./fluentd.yml.sh +With this script, the system will be updated and ansible will be downloaded in the Manager machine. Then, the ansible playbook fluentd.yml will run so that the required settings will be installed on every other machine of the swarm. |
+
2 | +./fluentd-config-update.yml.sh +Run this script to set fluentd on every machine. The tool will collect data of the directory /tmp/log-in, where every machine of the swarm stores the intended data. |
+
3.2. Second part: Storing data in a database
+Although, storing data in files is enought for testing the tool, for the needs of our, total, project we connected the swarm with a mongoDB replica. The databases was uploaded in the lab network via the swarmlab service and it works as the following image indicates.
+
In the mongoDB replica network, we find 3 machines running a mongoDB service. The Primary is the first tasked with storing data, incomming from the Data Collector service, and presenting them back. If Primary is not available, one of the other two will carry through the jobs needed.
+From the Primary, or any other machine, of the mongoDB replica network, follo the steps:
+1 | +mongo +After connecting with the machine, run this command to enter the database’s interface. |
+
2 | +use app_swarmlab +Use this database, where data from the swarm will be stored in a collection. |
+
3 | +db.auth('app_swarmlab','app_swarmlab') +Connect as admin to the database. |
+
4 | +db.logs.find({}) +View logs. |
+