summaryrefslogtreecommitdiffstats
path: root/ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml
diff options
context:
space:
mode:
authorHui Wang <wanghui71@huawei.com>2018-05-25 09:09:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-05-25 09:09:51 +0000
commitf54e4aa4fd49b0d0beef8730dc6357e2407fd42f (patch)
treef8ae2b729eaf4c99546a0ee26e3d0c90b6b59f79 /ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml
parentea3c10e5533ae4bdbb3fc449e3baf2eb256b2ae3 (diff)
parentd5a74591c6716aad140b91153ec72bc61426480c (diff)
Merge "support deploying etcd on aarch64 platform"
Diffstat (limited to 'ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml')
-rw-r--r--ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml b/ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml
new file mode 100644
index 0000000..f3600d8
--- /dev/null
+++ b/ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml
@@ -0,0 +1,39 @@
+---
+- name: check for etcd existed
+ stat:
+ path: "{{ etcd_dir }}/etcd"
+ ignore_errors: yes
+ register: etcdexisted
+
+- name: download etcd
+ get_url:
+ url={{ etcd_download_url }}
+ dest=/opt/{{ etcd_tarball }}
+ when:
+ - etcdexisted.stat.exists is undefined or etcdexisted.stat.exists == false
+
+- name: extract the etcd tarball
+ unarchive:
+ src=/opt/{{ etcd_tarball }}
+ dest=/opt/
+ when:
+ - etcdexisted.stat.exists is undefined or etcdexisted.stat.exists == false
+
+- name: Check if etcd is running
+ shell: ps aux | grep etcd | grep -v grep
+ ignore_errors: true
+ register: service_etcd_status
+
+- name: run etcd daemon service
+ shell: ETCD_UNSUPPORTED_ARCH=arm64 nohup ./etcd --advertise-client-urls http://{{ etcd_host }}:{{ etcd_port }} --listen-client-urls http://{{ etcd_host }}:{{ etcd_port }} -listen-peer-urls http://{{ etcd_host }}:{{ etcd_peer_port }} &>>etcd.log &
+ become: true
+ args:
+ chdir: "{{ etcd_dir }}"
+ when: service_etcd_status.rc != 0
+
+- name: check etcd cluster health
+ shell: ./etcdctl --endpoints http://{{ etcd_host }}:{{ etcd_port }} cluster-health
+ become: true
+ ignore_errors: true
+ args:
+ chdir: "{{ etcd_dir }}"