diff options
author | Di Xu <di.xu@arm.com> | 2018-04-27 14:40:26 +0800 |
---|---|---|
committer | Di Xu <di.xu@arm.com> | 2018-05-15 15:18:28 +0800 |
commit | d5a74591c6716aad140b91153ec72bc61426480c (patch) | |
tree | 2d78751c2b399cf7cd2d79180a8f73d313674a18 /ci/ansible/roles/osdsdb/scenarios | |
parent | 957abb60ddc82354234687328460147e19607caf (diff) |
support deploying etcd on aarch64 platform
Change-Id: I8d6e2c3255e81d95e0546169f24c9090b34ce0b6
Signed-off-by: Di Xu <di.xu@arm.com>
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 }}" |