From 3fc9da6b7dd0e3dc2d1afd7b2dfad4f4189232d4 Mon Sep 17 00:00:00 2001 From: wutianwei Date: Mon, 7 Aug 2017 20:03:34 +0800 Subject: Make the storage use ceph 1. ceph.yml define which host install ceph-mon and ceph-osd 2. user_ceph.yml define variables of ceph and cinder backend 3. user_variables_ceph.yml.j2 define variables of ceph for user Change-Id: Iafea998f4603eb4b5c15a26f2387e6cb04c35d4c Signed-off-by: wutianwei --- .../ansible/roles/config-osa/templates/ceph.yml.j2 | 14 ++++++++++ .../config-osa/templates/user_variables.yml.j2 | 4 +++ .../templates/user_variables_ceph.yml.j2 | 31 ++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 deploy/adapters/ansible/roles/config-osa/templates/ceph.yml.j2 create mode 100644 deploy/adapters/ansible/roles/config-osa/templates/user_variables_ceph.yml.j2 (limited to 'deploy/adapters/ansible/roles/config-osa/templates') diff --git a/deploy/adapters/ansible/roles/config-osa/templates/ceph.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/ceph.yml.j2 new file mode 100644 index 00000000..c85dd59b --- /dev/null +++ b/deploy/adapters/ansible/roles/config-osa/templates/ceph.yml.j2 @@ -0,0 +1,14 @@ +# The infra nodes where the Ceph mon services will run +ceph-mon_hosts: +{% for host in groups.ceph_mon%} + {{host}}: + ip: {{ hostvars[host]['ansible_ssh_host'] }} +{% endfor %} + +# The nodes that the Ceph OSD disks will be running on +ceph-osd_hosts: +{% for host in groups.ceph_osd%} + {{host}}: + ip: {{ hostvars[host]['ansible_ssh_host'] }} +{% endfor %} + diff --git a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 index 2b4a959a..a6cefd71 100644 --- a/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 +++ b/deploy/adapters/ansible/roles/config-osa/templates/user_variables.yml.j2 @@ -27,6 +27,10 @@ haproxy_keepalived_external_interface: br-external haproxy_keepalived_internal_interface: br-mgmt keepalived_ping_address: "{{ ntp_server }}" +cinder_cinder_conf_overrides: + DEFAULT: + public_endpoint: "https://{{ public_vip.ip }}" + {% if "openvswitch" == NEUTRON_MECHANISM_DRIVERS[0] or "opendaylight" == NEUTRON_MECHANISM_DRIVERS[0] %} diff --git a/deploy/adapters/ansible/roles/config-osa/templates/user_variables_ceph.yml.j2 b/deploy/adapters/ansible/roles/config-osa/templates/user_variables_ceph.yml.j2 new file mode 100644 index 00000000..de3c0290 --- /dev/null +++ b/deploy/adapters/ansible/roles/config-osa/templates/user_variables_ceph.yml.j2 @@ -0,0 +1,31 @@ +--- +# Copyright 2017, Logan Vig +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +## ceph-ansible settings +devices: {{ hostvars[ceph_host]['fact_for_ceph'] }} +common_single_host_mode: true +monitor_interface: eth1 +public_network: "{{ mgmt_cidr }} " +cluster_network: "{{ storage_cidr }}" +journal_size: 100 +journal_collocation: true +pool_default_pg_num: 32 +openstack_config: true # Ceph ansible automatically creates pools & keys +cinder_ceph_client: cinder +cinder_default_volume_type: RBD +glance_ceph_client: glance +glance_default_store: rbd +glance_rbd_store_pool: images +nova_libvirt_images_rbd_pool: vms -- cgit 1.2.3-korg