diff options
author | grakiss <grakiss.wanglei@huawei.com> | 2015-09-21 09:48:33 +0800 |
---|---|---|
committer | grakiss <grakiss.wanglei@huawei.com> | 2015-09-24 15:43:56 +0800 |
commit | 47cfbaa9070f5a12272627ff3648e28388f279f5 (patch) | |
tree | 407b03c64a1255f57f1c3eb18043ce3d63201236 /deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml | |
parent | d16d74fbbe738f0d15366dedf9f5e042505ee1e8 (diff) |
support ceph deploy for centos
JIRA: COMPASS-60
Change-Id: I9bcc5009b7d9b2f3cc48f1f1a448a1f07af65494
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml new file mode 100644 index 00000000..ed88cd5c --- /dev/null +++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install_RedHat.yml @@ -0,0 +1,49 @@ +--- +- name: create ceph cluster + shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy new {{ ceph_cluster_hosts.stdout_lines[0] }} + tags: + - create_ceph_cluster + +- name: install ceph for every nodes includes jumpserver + shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy install --no-adjust-repos --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc {{ ceph_cluster_hosts.stdout_lines[0]}} + +- name: create monitor node in controller group + shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --overwrite-conf mon create-initial + +- name: copy create_osd.sh to host1 + copy: src=create_osd.sh dest=~/create_osd.sh mode=0777 + tags: + - create_osd + +- name: copy create_osd.sh to other nodes + shell: scp -o StrictHostKeyChecking=no ~/create_osd.sh {{ item }}:~/ + with_items: + - "{{ groups['controller'] }}" + tags: + - create_osd + +- name: create osd + shell: ssh -o StrictHostKeyChecking=no -t {{ item }} "~/create_osd.sh" + with_items: + - "{{ groups['controller'] }}" + tags: + - create_osd + +- name: prepare create osd + shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc osd prepare {{ item }}:/var/local/osd + with_items: + - "{{ groups['controller'] }}" + tags: + - create_osd + + +- name: activate osd + shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy --repo-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa --gpg-url http://10.1.0.12/cblr/repo_mirror/centos7-juno-ppa/ceph_key_release.asc osd activate {{ item }}:/var/local/osd + with_items: + - "{{ groups['controller'] }}" + tags: + - create_osd + - activate_osd + +- name: create admin node + shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy admin {{ ceph_cluster_hosts.stdout_lines[0] }} |