Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.97 KB | None | 0 0
  1. version: '3'
  2.  
  3. networks:
  4.   mcu-network:
  5.     driver: bridge
  6.  
  7. services:
  8.   plugind:
  9.     build:
  10.       context: .
  11.       dockerfile: Dockerfile.services
  12.     command: ["/opt/mcu/plugind"]
  13.     networks:
  14.      - mcu-network
  15.     ports:
  16.      - '8080:8080'
  17.     restart: on-failure
  18.     depends_on:
  19.      - db
  20.       - prometheusd
  21.       - alertmanagerd
  22.     environment:
  23.      - PLUGIN_DAEMON_MODE
  24.       - PLUGIN_DAEMON_PORT
  25.       - MYSQL_DSN=mcu:password@tcp(db:3306)/MCU?parseTime=true&multiStatements=true
  26.       - CONFIG_REMOTE
  27.       - CONFIG_DEPLOY_KEY
  28.       - CONFIG_DIRECTORY
  29.       - READ_TIMEOUT
  30.       - WRITE_TIMEOUT
  31.       - SHUTDOWN_TIMEOUT
  32.  
  33.   prometheusd:
  34.     build:
  35.       context: .
  36.       dockerfile: Dockerfile.services
  37.     command: ["/opt/mcu/prometheusd"]
  38.     networks:
  39.      - mcu-network
  40.     depends_on:
  41.      - prometheus
  42.     volumes:
  43.      - ./dev/agents/devProm/:/etc/prometheus/ # Config/Rules Files
  44.     ports:
  45.      - '3000:3000'
  46.     expose:
  47.      - '3000'
  48.     restart: on-failure
  49.     environment:
  50.      - PROM_DAEMON_PORT
  51.       - PROM_HOST=prometheus
  52.       - PROM_PORT=9090
  53.       - PROM_RULES
  54.       - PROM_CONFIG
  55.       - READ_TIMEOUT
  56.       - WRITE_TIMEOUT
  57.       - SHUTDOWN_TIMEOUT
  58.  
  59.   alertmanagerd:
  60.     build:
  61.       context: .
  62.       dockerfile: Dockerfile.services
  63.     command: ["/opt/mcu/alertmanagerd"]
  64.     networks:
  65.      - mcu-network
  66.     depends_on:
  67.      - alertmanager
  68.     volumes:
  69.      - ./dev/agents/devAlert/:/etc/alertmanager/ # Config File
  70.     ports:
  71.      - '3001:3001'
  72.     expose:
  73.      - '3001'
  74.     restart: on-failure
  75.     environment:
  76.      - ALERT_DAEMON_PORT
  77.       - ALERT_HOST=alertmanager
  78.       - ALERT_PORT=9093
  79.       - ALERT_CONFIG_PATH
  80.       - READ_TIMEOUT
  81.       - WRITE_TIMEOUT
  82.       - SHUTDOWN_TIMEOUT
  83.  
  84.   prometheusd2: #runs on 3003
  85.     build:
  86.       context: .
  87.       dockerfile: Dockerfile.services
  88.     command: ["/opt/mcu/prometheusd"]
  89.     networks:
  90.      - mcu-network
  91.     depends_on:
  92.      - prometheus
  93.     volumes:
  94.      - ./dev/agents/devProm/:/etc/prometheus/ # Config/Rules Files
  95.     ports:
  96.      - '3003:3000'
  97.     expose:
  98.      - '3003'
  99.     restart: on-failure
  100.     environment:
  101.      - PROM_DAEMON_PORT=3003
  102.       - PROM_HOST=prometheus2
  103.       - PROM_PORT=9091
  104.       - PROM_RULES
  105.       - PROM_CONFIG
  106.       - READ_TIMEOUT
  107.       - WRITE_TIMEOUT
  108.       - SHUTDOWN_TIMEOUT
  109.  
  110.   alertmanagerd2: #runs on 3004
  111.     build:
  112.       context: .
  113.       dockerfile: Dockerfile.services
  114.     command: ["/opt/mcu/alertmanagerd"]
  115.     networks:
  116.      - mcu-network
  117.     depends_on:
  118.      - alertmanager
  119.     volumes:
  120.      - ./dev/agents/devAlert/:/etc/alertmanager/ # Config File
  121.     ports:
  122.      - '3004:3001'
  123.     expose:
  124.      - '3004'
  125.     restart: on-failure
  126.     environment:
  127.      - ALERT_DAEMON_PORT=3004
  128.       - ALERT_HOST=alertmanager2
  129.       - ALERT_PORT=9092
  130.       - ALERT_CONFIG_PATH
  131.       - READ_TIMEOUT
  132.       - WRITE_TIMEOUT
  133.       - SHUTDOWN_TIMEOUT
  134.  
  135.   prometheus: #runs on port 9090 on the host machine
  136.     image: 'prom/prometheus'
  137.     command:
  138.      - '--config.file=/etc/prometheus/prometheus.yml'
  139.       - '--storage.tsdb.path=/prometheus'
  140.       - '--web.enable-lifecycle'
  141.     networks:
  142.      - mcu-network
  143.     ports:
  144.      - '9090:9090'
  145.     expose:
  146.      - '9090'
  147.     volumes:
  148.      - ./dev/agents/devProm/:/etc/prometheus/ # Config/Rules Files
  149.     restart: on-failure
  150.  
  151.   alertmanager: #runs on port 9093 on the host machine
  152.     image: 'prom/alertmanager'
  153.     command:
  154.      - '--config.file=/etc/alertmanager/alertmanager.yml'
  155.       - '--cluster.advertise-address=172.18.0.2:9094'
  156.     networks:
  157.      - mcu-network
  158.     ports:
  159.      - '9093:9093'
  160.     expose:
  161.      - '9093'
  162.     volumes:
  163.      - ./dev/agents/devAlert/:/etc/alertmanager/ # Config File
  164.     restart: on-failure
  165.  
  166.   prometheus2: #runs on port 9091 on the host machine
  167.     image: 'prom/prometheus'
  168.     command:
  169.      - '--config.file=/etc/prometheus/prometheus.yml'
  170.       - '--storage.tsdb.path=/prometheus'
  171.       - '--web.enable-lifecycle'
  172.     networks:
  173.      - mcu-network
  174.     ports:
  175.      - '9091:9090'
  176.     expose:
  177.      - '9091'
  178.     volumes:
  179.      - ./dev/agents/devProm2/:/etc/prometheus/ # Config/Rules Files
  180.     restart: on-failure
  181.  
  182.   alertmanager2: #runs on port 9092 on the host machine
  183.     image: 'prom/alertmanager'
  184.     command:
  185.      - '--config.file=/etc/alertmanager/alertmanager.yml'
  186.       - '--cluster.advertise-address=172.18.0.2:9095'
  187.     networks:
  188.      - mcu-network
  189.     ports:
  190.      - '9092:9093'
  191.     expose:
  192.      - '9092'
  193.     volumes:
  194.      - ./dev/agents/devAlert2/:/etc/alertmanager/ # Config File
  195.     restart: on-failure
  196.  
  197.   db: # Database that plugind uses
  198.     image: percona:5.7.23-stretch
  199.     networks:
  200.      - mcu-network
  201.     ports:
  202.      - '3306:3306'
  203.     expose:
  204.      - '3306'
  205.     environment:
  206.       MYSQL_USER: "mcu"
  207.       MYSQL_PASSWORD: "password"
  208.       MYSQL_DATABASE: "MCU"
  209.       MYSQL_ROOT_PASSWORD: "password"
  210.       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement