From b19e52c2569ec28bfdc146dd8820f04369a3616e Mon Sep 17 00:00:00 2001 From: thaleia-kavalierou Date: Sun, 13 Jun 2021 13:12:37 +0000 Subject: [PATCH] Upload files to '' --- ascii.adoc | 14 +++++++++----- ascii.adoc.html | 20 ++++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ascii.adoc b/ascii.adoc index bbef9dd..a890900 100644 --- a/ascii.adoc +++ b/ascii.adoc @@ -38,11 +38,15 @@ npm install **** 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. [%hardbreaks] -From the Manager machine of the swarm, follow the steps: +From the Manager machine of the swarm, run (in the fluentd directory): +.... +make all +.... +This will run the following files: [%hardbreaks] -<1> ./fluentd.yml.sh + +<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 + +<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. **** ==== Second part: Storing data in a database @@ -60,7 +64,7 @@ After connecting with the machine, run this command to enter the database's inte 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. +<4> db.logs.find({}).sort({_id:-1}) + +View logs in a descending order. **** diff --git a/ascii.adoc.html b/ascii.adoc.html index 379fac1..1a2b0b5 100644 --- a/ascii.adoc.html +++ b/ascii.adoc.html @@ -94,18 +94,26 @@ Collaborators:

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:

+

From the Manager machine of the swarm, run (in the fluentd directory):

+
+
+
+
make all
+
+
+
+

This will run the following files:

- -
1./fluentd.yml.sh
+
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
+
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.
@@ -146,8 +154,8 @@ Connect as admin to the database. 4 -db.logs.find({})
-View logs. +db.logs.find({}).sort({_id:-1})
+View logs in a descending order.
@@ -158,7 +166,7 @@ View logs.