summaryrefslogtreecommitdiffstats
path: root/util/docker-compose/roles/compass/templates/docker-compose.yml.j2
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-11-07 15:30:51 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-12-21 15:35:12 +0800
commita360411cb8c775dffa24a4157cec2b566cbde6f3 (patch)
tree400e879a6f6779c294d7f2113c05b29d5578cff3 /util/docker-compose/roles/compass/templates/docker-compose.yml.j2
parent4074d39e93d7e7697dd2aaad2e08433ca0a60221 (diff)
Add compass-docker-compose
1. Add ansible for docker compose containerized compass 2. deploy/conf/compass.conf no longer specify image tags for runtime. build.yaml now is added into compass tarball to be the only place determine image tags 3. This patch is based on patch: https://gerrit.opnfv.org/gerrit/#/c/47393/ use merged compass-tasks 4. Tempoarily using private docker repo for compass-tasks. Switch to opnfv repo when patch https://gerrit.opnfv.org/gerrit/#/c/47329/ is merged 5. Modify ansible callback module accrodingly Change-Id: I0728a9002a1cc7804c9e8f13bd1afdccb684a159 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'util/docker-compose/roles/compass/templates/docker-compose.yml.j2')
-rwxr-xr-xutil/docker-compose/roles/compass/templates/docker-compose.yml.j2103
1 files changed, 103 insertions, 0 deletions
diff --git a/util/docker-compose/roles/compass/templates/docker-compose.yml.j2 b/util/docker-compose/roles/compass/templates/docker-compose.yml.j2
new file mode 100755
index 00000000..7fc8ea3a
--- /dev/null
+++ b/util/docker-compose/roles/compass/templates/docker-compose.yml.j2
@@ -0,0 +1,103 @@
+version: '2'
+
+services:
+{% if compass_db is defined %}
+ compass-db:
+ container_name: compass-db
+ hostname: compass-db
+ privileged: true
+ expose:
+ - 3306
+ tty: true
+ image: {{ compass_db }}
+ stdin_open: true
+ command:
+ - /sbin/entrypoint.sh
+{% endif %}
+
+{% if compass_mq is defined %}
+ compass-mq:
+ container_name: compass-mq
+ hostname: compass-mq
+ privileged: true
+ expose:
+ - 5672
+ tty: true
+ image: {{ compass_mq }}
+ stdin_open: true
+{% endif %}
+
+{% if compass_tasks is defined %}
+ compass-tasks:
+ container_name: compass-tasks
+ hostname: compass-tasks
+ privileged: true
+ image: {{ compass_tasks }}
+ links:
+ - compass-mq
+ - compass-cobbler
+ depends_on:
+ - compass-mq
+ - compass-cobbler
+ stdin_open: true
+ volumes:
+ - {{ docker_compose_dir }}/compass_conf:/etc/compass
+ - {{ docker_compose_dir }}/ansible:/var/ansible
+ command:
+ - /usr/local/bin/start.sh
+{% endif %}
+
+{% if compass_deck is defined %}
+ compass-deck:
+ container_name: compass-deck
+ hostname: compass-deck
+ privileged: true
+ image: {{ compass_deck }}
+ ports:
+ - {{ host_ip }}:{{ deck_port }}:80/tcp
+ - {{ external_ip.stdout }}:{{ deck_port }}:80/tcp
+ tty: true
+ links:
+ - compass-db
+ - compass-mq
+ depends_on:
+ - compass-db
+ - compass-mq
+ stdin_open: true
+ volumes:
+ - {{ docker_compose_dir }}/compass_conf:/etc/compass
+ command:
+ - /sbin/init
+ - /usr/local/bin/start.sh
+{% endif %}
+
+{% if compass_cobbler is defined %}
+ compass-cobbler:
+ container_name: compass-cobbler
+ hostname: compass-cobbler
+ network_mode: host
+ privileged: true
+ image: {{ compass_cobbler }}
+ ports:
+ - {{ host_ip }}:80:80/tcp
+ - {{ host_ip }}:69:69
+ - {{ host_ip }}:443:443/tcp
+ - {{ host_ip }}:25151:25151/tcp
+ - {{ host_ip }}:67:67/tcp
+ volumes:
+ - {{ docker_compose_dir }}/cobbler:/root/cobbler
+ command:
+ - /sbin/init
+{% endif %}
+
+{% if compass_repo is defined %}
+ compass-repo:
+ container_name: compass-repo
+ hostname: compass-repo
+ privileged: true
+ image: {{ compass_repo }}
+ ports:
+ - {{ host_ip }}:{{ repo_port }}:80/tcp
+ tty: true
+ stdin_open: true
+{% endif %}