alshabib | 9d22202 | 2016-11-10 16:11:09 -0800 | [diff] [blame] | 1 | {% macro address(data, network) -%} |
| 2 | {% if data is defined and network is defined -%} |
alshabib | 3544872 | 2016-12-02 17:22:18 -0800 | [diff] [blame] | 3 | {{ data['NetworkSettings']['Networks'][network]['IPAddress'] }}:50555 }} |
alshabib | 9d22202 | 2016-11-10 16:11:09 -0800 | [diff] [blame] | 4 | {%- else -%} |
| 5 | None:None |
| 6 | {%- endif %} |
| 7 | {%- endmacro %} |
| 8 | |
alshabib | 7941d40 | 2016-11-08 00:11:20 +0100 | [diff] [blame] | 9 | services: |
| 10 | cord/voltha: |
| 11 | slaves: ["chameleon", "ofagent"] |
| 12 | |
| 13 | |
| 14 | slaves: |
| 15 | chameleon: |
| 16 | image: cord/chameleon |
| 17 | command: [ |
alshabib | 9d22202 | 2016-11-10 16:11:09 -0800 | [diff] [blame] | 18 | "/chameleon/chameleon/main.py", |
alshabib | 7941d40 | 2016-11-08 00:11:20 +0100 | [diff] [blame] | 19 | "-v", |
| 20 | "--consul=consul:8500", |
| 21 | "--fluentd=fluentd:24224", |
| 22 | "--rest-port=8881", |
alshabib | 9d22202 | 2016-11-10 16:11:09 -0800 | [diff] [blame] | 23 | "--grpc-endpoint={{ address(data, network) }}", |
alshabib | 7941d40 | 2016-11-08 00:11:20 +0100 | [diff] [blame] | 24 | "--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: [ |
alshabib | 9d22202 | 2016-11-10 16:11:09 -0800 | [diff] [blame] | 43 | "/ofagent/ofagent/main.py", |
alshabib | 7941d40 | 2016-11-08 00:11:20 +0100 | [diff] [blame] | 44 | "-v", |
| 45 | "--consul=${DOCKER_HOST_IP}:8500", |
| 46 | "--fluentd=fluentd:24224", |
| 47 | "--controller=${DOCKER_HOST_IP}:6633", |
alshabib | 9d22202 | 2016-11-10 16:11:09 -0800 | [diff] [blame] | 48 | "--grpc-endpoint={{ address(data, network) }}", |
alshabib | 7941d40 | 2016-11-08 00:11:20 +0100 | [diff] [blame] | 49 | "--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" |