CentOS 7
Sponsored Link

OpenStack Liberty : Configure Swift#2 (Proxy Node)2015/11/18

 
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] |
|                  |-------|                  |-------|                  |
+------------------+       +------------------+       +------------------+

 
Configure Proxy Node on this section.
[1] Install Swift-Proxy.
# install from Liberty, EPEL

[root@proxy ~]#
yum --enablerepo=centos-openstack-liberty,epel -y install openstack-swift-proxy memcached openssh-clients
[2] Configure Swift-Proxy.
[root@proxy ~]#
vi /etc/swift/proxy-server.conf
# line 53: change like follows (Keystone auth info)

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
#
admin_tenant_name = %SERVICE_TENANT_NAME%
#
admin_user = %SERVICE_USER%
#
admin_password = %SERVICE_PASSWORD%
#
#
identity_uri = http://localhost:35357/
#
auth_uri = http://localhost:5000/
#
#
signing_dir = /tmp/keystone-signing-swift
auth_uri = http://10.0.0.30:5000
auth_url = http://10.0.0.30:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = swift
password = servicepassword
delay_auth_decision = true
[root@proxy ~]#
vi /etc/swift/swift.conf
# change (it is shared among Swift Nodes - any words you like)

[swift-hash]
swift_hash_path_suffix =
swift_shared_path
[3] Configure Swift Ring files.
[root@proxy ~]#
swift-ring-builder /etc/swift/account.builder create 12 3 1

[root@proxy ~]#
swift-ring-builder /etc/swift/container.builder create 12 3 1

[root@proxy ~]#
swift-ring-builder /etc/swift/object.builder create 12 3 1
[root@proxy ~]#
swift-ring-builder /etc/swift/account.builder add r0z0-10.0.0.71:6002/device0 100

Device d0r0z0-10.0.0.71:6002R10.0.0.71:6002/device0_"" with 100.0 weight got id 0
[root@proxy ~]#
swift-ring-builder /etc/swift/container.builder add r0z0-10.0.0.71:6001/device0 100

Device d0r0z0-10.0.0.71:6001R10.0.0.71:6001/device0_"" with 100.0 weight got id 0
[root@proxy ~]#
swift-ring-builder /etc/swift/object.builder add r0z0-10.0.0.71:6000/device0 100

Device d0r0z0-10.0.0.71:6000R10.0.0.71:6000/device0_"" with 100.0 weight got id 0
[root@proxy ~]#
swift-ring-builder /etc/swift/account.builder add r1z1-10.0.0.72:6002/device1 100

Device d1r1z1-10.0.0.72:6002R10.0.0.72:6002/device1_"" with 100.0 weight got id 1
[root@proxy ~]#
swift-ring-builder /etc/swift/container.builder add r1z1-10.0.0.72:6001/device1 100

Device d1r1z1-10.0.0.72:6001R10.0.0.72:6001/device1_"" with 100.0 weight got id 1
[root@proxy ~]#
swift-ring-builder /etc/swift/object.builder add r1z1-10.0.0.72:6000/device1 100

Device d1r1z1-10.0.0.72:6000R10.0.0.72:6000/device1_"" with 100.0 weight got id 1
[root@proxy ~]#
swift-ring-builder /etc/swift/account.builder add r2z2-10.0.0.73:6002/device2 100

Device d2r2z2-10.0.0.73:6002R10.0.0.73:6002/device2_"" with 100.0 weight got id 2
[root@proxy ~]#
swift-ring-builder /etc/swift/container.builder add r2z2-10.0.0.73:6001/device2 100

Device d2r2z2-10.0.0.73:6001R10.0.0.73:6001/device2_"" with 100.0 weight got id 2
[root@proxy ~]#
swift-ring-builder /etc/swift/object.builder add r2z2-10.0.0.73:6000/device2 100

Device d2r2z2-10.0.0.73:6000R10.0.0.73:6000/device2_"" with 100.0 weight got id 2
[root@proxy ~]#
swift-ring-builder /etc/swift/account.builder rebalance

Reassigned 4096 (100.00%) partitions. Balance is now 0.00.
[root@proxy ~]#
swift-ring-builder /etc/swift/container.builder rebalance

Reassigned 4096 (100.00%) partitions. Balance is now 0.00.
[root@proxy ~]#
swift-ring-builder /etc/swift/object.builder rebalance

Reassigned 4096 (100.00%) partitions. Balance is now 0.00.
[root@proxy ~]#
chown swift. /etc/swift/*.gz

[root@proxy ~]#
systemctl start memcached openstack-swift-proxy

[root@proxy ~]#
systemctl enable memcached openstack-swift-proxy

Matched Content