An Ansible playbook for provisioning a Swift and Swift-on-File all-in-one development environment on Fedora or CentOS(default).
To provision the VM, run:
vagrant up --provider=virtualbox
To run automated tests:
vagrant sshcd /vagrant/source/swift./.unittests./.functests
To quickly test installation:
swift statecho 'hello world' > hwswift upload c1 hwswift list
To test installation with Swift-on-File (Note: make sure to have Swift-on-File provisioned):
swift post c2 -H 'X-Storage-Policy: swiftonfile'echo 'hello swiftonfile' > hsswift upload c2 hsswift listls /mnt/swiftonfile
You can set a few options to change how the VM is provisioned. In global_vars.yml, you can set if you want Swift-on-File configured or not and what storage policy should be set as the default. In the Vagrantfile, you can choose to provision either a Fedora VM or a CentOS-7 VM.
In case you would like to use the provisioned VM as your development environment, Ansible can add gerrit as a remote repo to both Swift and Swift-on-File. Checkout the options in global_vars.yml
In case you already have a VM created and just wants to execute the Ansible playbook, run the following command:
ansible-playbook site.yml -i "192.168.56.103," --ask-sudo-pass
####Notes:
- Make sure to update to the correct IP address on the command above (it's important to keep the comma ',' at the end) and the
usernameandgroupvariables inglobal_vars.yml - If testing on RHEL/CentOS, enable EPEL repository first.
- Add gluster volume