Swift is not installed by default when using OpenStack DevStack. Sometimes you want to install Swift only for some testing without all of the other services getting in the way. Here's how to setup Swift (and Keystone for authentication) with DevStack on the Rackspace Cloud.
- If you don't have one already, Sign Up for an open cloud account
- Go to the Cloud Control Panel
- Click Create Server
- Name: devstack-swift
- Image: Ubuntu 12.04 LTS
- Size: 4GB RAM (you could probably get away with 2 GB)
- Click Create Server and note the password and IPv4 address (when it appears)
- When your server is Active, switch to a Terminal and run the following commands to create the stack user.
ssh root@<IPv4 Address>
adduser --gecos "" stack
adduser stack sudo
grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers || echo "#includedir /etc/sudoers.d" >> /etc/sudoers
( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/50_stack_sh )
- I create the stack user like this because I've found that there are permission issues with screen if you create a "dummy" stack user and just switch to the stack user from the root user.
- Now login as the stack user and setup Swift:
ssh stack@<IPv4 Address>
sudo apt-get -y update
sudo apt-get -y install git
git clone https://github.com/openstack-dev/devstack.git
vim localrc # copy in the contents of [this one](https://gist.github.com/everett-toews/4981513)
screen -r stack
- When running stack.sh you might see an error message that reads "ERROR: at least one rpc backend must be enabled". Don't worry about it, Swift/Keystone doesn't need an rpc (AMQP) backend. You can also ignore any ImportErrors.
- When DevStack is done you can point your OpenStack clients and jclouds dev env all at
- When you're done with your development/testing you can delete the server to save money and just start fresh next time
Just a quick post to get Swift only up and running quickly!