version: '2.4'
volumes:
  contrail_control_dns:
services:
  node-init:
    image: "nexus.gz1.opensdn.io:5102/opensdn-node-init:nightly"
    env_file: /etc/contrail/common_control.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_control.env
    environment:
      - NODE_TYPE=control
    network_mode: "host"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    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"
  provisioner:
    image: "nexus.gz1.opensdn.io:5102/opensdn-provisioner:nightly"
    env_file: 
      - /etc/contrail/common_control.env
      - /etc/contrail/defaults.env
    environment:
      - NODE_TYPE=control
    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"
  control:
    image: "nexus.gz1.opensdn.io:5102/opensdn-controller-control-control:nightly"
    network_mode: "host"
    cap_add:
      - SYS_PTRACE
    env_file: /etc/contrail/common_control.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"
  named:
    image: "nexus.gz1.opensdn.io:5102/opensdn-controller-control-named:nightly"
    network_mode: "host"
    env_file: /etc/contrail/common_control.env
    privileged: true
    pid: host
    volumes_from:
      - node-init
      - dns
    depends_on:
      - node-init
      - dns
    restart: always
    stdin_open: True
    tty: True
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
  dns:
    image: "nexus.gz1.opensdn.io:5102/opensdn-controller-control-dns:nightly"
    network_mode: "host"
    cap_add:
      - SYS_PTRACE
    env_file: /etc/contrail/common_control.env
    pid: host
    volumes:
      - contrail_control_dns:/etc/contrail/dns
    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"
