aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-config/templates
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2016-01-13 14:59:11 +0800
committergrakiss <grakiss.wanglei@huawei.com>2016-01-15 17:29:31 +0800
commit2616357bbf1d5cfc1f7e3923e12b8adfc5627fc6 (patch)
tree093e22732b26a3edd7055e3af00684dd53ab17ea /deploy/adapters/ansible/roles/ceph-config/templates
parent7c7e58d3fa6d7d2b5deb02d68a767c98a7b7553a (diff)
deploy CEPH nodes parallelly
JIRA:COMPASS-264 - do not use ceph-deploy - do not need centeral node to deploy ceph Change-Id: I0f9c459060a2fccbad73a323697ec23ea2115410 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-config/templates')
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/templates/ceph.j225
-rw-r--r--deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j25
-rwxr-xr-xdeploy/adapters/ansible/roles/ceph-config/templates/dump_var.j28
3 files changed, 38 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-config/templates/ceph.j2 b/deploy/adapters/ansible/roles/ceph-config/templates/ceph.j2
new file mode 100755
index 00000000..bd0e3f5d
--- /dev/null
+++ b/deploy/adapters/ansible/roles/ceph-config/templates/ceph.j2
@@ -0,0 +1,25 @@
+[global]
+fsid = {{ ceph_fsid.stdout }}
+mon initial members = {{ groups["ceph_mon"] | join(", ")}}
+mon host =
+{%- for host in groups["ceph_mon"] -%}
+{{ ', ' if not loop.first else ''}}{{ ip_settings[host].mgmt.ip }}
+{%- endfor %}
+
+public network = {{ mgmt_cidr }}
+cluster network = {{ storage_cidr }}
+
+auth cluster required = cephx
+auth service required = cephx
+auth client required = cephx
+
+osd journal size = 1024
+filestore xattr use omap = true
+osd pool default size = 1
+osd pool default min size = 1
+osd pool default pg num = 333
+osd pool default pgp num = 333
+osd crush chooseleaf type = 1
+
+debug mon = 1
+debug ms = 0
diff --git a/deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j2 b/deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j2
new file mode 100644
index 00000000..7d1eb9d7
--- /dev/null
+++ b/deploy/adapters/ansible/roles/ceph-config/templates/create_monmap.j2
@@ -0,0 +1,5 @@
+monmaptool --create --clobber --fsid {{ ceph_fsid.stdout }}
+{%- for host in groups['ceph_mon']%}
+ --add {{host}} {{ ip_settings[host].mgmt.ip }}:6789
+{%- endfor %}
+ /tmp/monmap
diff --git a/deploy/adapters/ansible/roles/ceph-config/templates/dump_var.j2 b/deploy/adapters/ansible/roles/ceph-config/templates/dump_var.j2
new file mode 100755
index 00000000..a4a9b155
--- /dev/null
+++ b/deploy/adapters/ansible/roles/ceph-config/templates/dump_var.j2
@@ -0,0 +1,8 @@
+HOSTVARS (ANSIBLE GATHERED, group_vars, host_vars) :
+
+{{ hostvars[inventory_hostname] | to_yaml }}
+
+PLAYBOOK VARS:
+
+{{ vars | to_yaml }}
+