diff options
author | Hui Wang <wanghui71@huawei.com> | 2018-05-25 09:09:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-05-25 09:09:51 +0000 |
commit | f54e4aa4fd49b0d0beef8730dc6357e2407fd42f (patch) | |
tree | f8ae2b729eaf4c99546a0ee26e3d0c90b6b59f79 /ci/ansible/roles/osdsdb/scenarios | |
parent | ea3c10e5533ae4bdbb3fc449e3baf2eb256b2ae3 (diff) | |
parent | d5a74591c6716aad140b91153ec72bc61426480c (diff) |
Merge "support deploying etcd on aarch64 platform"
Diffstat (limited to 'ci/ansible/roles/osdsdb/scenarios')
-rw-r--r-- | ci/ansible/roles/osdsdb/scenarios/container.yml | 2 | ||||
-rw-r--r-- | ci/ansible/roles/osdsdb/scenarios/etcd_aarch64.yml | 39 |
2 files changed, 40 insertions, 1 deletions
diff --git a/ci/ansible/roles/osdsdb/scenarios/container.yml b/ci/ansible/roles/osdsdb/scenarios/container.yml index afbd15b..a5c71d9 100644 --- a/ci/ansible/roles/osdsdb/scenarios/container.yml +++ b/ci/ansible/roles/osdsdb/scenarios/container.yml @@ -2,7 +2,7 @@ - name: run etcd containerized service
docker:
name: myetcd
- image: quay.io/coreos/etcd:latest
+ image: {{ etcd_docker_image }}
command: /usr/local/bin/etcd --advertise-client-urls http://{{ etcd_host }}:{{ etcd_port }} --listen-client-urls http://{{ etcd_host }}:{{ etcd_port }} -advertise-client-urls http://{{ etcd_host }}:{{ etcd_peer_port }} -listen-peer-urls http://{{ etcd_host }}:{{ etcd_peer_port }}
state: started
net: host
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 }}" |