blob: d72bae9800f2052820f3e72c585dea017adc36e2 [file] [log] [blame]
alshabib9d222022016-11-10 16:11:09 -08001{% macro address(data, network) -%}
2 {% if data is defined and network is defined -%}
alshabib35448722016-12-02 17:22:18 -08003 {{ data['NetworkSettings']['Networks'][network]['IPAddress'] }}:50555 }}
alshabib9d222022016-11-10 16:11:09 -08004 {%- else -%}
5 None:None
6 {%- endif %}
7{%- endmacro %}
8
alshabib7941d402016-11-08 00:11:20 +01009services:
10 cord/voltha:
11 slaves: ["chameleon", "ofagent"]
12
13
14slaves:
15 chameleon:
16 image: cord/chameleon
17 command: [
alshabib9d222022016-11-10 16:11:09 -080018 "/chameleon/chameleon/main.py",
alshabib7941d402016-11-08 00:11:20 +010019 "-v",
20 "--consul=consul:8500",
21 "--fluentd=fluentd:24224",
22 "--rest-port=8881",
alshabib9d222022016-11-10 16:11:09 -080023 "--grpc-endpoint={{ address(data, network) }}",
alshabib7941d402016-11-08 00:11:20 +010024 "--instance-id-is-container-name",
25 "-v"
26 ]
27 ports:
28 - 8881
29 depends_on:
30 - consul
31 - voltha
32 links:
33 - consul
34 - fluentd
35 environment:
36 SERVICE_8881_NAME: "chameleon-rest"
37 volumes:
38 - "/var/run/docker.sock:/tmp/docker.sock"
39
40 ofagent:
41 image: cord/ofagent
42 command: [
alshabib9d222022016-11-10 16:11:09 -080043 "/ofagent/ofagent/main.py",
alshabib7941d402016-11-08 00:11:20 +010044 "-v",
45 "--consul=${DOCKER_HOST_IP}:8500",
46 "--fluentd=fluentd:24224",
47 "--controller=${DOCKER_HOST_IP}:6633",
alshabib9d222022016-11-10 16:11:09 -080048 "--grpc-endpoint={{ address(data, network) }}",
alshabib7941d402016-11-08 00:11:20 +010049 "--instance-id-is-container-name",
50 "-v"
51 ]
52 depends_on:
53 - consul
54 - voltha
55 links:
56 - consul
57 - fluentd
58 volumes:
59 - "/var/run/docker.sock:/tmp/docker.sock"