aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-20 12:17:45 +0000
committerGerrit Code Review <review@openstack.org>2016-09-20 12:17:45 +0000
commitb7ea5ed91eb98ea9fc18d91b3d5da1aae7603436 (patch)
tree8fe29fdef179241f4bfd1221a3c88f8f56645618
parent00d0e1bc392cd0f7bca76b18a84e16de4cb82ba9 (diff)
parent08146dc3b67762bf526a966cd973483b5325b878 (diff)
downloadkolla-b7ea5ed91eb98ea9fc18d91b3d5da1aae7603436.tar.gz
kolla-b7ea5ed91eb98ea9fc18d91b3d5da1aae7603436.zip
Merge "Allow genconfig to work with kolla-kubernetes and ceph"
-rw-r--r--ansible/roles/ceph/templates/ceph-mon.json.j24
-rw-r--r--ansible/roles/ceph/templates/ceph-osd.json.j24
-rw-r--r--ansible/roles/ceph/templates/ceph.conf.j26
3 files changed, 13 insertions, 1 deletions
diff --git a/ansible/roles/ceph/templates/ceph-mon.json.j2 b/ansible/roles/ceph/templates/ceph-mon.json.j2
index d3a32b399..c1cc96454 100644
--- a/ansible/roles/ceph/templates/ceph-mon.json.j2
+++ b/ansible/roles/ceph/templates/ceph-mon.json.j2
@@ -1,5 +1,9 @@
{
+{%- if orchestration_engine == 'KUBERNETES' %}
+ "command": "/usr/bin/ceph-mon -d -i @MONID@ --public-addr @MONADDR@:6789",
+{%- else %}
"command": "/usr/bin/ceph-mon -d -i {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }} --public-addr {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}:6789",
+{%- endif %}
"config_files": [
{
"source": "{{ container_config_directory }}/ceph.conf",
diff --git a/ansible/roles/ceph/templates/ceph-osd.json.j2 b/ansible/roles/ceph/templates/ceph-osd.json.j2
index 24ace33c0..f6d62e892 100644
--- a/ansible/roles/ceph/templates/ceph-osd.json.j2
+++ b/ansible/roles/ceph/templates/ceph-osd.json.j2
@@ -1,5 +1,9 @@
{
+{%- if orchestration_engine == 'KUBERNETES' %}
+ "command": "/usr/bin/ceph-osd -f -d --public-addr @HOSTADDR@ --cluster-addr @CLUSTERADDR@",
+{%- else %}
"command": "/usr/bin/ceph-osd -f -d --public-addr {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }} --cluster-addr {{ hostvars[inventory_hostname]['ansible_' + cluster_interface]['ipv4']['address'] }}",
+{%- endif %}
"config_files": [
{
"source": "{{ container_config_directory }}/ceph.conf",
diff --git a/ansible/roles/ceph/templates/ceph.conf.j2 b/ansible/roles/ceph/templates/ceph.conf.j2
index 261c594cd..2d69c8d6d 100644
--- a/ansible/roles/ceph/templates/ceph.conf.j2
+++ b/ansible/roles/ceph/templates/ceph.conf.j2
@@ -4,11 +4,13 @@ log to syslog = true
err to syslog = true
fsid = {{ ceph_cluster_fsid }}
+{% if orchestration_engine != 'KUBERNETES' %}
mon initial members = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}{% if not loop.last %}, {% endif %}{% endfor %}
mon host = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}{% if not loop.last %}, {% endif %}{% endfor %}
mon addr = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}:6789{% if not loop.last %}, {% endif %}{% endfor %}
+{% endif %}
auth cluster required = cephx
auth service required = cephx
@@ -27,8 +29,10 @@ mon compact on start = true
{% if service_name is defined and service_name == 'ceph-rgw' %}
[client.radosgw.gateway]
+{% if orchestration_engine != 'KUBERNETES' %}
host = {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
+rgw frontends = civetweb port={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rgw_port }}
+{% endif %}
keyring = /etc/ceph/ceph.client.radosgw.keyring
log file = /var/log/kolla/ceph/client.radosgw.gateway.log
-rgw frontends = civetweb port={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rgw_port }}
{% endif %}