Installing Swift from http://docs.openstack.org/developer/swift/ on Arch Linux
Swift is a highly available, distributed, and object-based storage system used in the OpenStack platform. Here is a quick guide on how to install Swift on an Arch Linux system.
Installation Requirements
Before moving to the installation process, ensure that the following dependencies are installed on the system:
- Python (>=2.7 or >=3.4)
- Cython
- PyECLib
- memcached
- rsync
- xfsprogs
- gcc
You can install these dependencies using the following command:
sudo pacman -S python cython pyeclib memcached rsync xfsprogs gcc
Installing Swift
Install the
python2-setuptoolspackage:
sudo pacman -S python2-setuptools
- Download the latest Swift release from http://docs.openstack.org/developer/swift/:
wget https://tarballs.openstack.org/swift/swift-2.26.0.tar.gz
- Extract the downloaded file:
tar xvzf swift-2.26.0.tar.gz
cd swift-2.26.0
- Install Swift using the following command:
sudo python2 setup.py install
- After installation, Swift artifacts will be located in the following directories:
/usr/local/bin/swift*
/usr/local/bin/st* # object-server, object-replicator, object-auditor, container-reconciler
/usr/local/share/swift # example configuration files, init scripts and systemd units
Configuring Swift
Copy the sample configuration files to the appropriate directories:
sudo cp /usr/local/share/swift/doc/saio/rsyncd.conf /etc/
sudo cp /usr/local/share/swift/doc/saio/swift.conf /etc/
sudo cp /usr/local/share/swift/doc/saio/proxy-server.conf /etc/swift/
sudo cp /usr/local/share/swift/doc/saio/account-server.conf /etc/swift/
sudo cp /usr/local/share/swift/doc/saio/container-server.conf /etc/swift/
sudo cp /usr/local/share/swift/doc/saio/object-server.conf /etc/swift/
- Configure the Swift cluster:
sudo useradd -d /home/swift -s /bin/bash -m swift
echo "swift:swift" | sudo chpasswd
sudo chown -R swift:swift /srv
sudo chown -R swift:swift /etc/swift
sudo chmod 0755 /var/cache/swift
sudo chown -R swift:swift /var/cache/swift
sudo mkdir /var/run/swift
sudo chown -R swift:swift /var/run/swift
sudo cp /usr/local/share/swift/doc/saio/swift.conf /etc/swift/swift.conf
- Modify the
swift.conffile to suit your needs:
sudo nano /etc/swift/swift.conf
- Restart the
rsyncservice:
sudo systemctl enable rsyncd
sudo systemctl start rsyncd
- Start the Swift services:
sudo systemctl enable swift-account-auditor.service swift-account-reaper.service swift-account-replicator.service swift-account.service swift-container-auditor.service swift-container-replicator.service swift-container-updater.service swift-container.service swift-object-auditor.service swift-object-replicator.service swift-object-updater.service swift-object.service swift-proxy.service
sudo systemctl start swift-object.service swift-proxy.service
sudo systemctl status swift-object.service swift-proxy.service
That's it, your Swift installation is complete. You can now use Swift on your Arch Linux system.