Skip to content

Instantly share code, notes, and snippets.

@termie
Forked from vishvananda/devstack.rb
Created January 19, 2012 19:30

Revisions

  1. termie revised this gist Jan 25, 2012. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions prep.sh
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,8 @@ sudo gem install vagrant
    # get chef scripts
    git clone git://github.com/cloudbuilders/openstack-cookbooks ~/box/openstack-cookbooks

    mkdir ~/box/cache
    mkdir ~/box/cache/stack # git repos are cloned here and shared via nfs
    mkdir ~/box/devstack
    mkdir -p ~/box/cache/stack # git repos are cloned here and shared via nfs
    mkdir -p ~/box/devstack
    cd ~/box/devstack
    curl -o Vagrantfile https://raw.github.com/gist/1297044/devstack.rb
    vagrant up
  2. termie revised this gist Jan 25, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prep.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ open VirtualBox-4.1.4-74291-OSX.dmg
    sudo gem install vagrant

    # get chef scripts
    git clone git://github.com/cloudbuilders/openstack-cookbooks ~/openstack-cookbooks
    git clone git://github.com/cloudbuilders/openstack-cookbooks ~/box/openstack-cookbooks

    mkdir ~/box/cache
    mkdir ~/box/cache/stack # git repos are cloned here and shared via nfs
  3. termie revised this gist Jan 25, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    ip = "#{ip_prefix}#{suffix}"
    config.vm.box = "oneiric"
    config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
    config.vm.customize ['modifyvm', '--memory', '1024']
    config.vm.customize ['modifyvm', :id, '--memory', '1024']
    config.vm.network :hostonly, ip, :mac => "#{mac_prefix}#{suffix}"
    config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
    config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
  4. termie revised this gist Jan 25, 2012. No changes.
  5. termie revised this gist Jan 25, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    ip = "#{ip_prefix}#{suffix}"
    config.vm.box = "oneiric"
    config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
    config.vm.customize ['--memory', '1024']
    config.vm.customize ['modifyvm', '--memory', '1024']
    config.vm.network :hostonly, ip, :mac => "#{mac_prefix}#{suffix}"
    config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
    config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
  6. termie revised this gist Jan 25, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    config.vm.box = "oneiric"
    config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
    config.vm.customize ['--memory', '1024']
    config.vm.network :host_only, ip, :mac => "#{mac_prefix}#{suffix}"
    config.vm.network :hostonly, ip, :mac => "#{mac_prefix}#{suffix}"
    config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
    config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
    config.vm.provision :chef_solo do |chef|
  7. termie revised this gist Jan 25, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    config.vm.box = "oneiric"
    config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
    config.vm.customize ['--memory', '1024']
    config.vm.network(ip, :mac => "#{mac_prefix}#{suffix}")
    config.vm.network :host_only, ip, :mac => "#{mac_prefix}#{suffix}"
    config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
    config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
    config.vm.provision :chef_solo do |chef|
  8. termie revised this gist Jan 25, 2012. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions devstack.rb
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,7 @@
    ip = "#{ip_prefix}#{suffix}"
    config.vm.box = "oneiric"
    config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
    config.vm.customize do |vm|
    vm.memory_size = 1024
    end
    config.vm.customize ['--memory', '1024']
    config.vm.network(ip, :mac => "#{mac_prefix}#{suffix}")
    config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
    config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
  9. termie revised this gist Jan 19, 2012. 2 changed files with 6 additions and 6 deletions.
    4 changes: 2 additions & 2 deletions devstack.rb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Vagrant::Config.run do |config|
    sshdir = "#{ENV['HOME']}/.ssh/"
    cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/cache/")
    checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
    cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/box/cache/")
    checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/box/openstack-cookbooks")
    ip_prefix = (ENV['IP_PREFIX'] or "192.168.27.")
    mac_prefix = (ENV['MAC_PREFIX'] or "080027027")
    suffix = "100"
    8 changes: 4 additions & 4 deletions prep.sh
    Original file line number Diff line number Diff line change
    @@ -8,10 +8,10 @@ sudo gem install vagrant
    # get chef scripts
    git clone git://github.com/cloudbuilders/openstack-cookbooks ~/openstack-cookbooks

    mkdir ~/cache
    mkdir ~/cache/stack # git repos are cloned here and shared via nfs
    mkdir ~/devstack
    cd ~/devstack
    mkdir ~/box/cache
    mkdir ~/box/cache/stack # git repos are cloned here and shared via nfs
    mkdir ~/box/devstack
    cd ~/box/devstack
    curl -o Vagrantfile https://raw.github.com/gist/1297044/devstack.rb
    vagrant up
    # you will need to enter your password for creating nfs shares
  10. @vishvananda vishvananda revised this gist Nov 1, 2011. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion prep.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,13 @@
    git clone git://github.com/ansolabs/openstack-cookbooks ~/openstack-cookbooks
    # install virtualbox
    curl -O http://download.virtualbox.org/virtualbox/4.1.4/VirtualBox-4.1.4-74291-OSX.dmg
    open VirtualBox-4.1.4-74291-OSX.dmg

    # install new vagrant
    sudo gem install vagrant

    # get chef scripts
    git clone git://github.com/cloudbuilders/openstack-cookbooks ~/openstack-cookbooks

    mkdir ~/cache
    mkdir ~/cache/stack # git repos are cloned here and shared via nfs
    mkdir ~/devstack
  11. @vishvananda vishvananda revised this gist Oct 31, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prep.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    git clone git://github.com/ansolabs/openstack-cookbooks ~/openstack-cookbooks
    mkdir ~/cache
    mkdir ~/cache/stack
    mkdir ~/cache/stack # git repos are cloned here and shared via nfs
    mkdir ~/devstack
    cd ~/devstack
    curl -o Vagrantfile https://raw.github.com/gist/1297044/devstack.rb
  12. @vishvananda vishvananda revised this gist Oct 31, 2011. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions prep.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,4 @@ curl -o Vagrantfile https://raw.github.com/gist/1297044/devstack.rb
    vagrant up
    # you will need to enter your password for creating nfs shares

    # when it is finished you should be able to access dashboard at 192.168.27.100
    # to make the script run more quickly next time, copy the cloned git repos into your shared cache
    vagrant ssh
    cp -r /opt/stack/* /home/vagrant/cache/stack/
    # when it is finished you should be able to access dashboard at 192.168.27.100
  13. @vishvananda vishvananda revised this gist Oct 31, 2011. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -31,8 +31,12 @@
    :rabbit_password => "secrete",
    :admin_password => "secrete",
    :service_token => "secrete",
    :flat_interface => "eth1",
    :public_interface => "eth1",
    :floating_range => (ENV['FLOATING'] or "#{ip_prefix}128/28"),
    :host_ip => ip,
    }
    },
    })
    end
    end
    end
  14. @vishvananda vishvananda revised this gist Oct 20, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    chef.run_list = [
    "recipe[anso::cache]",
    "recipe[nova::hostname]",
    #"recipe[nova::source]", # works but the script hangs at the end and you have to kill it
    "recipe[nova::source]",
    #"recipe[anso::settings]", # vim / screen / git settings for testing
    ]
    chef.json.merge!({
  15. @vishvananda vishvananda revised this gist Oct 19, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion devstack.rb
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    chef.run_list = [
    "recipe[anso::cache]",
    "recipe[nova::hostname]",
    "recipe[nova::source]",
    #"recipe[nova::source]", # works but the script hangs at the end and you have to kill it
    #"recipe[anso::settings]", # vim / screen / git settings for testing
    ]
    chef.json.merge!({
  16. @vishvananda vishvananda revised this gist Oct 19, 2011. 2 changed files with 10 additions and 4 deletions.
    4 changes: 1 addition & 3 deletions devstack.rb
    Original file line number Diff line number Diff line change
    @@ -21,10 +21,8 @@
    chef.run_list = [
    "recipe[anso::cache]",
    "recipe[nova::hostname]",
    "recipe[anso::settings]", # vim / screen / git settings for testing
    "recipe[nova::source]",
    #"recipe[nova::filevg]",
    #"recipe[nova::novascript]",
    #"recipe[anso::settings]", # vim / screen / git settings for testing
    ]
    chef.json.merge!({
    :nova => {
    10 changes: 9 additions & 1 deletion prep.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,13 @@
    git clone git://github.com/ansolabs/openstack-cookbooks ~/openstack-cookbooks
    mkdir ~/cache
    mkdir ~/cache/stack
    mkdir ~/devstack
    cd ~/devstack
    curl -o Vagrantfile https://gist.github.com/raw/786945/solo.rb
    curl -o Vagrantfile https://raw.github.com/gist/1297044/devstack.rb
    vagrant up
    # you will need to enter your password for creating nfs shares

    # when it is finished you should be able to access dashboard at 192.168.27.100
    # to make the script run more quickly next time, copy the cloned git repos into your shared cache
    vagrant ssh
    cp -r /opt/stack/* /home/vagrant/cache/stack/
  17. @vishvananda vishvananda revised this gist Oct 18, 2011. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion prep.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    git clone git://github.com/ansolabs/openstack-cookbooks ~/openstack-cookbooks
    mkdir ~/cache

    mkdir ~/devstack
    cd ~/devstack
    curl -o Vagrantfile https://gist.github.com/raw/786945/solo.rb
  18. @vishvananda vishvananda revised this gist Oct 18, 2011. 2 changed files with 4 additions and 0 deletions.
    File renamed without changes.
    4 changes: 4 additions & 0 deletions prep.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    git clone git://github.com/ansolabs/openstack-cookbooks ~/openstack-cookbooks
    mkdir ~/cache

    curl -o Vagrantfile https://gist.github.com/raw/786945/solo.rb
  19. @vishvananda vishvananda created this gist Oct 18, 2011.
    40 changes: 40 additions & 0 deletions Vagrantfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    Vagrant::Config.run do |config|
    sshdir = "#{ENV['HOME']}/.ssh/"
    cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/cache/")
    checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
    ip_prefix = (ENV['IP_PREFIX'] or "192.168.27.")
    mac_prefix = (ENV['MAC_PREFIX'] or "080027027")
    suffix = "100"
    ip = "#{ip_prefix}#{suffix}"
    config.vm.box = "oneiric"
    config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
    config.vm.customize do |vm|
    vm.memory_size = 1024
    end
    config.vm.network(ip, :mac => "#{mac_prefix}#{suffix}")
    config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
    config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
    config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "#{checkout}/cookbooks"
    chef.roles_path = "#{checkout}/roles"
    chef.log_level = :debug
    chef.run_list = [
    "recipe[anso::cache]",
    "recipe[nova::hostname]",
    "recipe[anso::settings]", # vim / screen / git settings for testing
    "recipe[nova::source]",
    #"recipe[nova::filevg]",
    #"recipe[nova::novascript]",
    ]
    chef.json.merge!({
    :nova => {
    :source => {
    :mysql_password => "secrete",
    :rabbit_password => "secrete",
    :admin_password => "secrete",
    :service_token => "secrete",
    }
    },
    })
    end
    end