version: '2.4'
services:
  node-init:
    image: "nexus.gz1.opensdn.io:5002/contrail-node-init:nightly-r24.1-centos"
    env_file: /etc/contrail/common_vrouter.env
    environment:
      - CONTRAIL_STATUS_IMAGE="nexus.gz1.opensdn.io:5002/contrail-status:nightly-r24.1-centos"
    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:5002/contrail-nodemgr:nightly-r24.1-centos"
    env_file: /etc/contrail/common_vrouter.env
    environment:
      - NODE_TYPE=vrouter
    network_mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/contrail/loadbalancer:/var/lib/contrail/loadbalancer
    volumes_from:
      - node-init
    depends_on:
      - node-init
    restart: on-failure
    stdin_open: True
    tty: True
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
  provisioner:
    image: "nexus.gz1.opensdn.io:5002/contrail-provisioner:nightly-r24.1-centos"
    env_file: 
      - /etc/contrail/common_vrouter.env
      - /etc/contrail/defaults.env
    environment:
      - NODE_TYPE=vrouter
    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"
  vrouter-kernel-init:
    image: "nexus.gz1.opensdn.io:5002/contrail-vrouter-kernel-build-init:nightly-r24.1-centos"
    network_mode: host
    privileged: true
    env_file: /etc/contrail/common_vrouter.env
    pid: host
    volumes:
      - /usr/src:/usr/src
      - /lib/modules:/lib/modules
      - /bin:/host/bin
    volumes_from:
      - node-init
    depends_on:
      - node-init
  vrouter-agent:
    image: "nexus.gz1.opensdn.io:5002/contrail-vrouter-agent:nightly-r24.1-centos"
    network_mode: host
    privileged: true
    pid: host
    env_file: /etc/contrail/common_vrouter.env
    volumes:
      - /usr/src:/usr/src
      - /lib/modules:/lib/modules
      - /bin:/host/bin
      - /etc:/host/etc
      - /var/lib/contrail:/var/lib/contrail:shared
      - /var/run:/var/run
      - /dev:/dev
      - /etc/resolv.conf:/etc/resolv.conf
    volumes_from:
      - node-init
    depends_on:
      - vrouter-kernel-init
      - node-init
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
        max-file: "10"
    restart: always
    stdin_open: True
    tty: True
