rbenv versions ruby-build 1.9.3-p0 ~/.rbenv/versions/ruby-1.9.3-p0 rbenv global 1.9.3-p0 which gem gem update --system gem cleanup gem install bundler rake ruby-build 1.8.7-p352 ~/.rbenv/versions/ruby-1.8.7-p352 rbenv local 1.8.7-p352 rbenv version
https://github.com/nvie/gitflow
Initializegit flow init
bundle install --path vendor/bundle --binstubs export PATH=`pwd`/bin:$PATH
vagrant basebox build natty32 vagrant basebox export natty32 vagrant box add natty32 natty32.box
Launch two natty32 nodes
vagrant up chef vagrant up node1
knife node list knife node show chef knife search node "name:node*" knife node run_list add ...
knife search --help knife search node "name:node*" -a prv
knife cookbook --help
knife role --help
knife data bag --help
knife ssh --help knife ssh "*:*" "sudo chef-client" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify
Start a git flow feature branch for your work
git flow feature start collectd
Install collectd cookbooks from opscode
knife cookbook site install collectd -B feature/collectd knife cookbook site install collectd_plugins -B feature/collectd
Edit collectd server & client recipes to use ‘prv’ address.
Add collectd to run_list for nodes & reprovision
vagrant provision chef knife node run_list add chef "recipe[collectd::server]" knife ssh "name:chef" "sudo chef-client" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife node run_list add node "recipe[collectd::client]" knife node run_list add node "recipe[collectd_plugins::default]" knife ssh "name:node" "sudo chef-client" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify
Single node swift
vagrant up swift knife ssh "role:swift_storage" \ "sudo /vagrant/scripts/swift_xfs.sh" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife ssh "role:swift_proxy" \ "sudo /vagrant/scripts/swift_solo_ring.sh" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife ssh "role:swift_proxy or role:swift_storage" \ "sudo swift-init all reload" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife ssh "role:swift_proxy" \ "sudo /vagrant/scripts/swift_bench.sh" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify
Multi node swift
vagrant up swift-proxy vagrant up swift-storage1 vagrant up swift-storage2 vagrant up swift-storage3 vagrant up swift-storage4 knife ssh "role:swift_storage" \ "sudo /vagrant/scripts/swift_xfs.sh" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife ssh "role:swift_proxy" \ "sudo /vagrant/scripts/swift_ring.sh" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife ssh "role:swift_proxy or role:swift_storage" \ "sudo swift-init all reload" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify knife ssh "role:swift_proxy" \ "sudo /vagrant/scripts/swift_bench.sh" \ -a prv -x vagrant -i .ssh/id_rsa --no-host-key-verify