You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
4.4 KiB

3 years ago
# System and Service Monitoring and Analysis in a Cloud Environment with Services based on Containers
3 years ago
3 years ago
## Requirements to run
3 years ago
1. Docker
2. Npm - node
3. Vue CLI
## Installation Process
3 years ago
```
git clone <insert_git_project_url>
cd Thesis
chmod 700 install.sh
./install.sh
```
3 years ago
## Run Web-client
3 years ago
```
./runw.sh
```
3 years ago
## Run the rest services
3 years ago
```
docker-compose up
```
...and you are done.
### You can access the web-client on and monitor some logs:
3 years ago
> http://localhost:8080
## Add your own Service to the system
3 years ago
All you have to do is add it to the docker-compose file or run it afterwords with a simple docker run command. You need to configure the logging driver though. Example:
3 years ago
```
docker run --network="thesis_playground-net" --log-driver=fluentd --log-opt tag="mongo.node3" -p 3003:3001 dummyservice
```
3 years ago
You will need to mention a tag as "mongo.whateveryouwant" to be able to see your logs. If your service is a **mongoDB**, a **nodejs** app, or a **redis** you can pick the right tag so you can see your logs. Tags that are already known to the app are "mongo.node", "mongo.redis", "mongo.mongodb"
3 years ago
## IMPORTANT if you run this localy.
3 years ago
3 years ago
For the web-client to run you will need to visit https://api-login.swarmlab.io:8089/ and login with your credentials so you will get a token. The token is visible in the url after your login.
Then, you will need to copy the url and paste it into the file runLlo.vue, which is into playground-client/src/components/doclive/
3 years ago
The line of code that needs to be replaced is the line 626 where you can see a url string. Replace it with your url and save it. The project will refresh and now you will be able to use the web-client.
3 years ago
## Ansible Deployment for Swarlab-Hybrid (not finished)
3 years ago
3 years ago
An extra deployment method is currently under development so the files:
3 years ago
3 years ago
```
mongo.yml
monitorall.yml.sh
node.yml
inventory.yml
```
3 years ago
3 years ago
are to be ignored completely at the moment.
3 years ago
# Important files (in greek)
## **Playground-client**
Αρχικά, πρόκειται για ένα σχετικά βασικό vue.js project. Οπότε η κατανόηση του κώδικα απαιτεί μία τυπική γνώση της δομής ενός vue αρχείου.
> ### playground-client/src/components/runLlo.vue
Component που ασχολείται με την τύπωση των logs on-event. Ο κώδικας ειναι σχολιασμένος.
> ### playground-client/src/components/AdhocView.vue
Component που ασχολείται με την τύπωση των logs στο στάδιο της ευρετηρίασης και του διαγράμματος. Ο κώδικας είναι σχολιασμένος.
## **readmongo**
Project γραμμένο σε node.js/express.js
> ### readmongo/swarmlab-app/src/run/app.js
Βασικό αρχείο που τρέχει κατά την εκτέλεση του server. Όλες οι σόκετ συνδέσεις και τα api-endpoints είναι γραμμένα εδώ. Ο κώδικας περιέχει αρκετά σχόλια για μελέτη.
## **WriteToMongo**
Project που χρησιμοποιεί το εργαλείο fluentd
> ### WriteToMongo/fluent/fluent.conf
Βασικό αρχείο που διαχειρίζεται τα logs που του έρχονται. Χρειάζεται μελέτη του documentation για την πλήρη κατανόηση της διαχείρισης που γίνεται.
## **dummyservice**
3 years ago
3 years ago
"Χαζό" μικρό node.js project με κάποια απλά api endpoints, για την παραγωγή test logs. Έχει το ίδιο structure με το readmongo service.
# Containers και Πορτες (ports)
## Redis - 6379
Ακούει στην πόρτα 6379 και το όνομα του container που λαμβάνει μετά την εκτέλεση του docker-compose είναι το "redisserver"
## MongoDB - 27017
Ακούει στην πόρτα 27017 και το όνομα του container είναι "mongo"
## Fleuntd - 24224
Ακούει στην πόρτα 24224 και το όνομα του container που λαμβάνει είναι "fluentd"
## Server γραμμένος σε node.js - 3000
Ακούει στην πόρτα 3000 και το όνομα του container είναι readmongo_service
## Χαζό service -3001
Ακούει στην πόρτα 3001 και το όνομα του container είναι dummy_service