blob: 9c0f9d1c455bd84be4f7bae31013e2b311c20476 [file] [log] [blame]
version: '2'
services:
#
# Single-node zookeeper service
#
zookeeper:
image: "${REGISTRY}wurstmeister/zookeeper:latest"
ports:
- 2181
environment:
SERVICE_2181_NAME: "zookeeper"
#
# Single-node kafka service
#
kafka:
image: "${REGISTRY}wurstmeister/kafka: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:
- vconsul
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#
# Single-node consul agent
#
vconsul:
image: "${REGISTRY}${REPOSITORY}voltha-consul${TAG}"
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:latest"
command: [
"-ip=${DOCKER_HOST_IP}",
"-retry-attempts", "100",
# "-internal",
"consul-tls://vconsul:8501"
]
links:
- vconsul
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
environment:
CONSUL_CACERT: "/reg/config/voltha-CA-template.pem"
CONSUL_CLIENT_CERT: "/reg/config/voltha-cert-template.crt"
CONSUL_CLIENT_KEY: "/reg/config/voltha-pvt-template.key"
#
# Fluentd log server
#
fluentd:
image: "${REGISTRY}fluent/fluentd:v0.12.42"
ports:
- "24224:24224"
volumes:
- "/tmp/fluentd:/fluentd/log"
environment:
SERVICE_24224_NAME: "fluentd-intake"
#
# Graphite-Grafana-statsd service instance
# (demo place-holder for external KPI system)
#
grafana:
image: "${REGISTRY}${REPOSITORY}voltha-grafana${TAG}"
ports:
- "8882:80"
- "2003:2003"
- "2004:2004"
- "8126:8126"
- "8125:8125/udp"
environment:
SERVICE_80_NAME: "grafana-web-ui"
SERVICE_2003_NAME: "carbon-plain-text-intake"
SERVICE_2004_NAME: "carbon-pickle-intake"
SERVICE_8126_NAME: "statsd-tcp-intake"
SERVICE_8125_NAME: "statsd-udp-intake"
GR_SERVER_ROOT_URL: "http://localhost:80/grafana/"
#
# Shovel (Kafka-graphite-gateway)
#
shovel:
image: "${REGISTRY}${REPOSITORY}voltha-shovel${TAG}"
command: [
"/shovel/shovel/main.py",
"--kafka=@kafka",
"--consul=${DOCKER_HOST_IP}:8500",
"--topic=voltha.kpis",
"--host=${DOCKER_HOST_IP}"
]
depends_on:
- vconsul
- kafka
- grafana
restart: unless-stopped
#
# Voltha server instance(s)
#
voltha:
image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
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",
"-v"
]
ports:
- 8880
- 50555
- 18880
depends_on:
- vconsul
links:
- vconsul
- 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
#
# Voltha cli container
#
cli:
image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
command: [
"/cli/cli/setup.sh",
"-L"
]
environment:
DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
ports:
- "5022:22"
depends_on:
- voltha
#############################################
# Item below this line will soon be removed.#
#############################################
#
# ofagent server instance
#
ofagent:
image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
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:
- vconsul
- voltha
links:
- vconsul
- fluentd
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
#
# Netconf server instance(s)
#
netconf:
image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
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:
- vconsul
- voltha
links:
- vconsul
- fluentd
environment:
SERVICE_1830_NAME: "netconf-server"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
#
# Dashboard daemon
#
dashd:
image: "${REGISTRY}${REPOSITORY}voltha-dashd${TAG}"
command: [
"/dashd/dashd/main.py",
"--kafka=@kafka",
"--consul=${DOCKER_HOST_IP}:8500",
"--grafana_url=http://admin:admin@${DOCKER_HOST_IP}:8882/api",
"--topic=voltha.kpis",
"--docker_host=${DOCKER_HOST_IP}"
]
depends_on:
- vconsul
- kafka
- grafana
restart: unless-stopped
#
# Nginx service consolidation
#
nginx:
image: "${REGISTRY}${REPOSITORY}voltha-nginx${TAG}"
ports:
- "80:80"
environment:
CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
command: [
"/nginx_config/start_service.sh"
]
depends_on:
- vconsul
- grafana
- portainer
restart: unless-stopped
volumes:
- "/vagrant/nginx_config:/nginx_config"
#- "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
#
# Docker ui
#
portainer:
image: "${REGISTRY}${REPOSITORY}voltha-portainer${TAG}"
ports:
- "9000:9000"
environment:
CONSUL_ADDR: "${DOCKER_HOST_IP}:8500"
restart: unless-stopped
entrypoint: ["/portainer", "--logo", "/docker/images/logo_alt.png"]
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
default:
driver: bridge
ponmgmt:
driver: bridge
driver_opts:
com.docker.network.bridge.name: "ponmgmt"