From a66f0076eab1907fb4a0ed68e76ac28ac9e03201 Mon Sep 17 00:00:00 2001 From: Mathias Ewald Date: Sun, 24 Jul 2016 07:04:02 +0000 Subject: [PATCH] Consistent external Ceph configuration for Glance Made glance follow the _backend_ceph configuration pattern. Change-Id: I7bc2b3b35d96bd297d520750dccd7333fa68d941 Closes-Bug: #1605962 --- ansible/group_vars/all.yml | 9 +++++++-- ansible/roles/glance/tasks/deploy.yml | 4 ++-- ansible/roles/glance/templates/glance-api.conf.j2 | 2 +- ansible/roles/glance/templates/glance-api.json.j2 | 2 +- doc/external-ceph-guide.rst | 4 ++-- etc/kolla/globals.yml | 11 +++++++---- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index c6fc6f245d..dd45d010c7 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -223,8 +223,6 @@ nova_keystone_user: "nova" enable_nova_fake: "no" num_nova_fake_per_node: 5 -# Control usage of ceph per service -glance_enable_ceph: "{{ enable_ceph }}" #################### # RabbitMQ options @@ -247,6 +245,13 @@ kolla_external_fqdn_cert: "{{ node_config_directory }}/certificates/haproxy.pem" kibana_user: "kibana" +####################### +# Glance options +####################### +glance_backend_file: "{{ not enable_ceph | bool }}" +glance_backend_ceph: "{{ enable_ceph }}" + + ################################# # Cinder options ################################# diff --git a/ansible/roles/glance/tasks/deploy.yml b/ansible/roles/glance/tasks/deploy.yml index 65df10888c..0704c65bbd 100644 --- a/ansible/roles/glance/tasks/deploy.yml +++ b/ansible/roles/glance/tasks/deploy.yml @@ -1,14 +1,14 @@ --- - include: ceph.yml when: - - (enable_ceph | bool) and (glance_enable_ceph | bool) + - (enable_ceph | bool) and (glance_backend_ceph | bool) - inventory_hostname in groups['ceph-mon'] or inventory_hostname in groups['glance-api'] or inventory_hostname in groups['glance-registry'] - include: external_ceph.yml when: - - (enable_ceph | bool == False) and (glance_enable_ceph | bool) + - (enable_ceph | bool == False) and (glance_backend_ceph | bool) - inventory_hostname in groups['glance-api'] or inventory_hostname in groups['glance-registry'] diff --git a/ansible/roles/glance/templates/glance-api.conf.j2 b/ansible/roles/glance/templates/glance-api.conf.j2 index 86ae85f1cf..c10d56e79a 100644 --- a/ansible/roles/glance/templates/glance-api.conf.j2 +++ b/ansible/roles/glance/templates/glance-api.conf.j2 @@ -40,7 +40,7 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi flavor = keystone [glance_store] -{% if enable_ceph | bool and glance_enable_ceph | bool %} +{% if enable_ceph | bool and glance_backend_ceph | bool %} default_store = rbd stores = rbd rbd_store_user = glance diff --git a/ansible/roles/glance/templates/glance-api.json.j2 b/ansible/roles/glance/templates/glance-api.json.j2 index 1afd6929ff..2d3c4cc9fa 100644 --- a/ansible/roles/glance/templates/glance-api.json.j2 +++ b/ansible/roles/glance/templates/glance-api.json.j2 @@ -6,7 +6,7 @@ "dest": "/etc/glance/glance-api.conf", "owner": "glance", "perm": "0600" - }{% if glance_enable_ceph | bool %}, + }{% if glance_backend_ceph | bool %}, { "source": "{{ container_config_directory }}/ceph.*", "dest": "/etc/ceph/", diff --git a/doc/external-ceph-guide.rst b/doc/external-ceph-guide.rst index 2309191631..b560ab218f 100644 --- a/doc/external-ceph-guide.rst +++ b/doc/external-ceph-guide.rst @@ -33,10 +33,10 @@ service in ``/etc/kolla/global.yml``: :: - glance_enable_ceph: "yes" + glance_backend_ceph: "yes" cinder_backend_ceph: "yes" -The combination of ``enable_ceph: "no"`` and ``_enable_ceph: "yes"`` +The combination of ``enable_ceph: "no"`` and ``_backend_ceph: "yes"`` triggers the activation of external ceph mechanism in Kolla. Configuring External Ceph diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 1b6f006cd4..6b1b192a5c 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -126,10 +126,6 @@ neutron_external_interface: "eth1" #enable_swift: "no" #enable_tempest: "no" -# Control usage of ceph per service. This allows to configure external ceph -# when ceph is not deployed by Kolla. -#glance_enable_ceph: "{{ enable_ceph }}" - ################### # Ceph options @@ -144,6 +140,13 @@ neutron_external_interface: "eth1" # Valid options are [ erasure, replicated ] #ceph_pool_type: "replicated" +####################### +# Glance options +####################### +# Configure image backend. +glance_backend_file: "yes" +#glance_backend_ceph: "no" + ####################### # Cinder options