Added vagrant file for devstack bootstrap

This patch adds a Vagrantfile which bootstraps a Devstack VM
for developer use.

Change-Id: I6dcce1046f28a3facd361b0bd4689d659350520b
changes/22/346422/2
Michael Krotscheck 7 years ago
parent 81f50b8b99
commit c9f60b735f

1
.gitignore vendored

@ -20,6 +20,7 @@ package
dist
www
*.tgz
.vagrant
# Dependency directories
node_modules

14
Vagrantfile vendored

@ -0,0 +1,14 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network 'private_network', ip: '192.168.99.99'
config.vm.hostname = 'devstack'
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
end
config.vm.provision "shell", path: "vagrant.sh"
end

@ -0,0 +1,48 @@
#!/usr/bin/env bash
apt-get update
apt-get dist-upgrade -y
apt-get install -y git
mkdir -p /devstack
cd /devstack
# Clone if we have to, else just pull.
if [ ! -d .git ]
then
git clone https://git.openstack.org/openstack-dev/devstack /devstack
else
git pull
fi
# Make sure the user exists
/devstack/tools/create-stack-user.sh
chown -R stack:stack /devstack
# Create some default passwords
cat >/devstack/.localrc.password <<EOL
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
ADMIN_PASSWORD=password
EOL
# Add some other settings.
cat >/devstack/local.conf <<EOL
[localrc]
HOST_IP=192.168.99.99
SERVICE_HOST=$HOST_IP
#CINDER_BRANCH=milestone-proposed
#GLANCE_BRANCH=milestone-proposed
#HORIZON_BRANCH=milestone-proposed
#KEYSTONE_BRANCH=milestone-proposed
#KEYSTONECLIENT_BRANCH=milestone-proposed
#NOVA_BRANCH=milestone-proposed
#NOVACLIENT_BRANCH=milestone-proposed
#NEUTRON_BRANCH=milestone-proposed
#SWIFT_BRANCH=milestone-proposed
EOL
# Start devstack.
su - stack /devstack/unstack.sh
su - stack /devstack/stack.sh
Loading…
Cancel
Save