官术网_书友最值得收藏!

Configuring OpenStack Image Service with OpenStack Identity Service

Configuring OpenStack Image Service to use OpenStack Identity Service is required to allow our OpenStack Compute to operate correctly.

Getting ready

To begin with, ensure you're logged in to our OpenStack Controller host or the host that is running OpenStack Image Service. If the OpenStack Identity Service is not installed, carry out the steps in the Installing the OpenStack Identity Service recipe of Chapter 1, Keystone – OpenStack Identity Service. We also require that the Glance service user and endpoints have been set up. See the Defining Service Endpoints and Creating the service tenant and service users recipes of Chapter 1, Keystone – OpenStack Identity Service.

To log in to our OpenStack Controller host that was created using Vagrant, issue the following command:

vagrant ssh controller

How to do it...

To configure OpenStack Image Service to use OpenStack Identity Service, carry out the following steps:

  1. We first edit the /etc/glance/glance-api.conf file to tell OpenStack Image Service to utilize OpenStack Identity Service by adding a [keystone_authtoken] section. Note that we are using insecure = True in the configuration because we are using self-signed certificates. In production, it is expected that issued certificates are used and they don't require this parameter. The code is as follows:
    [keystone_authtoken]
    auth_uri = https://192.168.100.200:35357/v2.0/
    identity_uri = https://192.168.100.200:5000
    admin_tenant_name = service
    admin_user = glance
    admin_password = glance
    insecure = True
  2. We repeat this process for the /etc/glance/glance-registry.conf file, configuring the glance service user in the [keystone_authtoken] section. We are using insecure = True here because our example used self-signed certificates. The code is as follows:
    [keystone_authtoken]
    auth_uri = https://192.168.100.200:35357/v2.0/
    identity_uri = https://192.168.100.200:5000
    admin_tenant_name = service
    admin_user = glance
    admin_password = glance
    insecure = True
  3. Finally, we restart the two services to pick up the changes:
    sudo restart glance-api
    sudo restart glance-registry
    

How it works...

OpenStack Image Service runs two services: glance-api, which is the service that our clients and services talk to, and the glance-registry service that manages the objects on the disk and database registry. Both of these services need to have matching credentials that were defined previously in OpenStack Identity Service in their configuration files in order to allow a user to authenticate with the service successfully.

主站蜘蛛池模板: 凤城市| 称多县| 阿鲁科尔沁旗| 吉木萨尔县| 康乐县| 垦利县| 依安县| 平阳县| 盱眙县| 黑龙江省| 云浮市| 肃北| 新晃| 崇州市| 六安市| 永寿县| 麦盖提县| 富平县| 靖远县| 黄梅县| 阳新县| 三江| 通河县| 连山| 桑植县| 黑水县| 什邡市| 清丰县| 绥阳县| 瓦房店市| 临澧县| 营口市| 遵义县| 浠水县| 轮台县| 昔阳县| 洛川县| 长治市| 建始县| 出国| 丹江口市|