blob: 6a0db8ca10065ad591a4386d7932a09250e1dc37 [file] [log] [blame]
version: '2'
services:
#
# Single-node zookeeper service
#
zookeeper:
image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
ports:
- 2181
environment:
SERVICE_2181_NAME: "zookeeper"
#
# Single-node kafka service
#
kafka:
image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
ports:
- 9092
environment:
KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_HEAP_OPTS: "-Xmx256M -Xms128M"
SERVICE_9092_NAME: "kafka"
depends_on:
- consul
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#
# Single-node consul agent
#
consul:
image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
command: agent -server -bootstrap -client 0.0.0.0 -ui
ports:
- "8300:8300"
- "8400:8400"
- "8500:8500"
- "8600:8600/udp"
environment:
#SERVICE_53_IGNORE: "yes"
SERVICE_8300_IGNORE: "yes"
SERVICE_8400_IGNORE: "yes"
SERVICE_8500_NAME: "consul-rest"
#
# Registrator
#
registrator:
image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
command: [
"-ip=${DOCKER_HOST_IP}",
"-retry-attempts", "100",
"-cleanup",
# "-internal",
"consul://consul:8500"
]
links:
- consul
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
#
# Fluentd log server
#
fluentd:
image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
ports:
- "24224:24224"
volumes:
- "/tmp/fluentd:/fluentd/log"
environment:
SERVICE_24224_NAME: "fluentd-intake"
#
# Voltha server instance(s)
#
voltha:
image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
command: [
"/voltha/voltha/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
"--fluentd=fluentd:24224",
"--rest-port=8880",
"--grpc-port=50555",
"--kafka=@kafka",
"--instance-id-is-container-name",
"--interface=eth1",
"--backend=consul",
"-v"
]
ports:
- 8880
- 50555
- 18880
depends_on:
- consul
links:
- consul
- fluentd
environment:
SERVICE_8880_NAME: "voltha-health"
SERVICE_8880_CHECK_HTTP: "/health"
SERVICE_8880_CHECK_INTERVAL: "5s"
SERVICE_8880_CHECK_TIMEOUT: "1s"
SERVICE_50555_NAME: "voltha-grpc"
SERVICE_18880_NAME: "voltha-sim-rest"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
networks:
- default
- ponmgmt
#
# ofagent server instance
#
ofagent:
image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
command: [
"/ofagent/ofagent/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
"--fluentd=fluentd:24224",
"--controller=${DOCKER_HOST_IP}:6653",
"--grpc-endpoint=@voltha-grpc",
"--instance-id-is-container-name",
"-v"
]
depends_on:
- consul
- voltha
links:
- consul
- fluentd
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
#
# Netconf server instance(s)
#
netconf:
image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
privileged: true
command: [
"/netconf/netconf/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
"--fluentd=fluentd:24224",
"--grpc-endpoint=@voltha-grpc",
"--instance-id-is-container-name",
"-v"
]
ports:
- "830:1830"
depends_on:
- consul
- voltha
links:
- consul
- fluentd
environment:
SERVICE_1830_NAME: "netconf-server"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
networks:
default:
driver: bridge
ponmgmt:
driver: bridge
driver_opts:
com.docker.network.bridge.name: "ponmgmt"