blob: 6f24e8dbab1a710e758484984e998edbd3bb34f1 [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '2'
services:
#
# Single-node consul agent
#
vconsul:
image: "${REGISTRY}consul: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:latest"
command: [
"-ip=${DOCKER_HOST_IP}",
"-retry-attempts", "100",
"-cleanup",
# "-internal",
"consul://vconsul:8500"
]
links:
- vconsul
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
#
# Fluentd log server
#
fluentd:
image: "${REGISTRY}${REPOSITORY}fluent/fluentd:v0.12.42"
ports:
- "24224:24224"
volumes:
- "/tmp/fluentd:/fluentd/log"
environment:
SERVICE_24224_NAME: "fluentd-intake"
#
# Voltha server instance(s)
#
voltha:
image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
command: [
"/voltha/voltha/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
"--rest-port=8880",
"--grpc-port=50556",
"--kafka=@kafka",
"--instance-id-is-container-name",
"--interface=eth1",
"--backend=consul",
"-v"
]
ports:
- 8880
- 50556
- 18880
- "60001:60001"
depends_on:
- vconsul
links:
- vconsul
environment:
SERVICE_8880_NAME: "voltha-health"
SERVICE_8880_CHECK_HTTP: "/health"
SERVICE_8880_CHECK_INTERVAL: "5s"
SERVICE_8880_CHECK_TIMEOUT: "1s"
SERVICE_18880_NAME: "voltha-sim-rest"
SERVICE_HOST_IP: "${DOCKER_HOST_IP}"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
networks:
- default
- ponmgmt
envoy:
image: "${REGISTRY}${REPOSITORY}voltha-envoy${TAG}"
entrypoint:
- /usr/local/bin/envoyd
- -envoy-cfg-template
- "/envoy/voltha-grpc-proxy.template.json"
- -envoy-config
- "/envoy/voltha-grpc-proxy.json"
- -consul-svc-nme
- "vconsul"
- -kv-svc-name
- "vconsul"
ports:
- "50555:50555"
- "8882:8882"
- "8443:8443"
- "8001:8001"
environment:
SERVICE_50555_NAME: "voltha-grpc"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
networks:
- default
- ponmgmt
links:
- voltha:vcore
#
# Voltha cli container
#
cli:
image: "${REGISTRY}${REPOSITORY}voltha-cli${TAG}"
command: [
"/cli/cli/setup.sh",
"-L",
"-G"
]
environment:
DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
ports:
- "5022:22"
depends_on:
- voltha
#
# onos-1
#
onos1:
image: "${REGISTRY}${REPOSITORY}voltha-onos${TAG}"
container_name: onos1
ports:
- 6633:6653
- 8101:8101
- 8181:8181
environment:
ONOS_APPS: drivers,openflow
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
#
# onos-2
#
onos2:
image: "${REGISTRY}${REPOSITORY}voltha-onos${TAG}"
container_name: onos2
ports:
- 6644:6653
- 8102:8101
- 8182:8181
environment:
ONOS_APPS: drivers,openflow
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
#
# onos-3
#
onos3:
image: "${REGISTRY}${REPOSITORY}voltha-onos${TAG}"
container_name: onos3
ports:
- 6655:6653
- 8103:8101
- 8183:8181
environment:
ONOS_APPS: drivers,openflow
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
#
# ofagent server instance
#
ofagent:
image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
command: /ofagent/ofagent/main.py -v --consul=${DOCKER_HOST_IP}:8500 --controller ${DOCKER_HOST_IP}:6633 ${DOCKER_HOST_IP}:6644 ${DOCKER_HOST_IP}:6655 --grpc-endpoint=@voltha-grpc --instance-id-is-container-name --enable-tls --key-file=/ofagent/pki/voltha.key --cert-file=/ofagent/pki/voltha.crt
depends_on:
- vconsul
- voltha
links:
- vconsul
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
networks:
default:
driver: bridge
ponmgmt:
driver: bridge
driver_opts:
com.docker.network.bridge.name: "ponmgmt"