aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-28 11:26:26 +0000
committerGerrit Code Review <review@openstack.org>2015-09-28 11:26:26 +0000
commite69571eeb3729907be2ea6acb80904c4790a6916 (patch)
tree28e0044ab7bf86a1ce63279e0002e7f993680e0f /ansible
parent6c1e4e02073e2e64b387fd62104d91ed7d1aeffd (diff)
parent83d195249ebb7250f1531e865ee962944997e9bd (diff)
downloadkolla-e69571eeb3729907be2ea6acb80904c4790a6916.tar.gz
kolla-e69571eeb3729907be2ea6acb80904c4790a6916.zip
Merge "Convert ceph to json"
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/ceph/tasks/config.yml10
-rw-r--r--ansible/roles/ceph/tasks/start_mons.yml1
-rw-r--r--ansible/roles/ceph/templates/ceph-mon.json.j232
-rw-r--r--ansible/roles/ceph/templates/ceph-osd.json.j217
4 files changed, 59 insertions, 1 deletions
diff --git a/ansible/roles/ceph/tasks/config.yml b/ansible/roles/ceph/tasks/config.yml
index d242ea80c..a9f99e820 100644
--- a/ansible/roles/ceph/tasks/config.yml
+++ b/ansible/roles/ceph/tasks/config.yml
@@ -10,6 +10,11 @@
- "{{ node_templates_directory }}/{{ service_name }}/ceph.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/ceph.conf"
+- name: Copying over ceph-mon JSON configuration file
+ template:
+ src: "ceph-mon.json.j2"
+ dest: "{{ node_config_directory }}/ceph-mon/config.json"
+
- include: ../../config.yml
vars:
service_name: "ceph-osd"
@@ -20,3 +25,8 @@
- "{{ node_templates_directory }}/{{ service_name }}/ceph.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/ceph.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/ceph.conf"
+
+- name: Copying over ceph-osd JSON configuration file
+ template:
+ src: "ceph-osd.json.j2"
+ dest: "{{ node_config_directory }}/ceph-osd/config.json"
diff --git a/ansible/roles/ceph/tasks/start_mons.yml b/ansible/roles/ceph/tasks/start_mons.yml
index ab50d7355..0f70905b8 100644
--- a/ansible/roles/ceph/tasks/start_mons.yml
+++ b/ansible/roles/ceph/tasks/start_mons.yml
@@ -18,5 +18,4 @@
- "ceph_mon_data"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
- MON_IP: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
when: inventory_hostname in groups['ceph-mon']
diff --git a/ansible/roles/ceph/templates/ceph-mon.json.j2 b/ansible/roles/ceph/templates/ceph-mon.json.j2
new file mode 100644
index 000000000..0b6f2c772
--- /dev/null
+++ b/ansible/roles/ceph/templates/ceph-mon.json.j2
@@ -0,0 +1,32 @@
+{
+ "command": "/usr/bin/ceph-mon -d -i {{ ansible_hostname }} --public-addr {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}:6789",
+ "config_files": [
+ {
+ "source": "/opt/kolla/config_files/ceph.conf",
+ "dest": "/etc/ceph/ceph.conf",
+ "owner": "glance",
+ "perm": "0600"
+ }
+ {
+ "source": "/opt/kolla/config_files/ceph.client.admin.keyring",
+ "dest": "/etc/ceph/ceph.client.admin.keyring",
+ "owner": "ceph",
+ "perm": "0600"
+ "optional": True
+ },
+ {
+ "source": "/opt/kolla/config_files/ceph.client.mon.keyring",
+ "dest": "/etc/ceph/ceph.client.mon.keyring",
+ "owner": "ceph",
+ "perm": "0600"
+ "optional": True
+ },
+ {
+ "source": "/opt/kolla/config_files/ceph.monmap",
+ "dest": "/etc/ceph/ceph.monmap",
+ "owner": "ceph",
+ "perm": "0600"
+ "optional": True
+ }
+ ]
+}
diff --git a/ansible/roles/ceph/templates/ceph-osd.json.j2 b/ansible/roles/ceph/templates/ceph-osd.json.j2
new file mode 100644
index 000000000..288ebc6ba
--- /dev/null
+++ b/ansible/roles/ceph/templates/ceph-osd.json.j2
@@ -0,0 +1,17 @@
+{
+ "command": "/usr/bin/ceph-osd -f -d",
+ "config_files": [
+ {
+ "source": "/opt/kolla/config_files/ceph.conf",
+ "dest": "/etc/ceph/ceph.conf",
+ "owner": "glance",
+ "perm": "0600"
+ },
+ {
+ "source": "/opt/kolla/config_files/ceph.client.admin.keyring",
+ "dest": "/etc/ceph/ceph.client.admin.keyring",
+ "owner": "ceph",
+ "perm": "0600"
+ }
+ ]
+}