-
Notifications
You must be signed in to change notification settings - Fork 2
/
swift-st-setup-3.sh
29 lines (25 loc) · 1.01 KB
/
swift-st-setup-3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
clear
echo "Changing right access..."
chown swift. /etc/swift/*.gz
echo "Configuring Swift and Rsync in Storage Node..."
sudo cp /devstack-setup/config/swift/swift.conf /etc/swift/swift.conf
sudo cp /devstack-setup/config/swift/account-server.conf /etc/swift/account-server.conf
sudo cp /devstack-setup/config/swift/container-server.conf /etc/swift/container-server.conf
sudo cp /devstack-setup/config/swift/object-server.conf /etc/swift/object-server.conf
sudo cp /devstack-setup/config/swift/rsyncd.conf /etc/rsyncd.conf
echo "Enable Rsync..."
sudo nano /etc/default/rsync
echo "Launching Swift..."
systemctl start rsync
systemctl enable rsync
for ringtype in account container object; do
systemctl start swift-$ringtype
systemctl enable swift-$ringtype
for service in replicator updater auditor; do
if [ $ringtype != 'account' ] || [ $service != 'updater' ]; then
systemctl start swift-$ringtype-$service
systemctl enable swift-$ringtype-$service
fi
done
done