summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2017-06-09 17:36:48 -0500
committerJose A. Rivera <jarrpa@redhat.com>2017-06-13 13:10:23 -0500
commit97e1bc9436a757b2ffd802de531073f4b1b95c48 (patch)
tree731c6f8e2770348b2d472d60c197778ee5637eec /roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
parentddc472dbb4a54e15f07f6d947bda943a9a919da6 (diff)
downloadopenshift-97e1bc9436a757b2ffd802de531073f4b1b95c48.tar.gz
openshift-97e1bc9436a757b2ffd802de531073f4b1b95c48.tar.bz2
openshift-97e1bc9436a757b2ffd802de531073f4b1b95c48.tar.xz
openshift-97e1bc9436a757b2ffd802de531073f4b1b95c48.zip
GlusterFS: Remove requirement for heketi-cli
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Diffstat (limited to 'roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml27
1 files changed, 9 insertions, 18 deletions
diff --git a/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml b/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
index 80aa1f2db..3a9619d9d 100644
--- a/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
+++ b/roles/openshift_storage_glusterfs/tasks/heketi_deploy_part2.yml
@@ -1,8 +1,10 @@
---
- name: Create heketi DB volume
- command: "heketi-cli -s http://{{ glusterfs_heketi_url }} --user admin --secret '{{ glusterfs_heketi_admin_key }}' setup-openshift-heketi-storage --listfile {{ mktemp.stdout }}/heketi-storage.json"
+ command: "{{ glusterfs_heketi_client }} setup-openshift-heketi-storage --listfile /tmp/heketi-storage.json"
register: setup_storage
- failed_when: False
+
+- name: Copy heketi-storage list
+ shell: "{{ openshift.common.client_binary }} rsh {{ heketi_pod.results.results[0]['items'][0]['metadata']['name'] }} cat /tmp/heketi-storage.json > {{ mktemp.stdout }}/heketi-storage.json"
# This is used in the subsequent task
- name: Copy the admin client config
@@ -48,6 +50,8 @@
selector: "deploy-heketi"
- kind: "svc"
name: "heketi-storage-endpoints"
+ - kind: "secret"
+ name: "heketi-{{ glusterfs_name }}-topology-secret"
- name: Generate heketi endpoints
template:
@@ -118,23 +122,10 @@
delay: 10
retries: "{{ (glusterfs_timeout | int / 10) | int }}"
-- name: Determine heketi URL
- oc_obj:
- namespace: "{{ glusterfs_namespace }}"
- state: list
- kind: ep
- selector: "glusterfs=heketi-{{ glusterfs_name }}-service"
- register: heketi_url
- until:
- - "heketi_url.results.results[0]['items'][0].subsets[0].addresses[0].ip != ''"
- - "heketi_url.results.results[0]['items'][0].subsets[0].ports[0].port != ''"
- delay: 10
- retries: "{{ (glusterfs_timeout | int / 10) | int }}"
-
-- name: Set heketi URL
+- name: Set heketi-cli command
set_fact:
- glusterfs_heketi_url: "{{ heketi_url.results.results[0]['items'][0].subsets[0].addresses[0].ip }}:{{ heketi_url.results.results[0]['items'][0].subsets[0].ports[0].port }}"
+ glusterfs_heketi_client: "{% if glusterfs_heketi_is_native %}oc rsh {{ heketi_pod.results.results[0]['items'][0]['metadata']['name'] }} {% endif %}heketi-cli -s http://localhost:8080 --user admin --secret '{{ glusterfs_heketi_admin_key }}'"
- name: Verify heketi service
- command: "heketi-cli -s http://{{ glusterfs_heketi_url }} --user admin --secret '{{ glusterfs_heketi_admin_key }}' cluster list"
+ command: "{{ glusterfs_heketi_client }} cluster list"
changed_when: False