Boxing devstack with
...
The simplest way is to install the latest version of Vagrant
These are the steps I followed to install the Newton branch of devstack into a Vagrant controlled VM
vagrant init bento/ubuntu-16.04
nano VagrantfileThen in the resultant edit window alter the Vagrant file to be as follows:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "bento/ubuntu-16.04"
# set up the the network
config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
config.vm.network "forwarded_port", guest: 6080, host: 8081, host_ip: "127.0.0.1"
# and the amount of memory and cpu's to use
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
endBring the VM up and ssh into it...
vagrant up && vagrant sshOnce in the VM bring it up to date and install git
sudo apt-get update && sudo apt-get -y install gitThen fetch devstack and change into its directory...
git clone git://git.openstack.org/openstack-dev/devstack && cd devstackSwitch to the icehouse branch
git checkout stable/newtonThen fire up devstack
./stack.shProvide the requested passwords, etc..
Once up, the dashboard is available from the host computer at http://localhost:8080/. Your users are 'admin' and 'demo', and the password is the one that you provided when answering the stack.sh questions...
In the VM you can source the openrc file to enable credentials for command line tools as the demo user.
source ~devstack/openrcNB: If you want to be the admin user on the command line, source with 'admin' as an argument
source ~devstack/openrc adminTo stop devstack,
./unstack.shTo run devstack off line, in openrc add the line (but note that devstack must have been run successfully with Internet access prior to doing this)
OFFLINE=TrueTo force devstack to update all of the repositories when it runs, in openrc add the line
RECLONE=yesAnd if using the command line tools, once you've sourced openrc you can generate a keypair to use as follows
#to generate a keypair to use...
nova keypair-add heat_key > heat_key.priv
chmod 600 heat_key.privIf you start devstack, sign in via the dashboard, then restart devstack, you might find that your browser still is associated with the old session, hence you get a big django exception when you return to the dashboard. Simply visit http://localhost:8080/auth/logout to clear the old session...
The above is a little out of date when talking about localrc. For more on setting the conf files, see:
