A Swift-All-In-One in a few easy steps.
vagrant upvagrant sshecho "awesome" > testswift upload test testswift download test test -o -
This project assumes you have Virtualbox and Vagrant.
You should be able to run most tests without too much fuss once SSH'ed into the VM.
.unittests.functests.probetestsvtox -e pep8vtox -e py27vtox # run all gate checks
A few things are configurable, see localrc-template.
cp localrc-template localrcvi localrcsource localrcvagrant provisionvagrant sshrebuildswift
You know you want to play with s3api, we got you covered.
vagrant ssh
s3cmd mb s3://s3test
s3cmd ls
You should be able to optionally configure statsd_exporter/prometheus metrics for the Swift stack on the VM.
cp localrc-template localrc
sed -i 's/^\(export STATSD_EXPORTER=\)\([^ ]*\) /\1true/g' localrc
source localrc
vagrant provision
These will expose /metrics endpoints on ports 9100-9105 which you can check directly, and configure prometheus to scrape these endpoints every 10s and retain data for up to a day; you can then create ad-hoc graphs at
You should add the configured IP from your localrc to your /etc/hosts or use the default:
sudo bash -c 'echo "192.168.8.80 saio" >> /etc/hosts'
Then you can easily share snippets that talk to network services running in your Swift-All-In-One from your host!
curl -s http://saio:8080/info | python -m json.tool
A few scripts are available to make your dev life easier.
vagrant up --provisionwill bring up your VM in working order (useful when your VM is halted)source localrc; vagrant provisionon your host to push the new Chef bits in place (useful if you change localrc)rebuildswiftto reapply everything like it would be at the end of Chef time (useful to revert local config changes)resetswiftwill wipe the drives and leave any local config changes in place (useful just to clean out Swift data)reinstallswiftwill make sure all of the bin scripts are installed correctly and restart the main swift processes (useful if you change branches)autodoc [swift|swiftclient]will build the sphinx docs and watch files for changes, and upload them to a public container on your vm so you can review them as you editvtoxwill hack the local tox.ini and setup.py so you can run tox tests successfully on the swift repo in the/vagrantdirectoryreecwill rebuild/reinstall all the liberasure/pyeclib[/isa-l] bits!venv py37will make sure your tox virtualenv is ready and let you py3