summaryrefslogtreecommitdiffstats
path: root/kube2consul/bin/blueprint/task.yml
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-08-11 09:16:22 +0000
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-08-11 09:19:23 +0000
commit3736aafdb168d76483a42acb552098244ceee034 (patch)
treeddd22127094ba06bd1dd74c6f3b23b437eae4066 /kube2consul/bin/blueprint/task.yml
parent012e88c913f39706fa6ae1b79c1fe0924ac1d2df (diff)
Initial commit for registrator source codes
Change-Id: I0cdd285d6228f0a1b6a6b27787be09d2d7af3579 Issue-Id: OOM-61 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'kube2consul/bin/blueprint/task.yml')
-rw-r--r--kube2consul/bin/blueprint/task.yml118
1 files changed, 118 insertions, 0 deletions
diff --git a/kube2consul/bin/blueprint/task.yml b/kube2consul/bin/blueprint/task.yml
new file mode 100644
index 0000000..45cfcd9
--- /dev/null
+++ b/kube2consul/bin/blueprint/task.yml
@@ -0,0 +1,118 @@
+---
+- name: remove kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ state: absent
+
+- name: run kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ log_driver: syslog
+ net: host
+ restart_policy: always
+ volumes:
+ - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}"
+ env:
+ KUBE_MASTER_IP: "{{kube_master_ip}}"
+ PDM_CONTROLLER_IP: "{{pdm_controller_ip}}"
+ JOIN_IP: "{{consul_join_ip}}"
+ when:
+ - all_in_one == 'no'
+ - master_in_controller == 'no'
+ - cluster_type == 'k8s'
+
+- name: run kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ net: host
+ restart_policy: always
+ privileged: true
+ volumes:
+ - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}"
+ - "/root/.kube/config:/root/.kube/config:ro"
+ env:
+ KUBE_MASTER_IP: "{{kube_master_ip}}"
+ PDM_CONTROLLER_IP: "{{pdm_controller_ip}}"
+ JOIN_IP: "{{consul_join_ip}}"
+ CLUSTER_TYPE: "openshift"
+ when:
+ - all_in_one == 'no'
+ - master_in_controller == 'no'
+ - cluster_type == 'openshift'
+
+- name: run kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ log_driver: syslog
+ restart_policy: always
+ volumes:
+ - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}"
+ env:
+ KUBE_MASTER_IP: "{{kube_master_ip}}"
+ PDM_CONTROLLER_IP: "{{pdm_controller_ip}}"
+ JOIN_IP: "{{consul_join_ip}}"
+ ALL_IN_ONE: "yes"
+ when:
+ - all_in_one == 'yes'
+ - cluster_type == 'k8s'
+
+- name: run kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ log_driver: syslog
+ restart_policy: always
+ privileged: true
+ volumes:
+ - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}"
+ - "/root/.kube/config:/root/.kube/config:ro"
+ env:
+ KUBE_MASTER_IP: "{{kube_master_ip}}"
+ PDM_CONTROLLER_IP: "{{pdm_controller_ip}}"
+ JOIN_IP: "{{consul_join_ip}}"
+ ALL_IN_ONE: "yes"
+ CLUSTER_TYPE: "openshift"
+ when:
+ - all_in_one == 'yes'
+ - cluster_type == 'openshift'
+
+- name: run kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ log_driver: syslog
+ restart_policy: always
+ volumes:
+ - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}"
+ env:
+ KUBE_MASTER_IP: "{{kube_master_ip}}"
+ PDM_CONTROLLER_IP: "{{pdm_controller_ip}}"
+ JOIN_IP: "{{consul_join_ip}}"
+ ALL_IN_ONE: "yes"
+ when:
+ - master_in_controller == 'yes'
+ - cluster_type == 'k8s'
+
+- name: run kube2consul container
+ docker:
+ name: kube2consul
+ image: "{{kube2consul_image}}"
+ log_driver: syslog
+ restart_policy: always
+ privileged: true
+ volumes:
+ - "{{ kube2consul_data_host }}:{{ kube2consul_data_container }}"
+ - "/root/.kube/config:/root/.kube/config:ro"
+ env:
+ KUBE_MASTER_IP: "{{kube_master_ip}}"
+ PDM_CONTROLLER_IP: "{{pdm_controller_ip}}"
+ JOIN_IP: "{{consul_join_ip}}"
+ ALL_IN_ONE: "yes"
+ CLUSTER_TYPE: "openshift"
+ when:
+ - master_in_controller == 'yes'
+ - cluster_type == 'openshift' \ No newline at end of file