Skip to content

Instantly share code, notes, and snippets.

@anteaya
Last active December 16, 2015 16:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anteaya/dedca991f761c48bb262 to your computer and use it in GitHub Desktop.
Save anteaya/dedca991f761c48bb262 to your computer and use it in GitHub Desktop.
Install vm with vagrant
install virtualbox (4.2.12 or 4.2.16 but not 4.2.14)
install vagrant (I used the debs for both, v4.x for virtualbox and v1.2.2 for vagrant)
mkdir devstack_vagrant
cd devstack_vagrant
vagrant box add precise32 http://files.vagrantup.com/precise32.box
vagrant init precise32
vi Vagrantfile
uncomment out to reveal the following:
config.vm.provider :virtualbox do |vb|
# # Don't boot with headless mode
# vb.gui = true
#
# # Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024"] #max allowed is 3584
end
save
vagrant up && vagrant ssh
ssh-keygen -t <rsa|dsa> # add public key to gerrit
sudo apt-get update && sudo apt-get install -y git vim-gtk libxml2-dev libxslt1-dev libpq-dev eatmydata lynx irssi python-pip libsqlite3-dev && sudo apt-get build-dep python-mysqldb && sudo pip install git-review tox && git clone git://github.com/openstack-dev/devstack.git && cd devstack
git config <name|email|editor>
git-review -s
git-review -d <patch>
mv samples/localrc .
./stack.sh
source ~/devstack/openrc
$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| feeea436-a9b7-499e-af9e-a4c2ccd09e47 | cirros-0.3.1-x86_64-uec | ACTIVE | |
| 0ec655d2-aaff-4c41-8d9c-6f73d5d14bb4 | cirros-0.3.1-x86_64-uec-kernel | ACTIVE | |
| b12f7993-036e-498d-82f4-2def7f216443 | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE | |
+--------------------------------------+---------------------------------+--------+--------+
if you are having difficulty loading the dependencies you can add these two files
In ~/.pip/pip.conf :
[global]
index-url = http://pypi.openstack.org/openstack
In ~/.pydistutils.cfg :
[easy_install]
index_url = http://pypi.openstack.org/openstack
note that if you want to use pip or easy_install to access packages not on the openstack repo
you will want to move these files
Also: in a devstack setup it appears these files should belong to root (ie in a vagrant vm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment