khenaidoo | fe874ae | 2017-07-14 18:07:27 -0400 | [diff] [blame] | 1 | version: '2' |
| 2 | services: |
| 3 | # |
| 4 | # Single-node zookeeper service |
| 5 | # |
| 6 | zookeeper: |
| 7 | image: wurstmeister/zookeeper |
| 8 | ports: |
| 9 | - 2181 |
| 10 | environment: |
| 11 | SERVICE_2181_NAME: "zookeeper" |
| 12 | # |
| 13 | # Single-node kafka service |
| 14 | # |
| 15 | kafka: |
| 16 | image: wurstmeister/kafka |
| 17 | ports: |
| 18 | - 9092 |
| 19 | environment: |
| 20 | KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP} |
| 21 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 |
| 22 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' |
| 23 | KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M" |
| 24 | SERVICE_9092_NAME: "kafka" |
| 25 | depends_on: |
| 26 | - consul |
| 27 | volumes: |
| 28 | - /var/run/docker.sock:/var/run/docker.sock |
| 29 | # |
| 30 | # Single-node consul agent |
| 31 | # |
| 32 | consul: |
| 33 | image: consul:latest |
| 34 | command: agent -server -bootstrap -client 0.0.0.0 -ui |
| 35 | ports: |
| 36 | - "8300:8300" |
| 37 | - "8400:8400" |
| 38 | - "8500:8500" |
| 39 | - "8600:8600/udp" |
| 40 | environment: |
| 41 | #SERVICE_53_IGNORE: "yes" |
| 42 | SERVICE_8300_IGNORE: "yes" |
| 43 | SERVICE_8400_IGNORE: "yes" |
| 44 | SERVICE_8500_NAME: "consul-rest" |
| 45 | # |
| 46 | # Registrator |
| 47 | # |
| 48 | registrator: |
| 49 | image: gliderlabs/registrator:latest |
| 50 | command: [ |
| 51 | "-ip=${DOCKER_HOST_IP}", |
| 52 | "-retry-attempts", "100", |
| 53 | "-cleanup", |
| 54 | # "-internal", |
| 55 | "consul://consul:8500" |
| 56 | ] |
| 57 | links: |
| 58 | - consul |
| 59 | volumes: |
| 60 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 61 | |
| 62 | # |
| 63 | # Fluentd log server |
| 64 | # |
| 65 | fluentd: |
| 66 | image: fluent/fluentd |
| 67 | ports: |
| 68 | - "24224:24224" |
| 69 | volumes: |
| 70 | - "/tmp/fluentd:/fluentd/log" |
| 71 | environment: |
| 72 | SERVICE_24224_NAME: "fluentd-intake" |
| 73 | |
| 74 | # |
| 75 | # Voltha server instance(s) |
| 76 | # |
| 77 | voltha: |
| 78 | image: cord/voltha |
| 79 | command: [ |
| 80 | "/voltha/voltha/main.py", |
| 81 | "-v", |
| 82 | "--consul=${DOCKER_HOST_IP}:8500", |
| 83 | "--fluentd=fluentd:24224", |
| 84 | "--rest-port=8880", |
| 85 | "--grpc-port=50555", |
| 86 | "--kafka=@kafka", |
| 87 | "--instance-id-is-container-name", |
| 88 | "--interface=eth1", |
| 89 | "--backend=consul", |
| 90 | "-v" |
| 91 | ] |
| 92 | ports: |
| 93 | - 8880 |
| 94 | - 50555 |
| 95 | - 18880 |
| 96 | depends_on: |
| 97 | - consul |
| 98 | links: |
| 99 | - consul |
| 100 | - fluentd |
| 101 | environment: |
| 102 | SERVICE_8880_NAME: "voltha-health" |
| 103 | SERVICE_8880_CHECK_HTTP: "/health" |
| 104 | SERVICE_8880_CHECK_INTERVAL: "5s" |
| 105 | SERVICE_8880_CHECK_TIMEOUT: "1s" |
| 106 | SERVICE_50555_NAME: "voltha-grpc" |
| 107 | SERVICE_18880_NAME: "voltha-sim-rest" |
| 108 | volumes: |
| 109 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 110 | networks: |
| 111 | - default |
| 112 | - ponmgmt |
| 113 | |
| 114 | # |
| 115 | # Chameleon server instance(s) |
| 116 | # |
| 117 | chameleon: |
| 118 | image: cord/chameleon |
| 119 | command: [ |
| 120 | "/chameleon/chameleon/main.py", |
| 121 | "-v", |
| 122 | "--consul=consul:8500", |
| 123 | "--fluentd=fluentd:24224", |
| 124 | "--rest-port=8881", |
| 125 | "--grpc-endpoint=@voltha-grpc", |
| 126 | "--instance-id-is-container-name", |
| 127 | "-v" |
| 128 | ] |
| 129 | ports: |
| 130 | - 8881 |
| 131 | depends_on: |
| 132 | - consul |
| 133 | - voltha |
| 134 | links: |
| 135 | - consul |
| 136 | - fluentd |
| 137 | environment: |
| 138 | SERVICE_8881_NAME: "chameleon-rest" |
| 139 | volumes: |
| 140 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 141 | # |
| 142 | # ofagent server instance |
| 143 | # |
| 144 | ofagent: |
| 145 | image: cord/ofagent |
| 146 | command: [ |
| 147 | "/ofagent/ofagent/main.py", |
| 148 | "-v", |
| 149 | "--consul=${DOCKER_HOST_IP}:8500", |
| 150 | "--fluentd=fluentd:24224", |
| 151 | "--controller=${DOCKER_HOST_IP}:6653", |
| 152 | "--grpc-endpoint=@voltha-grpc", |
| 153 | "--instance-id-is-container-name", |
| 154 | "-v" |
| 155 | ] |
| 156 | depends_on: |
| 157 | - consul |
| 158 | - voltha |
| 159 | links: |
| 160 | - consul |
| 161 | - fluentd |
| 162 | volumes: |
| 163 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 164 | restart: unless-stopped |
| 165 | |
| 166 | # |
| 167 | # Netconf server instance(s) |
| 168 | # |
| 169 | netconf: |
| 170 | image: cord/netconf |
| 171 | privileged: true |
| 172 | command: [ |
| 173 | "/netconf/netconf/main.py", |
| 174 | "-v", |
| 175 | "--consul=${DOCKER_HOST_IP}:8500", |
| 176 | "--fluentd=fluentd:24224", |
| 177 | "--grpc-endpoint=@voltha-grpc", |
| 178 | "--instance-id-is-container-name", |
| 179 | "-v" |
| 180 | ] |
| 181 | ports: |
| 182 | - "830:1830" |
| 183 | depends_on: |
| 184 | - consul |
| 185 | - voltha |
| 186 | links: |
| 187 | - consul |
| 188 | - fluentd |
| 189 | environment: |
| 190 | SERVICE_1830_NAME: "netconf-server" |
| 191 | volumes: |
| 192 | - "/var/run/docker.sock:/tmp/docker.sock" |
| 193 | |
| 194 | networks: |
| 195 | default: |
| 196 | driver: bridge |
| 197 | ponmgmt: |
| 198 | driver: bridge |
| 199 | driver_opts: |
| 200 | com.docker.network.bridge.name: "ponmgmt" |