Clone Object1 Node (Full Clone) - object2
In Object1 Node
Configuring Hostname
# nano /etc/hostname
object2
Configuring Network Interfaces
# nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.10.10.15
netmask 255.255.255.0
auto eth1
iface eth1 inet dhcp
# reboot
Change ip in config files
# nano /etc/rsyncd.conf
address = 10.10.10.15
# nano /etc/swift/account-server.conf
bind_ip = 10.10.10.15
# nano /etc/swift/container-server.conf
bind_ip = 10.10.10.15
# nano /etc/swift/object-server.conf
bind_ip = 10.10.10.15
Create Initial Rings (In Controller Node)
# cd /etc/swift
Account ring
# swift-ring-builder account.builder create 10 3 1
# swift-ring-builder account.builder add r1z1-10.10.10.14:6002/sdb 100
# swift-ring-builder account.builder add r1z1-10.10.10.14:6002/sdc 100
# swift-ring-builder account.builder add r1z1-10.10.10.15:6002/sdb 100
# swift-ring-builder account.builder add r1z1-10.10.10.15:6002/sdc 100
# swift-ring-builder account.builder
# swift-ring-builder account.builder rebalance
Container ring
# swift-ring-builder container.builder create 10 3 1
# swift-ring-builder container.builder add r1z1-10.10.10.14:6001/sdb 100
# swift-ring-builder container.builder add r1z1-10.10.10.14:6001/sdc 100
# swift-ring-builder container.builder add r1z1-10.10.10.15:6001/sdb 100
# swift-ring-builder container.builder add r1z1-10.10.10.15:6001/sdc 100
# swift-ring-builder container.builder
# swift-ring-builder container.builder rebalance
Object ring
# swift-ring-builder object.builder create 10 3 1
# swift-ring-builder object.builder add r1z1-10.10.10.14:6000/sdb 100
# swift-ring-builder object.builder add r1z1-10.10.10.14:6000/sdc 100
# swift-ring-builder object.builder add r1z1-10.10.10.15:6000/sdb 100
# swift-ring-builder object.builder add r1z1-10.10.10.15:6000/sdc 100
# swift-ring-builder object.builder
# swift-ring-builder object.builder rebalance
Distribute ring config files
# ll
# apt-get install openssh-server
* Install openssh-server on Controller, Object1, Object2 Nodes
# rm -rf .ssh/
# ssh chaal@object1
# ssh chaal@object1
# chown chaal /etc/swift
* change ownership /etc/swift on Controller, Object1, Object2 Nodes
# cd /etc/swift
# scp account.ring.gz container.ring.gz object.ring.gz chaal@object1:/etc/swift
# scp account.ring.gz container.ring.gz object.ring.gz chaal@object2:/etc/swift
# curl -o /etc/swift/swift.conf https://raw.githubusercontent.com/openstack/swift/stable/juno/etc/swift.conf-sample
# nano /etc/swift/swift.conf
[swift-hash]
...
swift_hash_path_suffix = chaal
swift_hash_path_prefix = pritam
[storage-policy:0]
...
name = Policy-0
default = yes
# scp swift.conf chaal@object1:/etc/swift
# scp swift.conf chaal@object2:/etc/swift
# cd
# chown -R swift:swift /etc/swift
* change ownership /etc/swift on Controller, Object1, Object2 Nodes
# service memcached restart
# service swift-proxy restart
# swift-init all start
* Start object storage services on Object1, Object2 Nodes
Verifying Object Storage Services
# source demo-openrc.sh
# swift stat
# touch testfile
# swift upload democontainer testfile
# swift list
# swift download democontainer testfile
0 comments:
Post a Comment