diff --git a/etc/openstack_deploy/user_secrets.yml b/etc/openstack_deploy/user_secrets.yml index 9ee4d4fcc9..2ac1c522b4 100644 --- a/etc/openstack_deploy/user_secrets.yml +++ b/etc/openstack_deploy/user_secrets.yml @@ -43,12 +43,6 @@ cinder_profiler_hmac_key: glance_container_mysql_password: glance_service_password: glance_profiler_hmac_key: -### Extra options when configuring swift as a glance back-end. -glance_swift_store_auth_address: "https://some.auth.url.com" -glance_swift_store_user: "OPENSTACK_TENANT_ID:OPENSTACK_USER_NAME" -glance_swift_store_key: "OPENSTACK_USER_PASSWORD" -glance_swift_store_container: "NAME_OF_SWIFT_CONTAINER" -glance_swift_store_region: "NAME_OF_REGION" ## Heat Options heat_stack_domain_admin_password: diff --git a/etc/openstack_deploy/user_variables.yml b/etc/openstack_deploy/user_variables.yml index 05ed5e55a1..7453df51c9 100644 --- a/etc/openstack_deploy/user_variables.yml +++ b/etc/openstack_deploy/user_variables.yml @@ -34,6 +34,15 @@ glance_swift_store_endpoint_type: internalURL # nova_cpu_allocation_ratio: 2.0 # nova_ram_allocation_ratio: 1.0 +## Glance with Swift +### Extra options when configuring swift as a glance back-end. +### By default it will use the local swift install +### Set these when using a remote swift as a glance backend +#glance_swift_store_auth_address: "https://some.auth.url.com" +#glance_swift_store_user: "OPENSTACK_TENANT_ID:OPENSTACK_USER_NAME" +#glance_swift_store_key: "OPENSTACK_USER_PASSWORD" +#glance_swift_store_container: "NAME_OF_SWIFT_CONTAINER" +#glance_swift_store_region: "NAME_OF_REGION" ## Swift # This will allow all users to create containers and upload to swift if set to True diff --git a/playbooks/roles/os_glance/defaults/main.yml b/playbooks/roles/os_glance/defaults/main.yml index bb58d22574..33d6a4adfb 100644 --- a/playbooks/roles/os_glance/defaults/main.yml +++ b/playbooks/roles/os_glance/defaults/main.yml @@ -42,18 +42,6 @@ glance_enable_v1_registry: True glance_enable_v2_api: True glance_enable_v2_registry: True - -## Swift Options -glance_swift_store_auth_address: NoAuthAddress -glance_swift_store_user: NoUser -glance_swift_store_key: NoKey -glance_swift_store_region: NoRegion -glance_swift_store_container: NoContainer -glance_swift_store_endpoint_type: internalURL -# Set the swift_store_large_objects variables in MB -glance_swift_store_large_object_size: 5120 -glance_swift_store_large_object_chunk_size: 200 - ## DB info glance_galera_database: glance glance_galera_user: glance @@ -85,6 +73,17 @@ glance_service_internalurl: "{{ glance_service_internaluri }}" glance_service_adminuri: "{{ glance_service_proto }}://{{ internal_lb_vip_address }}:{{ glance_service_port }}" glance_service_adminurl: "{{ glance_service_adminuri }}" +## Swift Options +glance_swift_store_auth_address: "{{ keystone_service_internalurl }}" +glance_swift_store_user: "service:{{ glance_service_user_name }}" +glance_swift_store_key: "{{ glance_service_password }}" +glance_swift_store_region: "{{ glance_service_region }}" +glance_swift_store_container: glance_images +glance_swift_store_endpoint_type: internalURL +# Set the swift_store_large_objects variables in MB +glance_swift_store_large_object_size: 5120 +glance_swift_store_large_object_chunk_size: 200 + ## Keystone authentication middleware glance_keystone_auth_plugin: password diff --git a/scripts/bootstrap-aio.sh b/scripts/bootstrap-aio.sh index 6e89c686db..980c52039c 100755 --- a/scripts/bootstrap-aio.sh +++ b/scripts/bootstrap-aio.sh @@ -320,11 +320,6 @@ echo "neutron_metadata_workers: 1" | tee -a /etc/openstack_deploy/user_variables if [ "${DEPLOY_SWIFT}" == "yes" ]; then # ensure that glance is configured to use swift sed -i "s/glance_default_store:.*/glance_default_store: swift/" /etc/openstack_deploy/user_variables.yml - sed -i "s/glance_swift_store_auth_address:.*/glance_swift_store_auth_address: '{{ keystone_service_internalurl }}'/" /etc/openstack_deploy/user_secrets.yml - sed -i "s/glance_swift_store_container:.*/glance_swift_store_container: glance_images/" /etc/openstack_deploy/user_secrets.yml - sed -i "s/glance_swift_store_key:.*/glance_swift_store_key: '{{ keystone_auth_admin_password }}'/" /etc/openstack_deploy/user_secrets.yml - sed -i "s/glance_swift_store_region:.*/glance_swift_store_region: ${SERVICE_REGION}/" /etc/openstack_deploy/user_secrets.yml - sed -i "s/glance_swift_store_user:.*/glance_swift_store_user: '{{ keystone_admin_user_name }}:{{ keystone_admin_tenant_name }}'/" /etc/openstack_deploy/user_secrets.yml echo "cinder_service_backup_program_enabled: True" | tee -a /etc/openstack_deploy/user_variables.yml echo "tempest_volume_backup_enabled: True" | tee -a /etc/openstack_deploy/user_variables.yml fi