lefos 3 years ago
parent
commit
1ca8b32edd
  1. 20
      docker-compose.yml
  2. 0
      files/ansible.cfg
  3. 22
      fluentd.yml
  4. 32
      mongo.yml
  5. 2
      monitorall.yml.sh

20
docker-compose.yml

@ -48,26 +48,6 @@ services:
- mongo
networks:
playground-net:
# readmongo:
# container_name: readmongo_service
# restart: always
# depends_on:
# - writetomongo
# logging:
# driver: "fluentd"
# options:
# fluentd-async-connect: "true"
# tag: mongo.access
# build: ./readmongo
# image: readmongo:latest
# ports:
# - "3000:3000"
# volumes:
# - ./readmongo:/usr/src/app
# links:
# - mongo
# networks:
# playground-net:
dummy:
container_name: dummy_service
restart: always

0
files/ansible.cfg

22
fluentd.yml

@ -1,22 +0,0 @@
version: "3.8"
services:
writetomongo:
image: writemongo:latest
container_name: fluentd
user: root
build: ./WriteToMongo/fluent
volumes:
- ./WriteToMongo/fluent:/fluentd/etc
ports:
- "24224:24224"
- "24224:24224/udp"
networks:
playground-net:
volumes:
fluent:
# src:
networks:
playground-net:

32
mongo.yml

@ -1,32 +0,0 @@
version: "3.8"
services:
#fluentd service
writetomongo:
image: writemongo:latest
container_name: fluentd
user: root
build: ./WriteToMongo/fluent
volumes:
- ./WriteToMongo/fluent:/fluentd/etc
ports:
- "24224:24224"
- "24224:24224/udp"
networks:
playground-net:
mongo:
container_name: mongo
image: mongo
expose:
- 27017
ports:
- "27017:27017"
networks:
playground-net:
volumes:
fluent:
# src:
networks:
playground-net:

2
monitorall.yml.sh

@ -18,7 +18,7 @@ echo "[service]" > /project/courses/Thesis/inventory.yml
# include master or not
echo $ip4 >> /project/courses/Thesis/inventory.yml
ansible-playbook -u docker -i inventory.yml fluentd.yml -f 5 --ask-pass --ask-become-pass
# ansible-playbook -u docker -i inventory.yml fluentd.yml -f 5 --ask-pass --ask-become-pass
# 1st make sudo without password
# run with keys
#ansible-playbook -u docker -i inventory.yml fluentd.yml -f 5 --private-key=/home/docker/.ssh/id_rsa
Loading…
Cancel
Save