version: '2.4'
services:
  node-init:
    image: "nexus.gz1.opensdn.io:5102/opensdn-node-init:nightly"
    env_file: /etc/contrail/common.env
    environment:
      - CONTRAIL_STATUS_IMAGE="nexus.gz1.opensdn.io:5102/opensdn-status:nightly"
    privileged: true
    pid: host
    network_mode: "host"
    volumes:
      ['/usr/bin:/host/usr/bin', '/etc/contrail/ssl:/etc/contrail/ssl', '/etc/sysctl.d:/etc/sysctl.d',
        '/etc/hosts:/etc/hosts', '/etc/timezone:/etc/timezone', '/etc/localtime:/etc/localtime',
        '/var/log/contrail:/var/log/contrail', '/var/crashes:/var/crashes']

  nodemgr:
    image: "nexus.gz1.opensdn.io:5102/opensdn-nodemgr:nightly"
    env_file: /etc/contrail/common.env
    environment:
      - NODE_TYPE=analytics-alarm
    network_mode: "host"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    volumes_from:
      - node-init
    restart: always
    stdin_open: True
    tty: True
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
    depends_on:
      - node-init
  provisioner:
    image: "nexus.gz1.opensdn.io:5102/opensdn-provisioner:nightly"
    env_file: 
      - /etc/contrail/common.env
      - /etc/contrail/defaults.env
    environment:
      - NODE_TYPE=analytics-alarm
    network_mode: "host"
    volumes_from:
      - node-init
    depends_on:
      - node-init
    restart: always
    stdin_open: True
    tty: True
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
  alarm-gen:
    image: "nexus.gz1.opensdn.io:5102/opensdn-analytics-alarm-gen:nightly"
    network_mode: "host"
    env_file: /etc/contrail/common.env
    volumes_from:
      - node-init
    depends_on:
      - node-init
    restart: always
    stdin_open: True
    tty: True
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
  kafka:
    image: "nexus.gz1.opensdn.io:5102/opensdn-external-kafka:nightly"
    network_mode: "host"
    env_file: /etc/contrail/common.env
    environment:
      - ZOOKEEPER_NODES=10.0.0.129,10.0.0.38,10.0.0.130
      - ZOOKEEPER_PORT=2181
      - NODE_TYPE=analytics-alarm
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
    volumes:
     - /etc/hosts:/etc/hosts
     - /etc/contrail/ssl:/etc/contrail/ssl
     - /var/log/contrail/kafka:/var/log/kafka
