next up previous contents
Next: 安裝與設定 Up: Glance Previous: 安裝前資料庫準備   Contents

安裝前環境準備

  1. 先讀取 openstack 管理者 admin 環境變數。
    [root@ip112 ~]# source admin.token
    
  2. 新增 glance 用戶,輸入密碼後產生。
    [root@ip112 ~]# openstack user create --domain default --password-prompt glance
    User Password:
    Repeat User Password:
    +---------------------+----------------------------------+
    | Field               | Value                            |
    +---------------------+----------------------------------+
    | domain_id           | default                          |
    | enabled             | True                             |
    | id                  | a222f467cc614229b61cbd0d35745a9e |
    | name                | glance                           |
    | options             | {}                               |
    | password_expires_at | None                             |
    +---------------------+----------------------------------+
    
  3. 新增 admin role 到 glance user 及 service project。
    [root@ip112 ~]# openstack role add --project service --user glance admin
    
  4. 新增 glance service。
    [root@ip112 ~]# openstack service create --name glance \
    --description "OpenStack Image" image
    +-------------+----------------------------------+
    | Field       | Value                            |
    +-------------+----------------------------------+
    | description | OpenStack Image                  |
    | enabled     | True                             |
    | id          | e0d28b4eb10f49cab4c2826f15525ef3 |
    | name        | glance                           |
    | type        | image                            |
    +-------------+----------------------------------+
    
  5. 新增 image service API endpoints,interface public。
    [root@ip112 ~]# openstack endpoint create --region RegionOne \
    image public http://controller:9292
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | b77ce68dd22f47b59df84f09cae14fac |
    | interface    | public                           |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | e0d28b4eb10f49cab4c2826f15525ef3 |
    | service_name | glance                           |
    | service_type | image                            |
    | url          | http://controller:9292           |
    +--------------+----------------------------------+
    
  6. 新增 image service API endpoints,interface internal。
    [root@ip112 ~]# openstack endpoint create --region RegionOne \
    image internal http://controller:9292
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | db7eb4eecb184a189216ce7690a5858f |
    | interface    | internal                         |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | e0d28b4eb10f49cab4c2826f15525ef3 |
    | service_name | glance                           |
    | service_type | image                            |
    | url          | http://controller:9292           |
    +--------------+----------------------------------+
    
  7. 新增 image service API endpoints,interface admin。
    [root@ip112 ~]# openstack endpoint create --region RegionOne \
    image admin http://controller:9292
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | a0a593979896455285205478c55ebeab |
    | interface    | admin                            |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | e0d28b4eb10f49cab4c2826f15525ef3 |
    | service_name | glance                           |
    | service_type | image                            |
    | url          | http://controller:9292           |
    +--------------+----------------------------------+
    



De-Yu Wang 2018-08-15