After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 156 of 317

Glance OpenStack Image Service 146 How to do it... Carry out the following steps to configure OpenStack Image Service to use OpenStack Storage: 1. We first need to install a package on our OpenStack Image Service host, that allows it to communicate to our OpenStack Storage service. We do this as follows: sudo apt-get update sudo apt-get -y install python-swift 2. We now ensure that we are able to authenticate to our OpenStack proxy server using the swift user Identity Service credentials created in Chapter 4, Installing OpenStack Storage. We can do this as follows, using the swift command: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U service:swift -K swift stat 3. We will get stats on our environment, such as the number of containers and objects, and so on, when successful. 4. We can now configure the /etc/glance/glance-api.conf file as required, in order to use OpenStack Storage as our file store, as follows: sudo sed -i 's/^default_store.*/default_store = swift/' /etc/ glance/glance-api.conf 5. Once done, we can configure the same /etc/glance/glance-api.conf file to put values that are appropriate for connecting to OpenStack Storage: swift_store_auth_address = http://172.16.0.1:5000/v2.0/ swift_store_user = service:swift swift_store_key = swift swift_store_container = glance 6. We must also ensure there is a container in our OpenStack Storage datastore called glance, as this is specified in /etc/glance/glance-api.conf, too. To create this container using the swift tool, we can do the following: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U service:swift -K swift post glance 7. Once done, we can restart our glance-api service to pick up these changes, as follows: sudo restart glance-api www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook