aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.yml
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2015-09-14 10:49:05 +0800
committergrakiss <grakiss.wanglei@huawei.com>2015-09-15 12:29:03 +0800
commitdd6e44a29d47ba25374ae74a3eacdcfedbfd1b7b (patch)
treec76f1cb3bc503a34cdb756d5787867530a1a51a4 /deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.yml
parentb40d47e921a9af9685329ce8a4bfcdc2aa81af4a (diff)
add ceph integration with compass
Change-Id: I92b0697cc29e65838e15c9d10a6b0871a4e752b6 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.yml')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.yml
new file mode 100644
index 00000000..f897c944
--- /dev/null
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_install.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 {{ 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 osd prepare {{ item }}:/var/local/osd
+ with_items:
+ - "{{ groups['controller'] }}"
+ tags:
+ - create_osd
+
+
+- name: activate osd
+ shell: cd {{ ceph_cluster_dir[0] }} && ceph-deploy osd activate {{ item }}:/var/local/osd && ceph-deploy 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] }}