Last active
September 28, 2015 10:13
-
-
Save kentarosasaki/ea45c76d36e1e397f494 to your computer and use it in GitHub Desktop.
OpenStack Swift(Kilo Release)を構築してみた ref: http://qiita.com/kentarosasaki/items/a3cfcf5cd77e728b4ee0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ openstack endpoint create \ | |
--publicurl 'http://192.168.0.2:8080/v1/AUTH_%(tenant_id)s' \ | |
--internalurl 'http://192.168.0.2:8080/v1/AUTH_%(tenant_id)s' \ | |
--adminurl http://192.168.0.2:8080 \ | |
--region RegionOne \ | |
object-store | |
+--------------+----------------------------------------------+ | |
| Field | Value | | |
+--------------+----------------------------------------------+ | |
| adminurl | http://192.168.0.2:8080/ | | |
| id | af534fb8b7ff40a6acf725437c586ebe | | |
| internalurl | http://192.168.0.2:8080/v1/AUTH_%(tenant_id)s | | |
| publicurl | http://192.168.0.2:8080/v1/AUTH_%(tenant_id)s | | |
| region | RegionOne | | |
| service_id | 75ef509da2c340499d454ae96a2c5c34 | | |
| service_name | swift | | |
| service_type | object-store | | |
+--------------+----------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[filter:authtoken] | |
paste.filter_factory = keystonemiddleware.auth_token:filter_factory | |
... | |
auth_uri = http://192.168.0.13:5000 | |
auth_url = http://192.168.0.13:35357 | |
auth_plugin = password | |
project_domain_id = default | |
user_domain_id = default | |
project_name = service | |
username = swift | |
password = SWIFT_PASS | |
delay_auth_decision = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt-get install swift swift-account swift-container memcached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl -o /etc/swift/account-server.conf \ | |
https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=stable/kilo | |
# curl -o /etc/swift/container-server.conf \ | |
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/kilo | |
# curl -o /etc/swift/container-reconciler.conf \ | |
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-reconciler.conf-sample?h=stable/kilo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# service memcached restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt-get install swift swift-account swift-object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl -o /etc/swift/object-server.conf \ | |
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/kilo | |
# curl -o /etc/swift/object-expirer.conf \ | |
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-expirer.conf-sample?h=stable/kilo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cd /etc/swift | |
# rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz | |
# swift-ring-builder account.builder create 17 3 1 | |
# swift-ring-builder account.builder add r1z1-192.168.0.3:6002/sdb1 100 | |
# swift-ring-builder account.builder add r1z2-192.168.0.4:6002/sdb1 100 | |
# swift-ring-builder account.builder add r1z3-192.168.0.5:6002/sdb1 100 | |
# swift-ring-builder account.builder add r1z4-192.168.0.6:6002/sdb1 100 | |
# swift-ring-builder account.builder add r1z5-192.168.0.7:6002/sdb1 100 | |
# swift-ring-builder account.builder | |
# swift-ring-builder account.builder rebalance | |
# swift-ring-builder container.builder create 17 3 1 | |
# swift-ring-builder container.builder add r1z1-192.168.0.3:6001/sdb1 100 | |
# swift-ring-builder container.builder add r1z2-192.168.0.4:6001/sdb1 100 | |
# swift-ring-builder container.builder add r1z3-192.168.0.5:6001/sdb1 100 | |
# swift-ring-builder container.builder add r1z4-192.168.0.6:6001/sdb1 100 | |
# swift-ring-builder container.builder add r1z5-192.168.0.7:6001/sdb1 100 | |
# swift-ring-builder container.builder | |
# swift-ring-builder container.builder rebalance | |
# swift-ring-builder object.builder create 17 3 1 | |
# swift-ring-builder object.builder add r1z1-192.168.0.8:6000/sdb1 100 | |
# swift-ring-builder object.builder add r1z2-192.168.0.9:6000/sdb1 100 | |
# swift-ring-builder object.builder add r1z3-192.168.0.10:6000/sdb1 100 | |
# swift-ring-builder object.builder add r1z4-192.168.0.11:6000/sdb1 100 | |
# swift-ring-builder object.builder add r1z5-192.168.0.12:6000/sdb1 100 | |
# swift-ring-builder object.builder | |
# swift-ring-builder object.builder rebalance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ source demo-openrc.sh | |
$ swift -V 3 stat | |
Account: AUTH_25e9c03ea9824a6e8d24a60ac5e72c98 | |
Containers: 0 | |
Objects: 0 | |
Bytes: 0 | |
Containers in policy "policy-0": 0 | |
Objects in policy "policy-0": 0 | |
Bytes in policy "policy-0": 0 | |
X-Account-Project-Domain-Id: default | |
Connection: keep-alive | |
X-Timestamp: 1441783575.55310 | |
X-Trans-Id: tx2260ad3b3ed840f99d075-0056091154 | |
Content-Type: text/plain; charset=utf-8 | |
Accept-Ranges: bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift --debug -V 3 stat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment