Skip to content

An Ansible playbook for provisioning a Swift All In One development environment

License

Notifications You must be signed in to change notification settings

matthewoliver/ansible-saio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAIO Ansible playbook

An Ansible playbook for provisioning a Swift and Swift-on-File all-in-one development environment on CentOS.

Requirements:

The CentOS 7 image being used by default does not have the VirtualBox Guest Additions preinstalled. Install the vagrant-vbguest plugin to have it installed on your guest VM automatically.

  1. vagrant plugin install vagrant-vbguest

To run:

To provision the VM, run:

  1. vagrant up --provider=virtualbox

To run automated tests:

  1. vagrant ssh
  2. cd /vagrant/source/swift
  3. ./.unittests
  4. ./.functests

To quickly test installation:

  1. swift stat
  2. echo 'hello world' > hw
  3. swift upload c1 hw
  4. swift list

To test installation with Swift-on-File (Note: make sure to have Swift-on-File provisioned):

  1. swift post c2 -H 'X-Storage-Policy: swiftonfile'
  2. echo 'hello swiftonfile' > hs
  3. swift upload c2 hs
  4. swift list
  5. ls /mnt/swiftonfile

Configuration Options:

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.

Hummingbird setup

To test the hummingbird branch; in global_vars.yml, set configure_hummingbird to yes before running vagrant up. Once vagrant is done provisioning, run the following:

  1. vagrant ssh
  2. cd go_work/src/github.com/openstack/swift/go
  3. make get test all
  4. startmain
  5. swift upload c1 hw
  6. swift list

Gerrit repo setup

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

Running Ansible only:

In case you already have a VM created and just wants to execute the Ansible playbook, run the following command:

  1. 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 username and group variables in global_vars.yml
  • If testing on RHEL/CentOS, enable EPEL repository first.

Todo:

  • Add gluster volume

About

An Ansible playbook for provisioning a Swift All In One development environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%