summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2017-03-14 19:04:58 -0500
committerJose A. Rivera <jarrpa@redhat.com>2017-04-10 10:58:52 -0500
commit1a72183498f89644aacd32ae52ed3a65d85c86b3 (patch)
tree13083277411db742491aa8c7b4ef3c65412f02b7 /roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml
parentde6629addd794c6daaf018943097cc0d6aba5b23 (diff)
downloadopenshift-1a72183498f89644aacd32ae52ed3a65d85c86b3.tar.gz
openshift-1a72183498f89644aacd32ae52ed3a65d85c86b3.tar.bz2
openshift-1a72183498f89644aacd32ae52ed3a65d85c86b3.tar.xz
openshift-1a72183498f89644aacd32ae52ed3a65d85c86b3.zip
GlusterFS playbook and role
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml b/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml
new file mode 100644
index 000000000..76ae1db75
--- /dev/null
+++ b/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part1.yml
@@ -0,0 +1,41 @@
+---
+- name: Copy initial heketi resource files
+ copy:
+ src: "{{ openshift.common.examples_content_version }}/{{ item }}"
+ dest: "{{ mktemp.stdout }}/{{ item }}"
+ with_items:
+ - "deploy-heketi-template.yml"
+
+- name: Create deploy-heketi resources
+ oc_obj:
+ namespace: "{{ openshift_storage_glusterfs_namespace }}"
+ kind: template
+ name: deploy-heketi
+ state: present
+ files:
+ - "{{ mktemp.stdout }}/deploy-heketi-template.yml"
+
+- name: Deploy deploy-heketi pod
+ oc_process:
+ namespace: "{{ openshift_storage_glusterfs_namespace }}"
+ template_name: "deploy-heketi"
+ create: True
+ params:
+ IMAGE_NAME: "{{ openshift_storage_glusterfs_heketi_image }}"
+ IMAGE_VERSION: "{{ openshift_storage_glusterfs_heketi_version }}"
+ HEKETI_USER_KEY: "{{ openshift_storage_glusterfs_heketi_user_key }}"
+ HEKETI_ADMIN_KEY: "{{ openshift_storage_glusterfs_heketi_admin_key }}"
+
+- name: Wait for deploy-heketi pod
+ oc_obj:
+ namespace: "{{ openshift_storage_glusterfs_namespace }}"
+ kind: pod
+ state: list
+ selector: "glusterfs=deploy-heketi-pod,deploy-heketi=support"
+ register: heketi_pod
+ until:
+ - "heketi_pod.results.results[0]['items'] | count > 0"
+ # Pod's 'Ready' status must be True
+ - "heketi_pod.results.results[0]['items'] | oo_collect(attribute='status.conditions') | oo_collect(attribute='status', filters={'type': 'Ready'}) | map('bool') | select | list | count == 1"
+ delay: 10
+ retries: "{{ (openshift_storage_glusterfs_timeout / 10) | int }}"