#Install Swift-Main with replication In this github, you can see how to setup a Server with swift and replication in other server.
For beginning you need to install git for clone this repository
apt-get install git-core
And when git is installed, you need to clone the repository :
git clone https://github.com/fclement21/swift-main.git
After that, you need to modify the line 11, in the file startmain.sh
sudo nano swift-main/files/startmain.sh
You need to complete the line 11 " replication= '' #INSERT IP HERE"
After that , you save your files.
After that, you need to give the access to execute the file installswift.sh
chmod +x swift-main/files/installswift.sh
And now, you need to launch the script :
sudo swift-main/files/installswift.sh
At the end of the script, you need to hit CTRL+C for dont display the log.
At this point OpenStack Swift is running. And you can test :
swift -A http://127.0.0.1:8080/auth/v1.0 -U swift:authot -K authot stat
or
curl -v -H 'X-Storage-User: swift:authot' -H 'X-Storage-Pass:authot' http://urlofyourserver:8080/auth/v1.0
Try uploading a file:
swift -A http://127.0.0.1:8080/auth/v1.0 -U swift:authot -K authot upload swift swift.txt
swift.txt
OR
curl -X PUT -i -H "X-Auth-Token: TOKEN" -T Desktop/test.txt http://url:8080/v1/AUTH_swift/name-container/test.txt
That's it!