OpenStack Kilo : Swift 設定#1 ( Control ノード )2015/06/20 |
OpenStack Object Storage(Swift)を設定します。
ここでは以下のように、Control ノード、Proxy ノード、Storage ノードと、
ノードごとにサーバーを用意して、計5台を使って設定します。
| +------------------+ | +-----------------+ | [ Control Node ] |10.0.0.30 | 10.0.0.50| [ Proxy Node ] | | Keystone |-----------+-----------| | +------------------+ | +-----------------+ | +---------------------------+--------------------------+ | | | |10.0.0.71 |10.0.0.72 |10.0.0.73 +-------+----------+ +--------+---------+ +--------+---------+ | [Storage Node#1] | | [Storage Node#2] | | [Storage Node#3] | | |-------| |-------| | +------------------+ +------------------+ +------------------+ |
[1] | まずは構築済みの Keystone サーバー(Control ノード)で Swift用のユーザー・エンドポイント等を登録します。 |
# swift ユーザー作成 (service プロジェクト所属) [root@dlp ~(keystone)]# openstack user create --project service --password servicepassword swift +------------+----------------------------------+ | Field | Value | +------------+----------------------------------+ | email | None | | enabled | True | | id | b2f2c396a44a466fb8740591b010f99b | | name | swift | | project_id | 4e84300cbeeb4a68a0e1864ea0ae1869 | | username | swift | +------------+----------------------------------+ # swift ユーザーを admin ロール に加える [root@dlp ~(keystone)]# openstack role add --project service --user swift admin +-------+----------------------------------+ | Field | Value | +-------+----------------------------------+ | id | 2100956a1c974cae8c81308845c174a8 | | name | admin | +-------+----------------------------------+ # swift 用サービスエントリ作成 [root@dlp ~(keystone)]# openstack service create --name swift --description "OpenStack Object Storage" object-store +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | OpenStack Object Storage | | enabled | True | | id | 4703bd767e8241369786af643d3bd5bc | | name | swift | | type | object-store | +-------------+----------------------------------+ # Proxy ノードを定義しておく [root@dlp ~(keystone)]# export swift_proxy=10.0.0.50
# swift 用エンドポイント作成 [root@dlp ~(keystone)]# openstack endpoint create \ --publicurl http://$swift_proxy:8080/v1/AUTH_%\(tenant_id\)s \ --internalurl http://$swift_proxy:8080/v1/AUTH_%\(tenant_id\)s \ --adminurl http://$swift_proxy:8080 \ --region RegionOne \ object-store +--------------+---------------------------------------------+ | Field | Value | +--------------+---------------------------------------------+ | adminurl | http://10.0.0.50:8080 | | id | 93c74e3247974eb89c774ce0927d932b | | internalurl | http://10.0.0.50:8080/v1/AUTH_%(tenant_id)s | | publicurl | http://10.0.0.50:8080/v1/AUTH_%(tenant_id)s | | region | RegionOne | | service_id | 4703bd767e8241369786af643d3bd5bc | | service_name | swift | | service_type | object-store | +--------------+---------------------------------------------+ |
Sponsored Link |
|