Fedora 23
Sponsored Link

OpenStack Kilo : Keystone 設定#22015/11/12

 
Keystone に ユーザやロール、OpenStack 各コンポーネントが利用するサービスを登録しておきます。
[1] 環境変数を事前に読み込んでおきます。
「OS_TOKEN」は keystone.conf で「admin_token」に設定した値
「OS_URL」は Keystone サーバーのホスト名またはIPアドレス
[root@dlp ~]#
export OS_TOKEN=admintoken

[root@dlp ~]#
export OS_URL=http://10.0.0.30:35357/v2.0/

[2] プロジェクトを作成します。
# admin プロジェクト作成

[root@dlp ~]#
openstack project create --description "Admin Project" admin

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Admin Project                    |
| enabled     | True                             |
| id          | 90543cc39f274925985200d669e305d7 |
| name        | admin                            |
+-------------+----------------------------------+

# service プロジェクト作成

[root@dlp ~]#
openstack project create --description "Service Project" service

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Service Project                  |
| enabled     | True                             |
| id          | f8d301995a9b423b85d3e250336ee6c3 |
| name        | service                          |
+-------------+----------------------------------+

# 設定確認

[root@dlp ~]#
openstack project list

+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 90543cc39f274925985200d669e305d7 | admin   |
| f8d301995a9b423b85d3e250336ee6c3 | service |
+----------------------------------+---------+
[3] ロールを作成します。
# admin ロール作成

[root@dlp ~]#
openstack role create admin

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | de393fc067984d469b46bc46f156ce30 |
| name  | admin                            |
+-------+----------------------------------+

# Member ロール作成

[root@dlp ~]#
openstack role create Member

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 53201334a7704f44873b485985c16943 |
| name  | Member                           |
+-------+----------------------------------+

# 設定確認

[root@dlp ~]#
openstack role list

+----------------------------------+--------+
| ID                               | Name   |
+----------------------------------+--------+
| 53201334a7704f44873b485985c16943 | Member |
| de393fc067984d469b46bc46f156ce30 | admin  |
+----------------------------------+--------+
[4] ユーザーを作成します。
# admin ユーザー作成 (admin プロジェクト所属)

[root@dlp ~]#
openstack user create --project admin --password adminpassword admin

+------------+----------------------------------+
| Field      | Value                            |
+------------+----------------------------------+
| email      | None                             |
| enabled    | True                             |
| id         | dfe9cafaf69546178eecae7be138d0f1 |
| name       | admin                            |
| project_id | 90543cc39f274925985200d669e305d7 |
| username   | admin                            |
+------------+----------------------------------+

# admin ユーザーを admin ロール に加える

[root@dlp ~]#
openstack role add --project admin --user admin admin

+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | de393fc067984d469b46bc46f156ce30 |
| name  | admin                            |
+-------+----------------------------------+

# 設定確認

[root@dlp ~]#
openstack user list

+----------------------------------+-------+
| ID                               | Name  |
+----------------------------------+-------+
| dfe9cafaf69546178eecae7be138d0f1 | admin |
+----------------------------------+-------+
[5] サービス用のエントリを作成します。
# keystone 用サービスエントリ作成

[root@dlp ~]#
openstack service create --name keystone --description "OpenStack Identity" identity

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Identity               |
| enabled     | True                             |
| id          | d6054968ab5d4ba582229d9de6b6076f |
| name        | keystone                         |
| type        | identity                         |
+-------------+----------------------------------+

# 設定確認

[root@dlp ~]#
openstack service list

+----------------------------------+----------+----------+
| ID                               | Name     | Type     |
+----------------------------------+----------+----------+
| d6054968ab5d4ba582229d9de6b6076f | keystone | identity |
+----------------------------------+----------+----------+
[6] エンドポイントを作成します。
# 自ホストを定義しておく

[root@dlp ~]#
export controller=10.0.0.30
# keystone 用エンドポイント作成

[root@dlp ~]#
openstack endpoint create \
--publicurl http://$controller:5000/v2.0 \
--internalurl http://$controller:5000/v2.0 \
--adminurl http://$controller:35357/v2.0 \
--region RegionOne \
identity

+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://10.0.0.30:35357/v2.0      |
| id           | 1e423cf8176c444ab3597848014e99a7 |
| internalurl  | http://10.0.0.30:5000/v2.0       |
| publicurl    | http://10.0.0.30:5000/v2.0       |
| region       | RegionOne                        |
| service_id   | d6054968ab5d4ba582229d9de6b6076f |
| service_name | keystone                         |
| service_type | identity                         |
+--------------+----------------------------------+

# 設定確認

[root@dlp ~]#
openstack endpoint list

+----------------------------------+-----------+--------------+--------------+
| ID                               | Region    | Service Name | Service Type |
+----------------------------------+-----------+--------------+--------------+
| 1e423cf8176c444ab3597848014e99a7 | RegionOne | keystone     | identity     |
+----------------------------------+-----------+--------------+--------------+
関連コンテンツ