OpenStack Juno : Configure Swift#1 ( Control Node )2015/01/13 |
Configure OpenStack Object Storage (Swift).
This example shows to configure like the environment below.
| +------------------+ | +-----------------+ | [ 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] | Add Swift user or service on Keystone Server (Control Node) first. |
# add swift user [root@dlp ~(keystone)]# keystone user-create --tenant service --name swift --pass servicepassword --enabled true +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | email | | | enabled | True | | id | a2dcc72a800549e391dd6e0e8232c348 | | name | swift | | tenantId | 9e657ab1d2344de5aa9d86006732c7f0 | | username | swift | +----------+----------------------------------+ # add swift user in admin role [root@dlp ~(keystone)]# keystone user-role-add --user swift --tenant service --role admin
# add an entry for swift service [root@dlp ~(keystone)]# keystone service-create --name=swift --type=object-store --description="Swift Service" +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | Swift Service | | enabled | True | | id | 55a52b4f04cf4617bcfa9e8b8e87b045 | | name | swift | | type | object-store | +-------------+----------------------------------+ # define the IP address for Proxy Node [root@dlp ~(keystone)]# export proxy_host=10.0.0.50
# add an entry for swift endpoint [root@dlp ~(keystone)]# keystone endpoint-create --region RegionOne \ --service swift \ --publicurl "http://$proxy_host:8080/v1/AUTH_\$(tenant_id)s" \ --internalurl "http://$proxy_host:8080/v1/AUTH_\$(tenant_id)s" \ --adminurl "http://$proxy_host:8080/v1" +-------------+---------------------------------------------+ | Property | Value | +-------------+---------------------------------------------+ | adminurl | http://10.0.0.50:8080/v1 | | id | dd671936b035431eaed63cbbaa8a6564 | | 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 | 55a52b4f04cf4617bcfa9e8b8e87b045 | +-------------+---------------------------------------------+ |
Sponsored Link |
|