[ci] Added devstack vagrant file.
This commit is contained in:
parent
0d87be2c63
commit
8f98462ed0
44
Vagrantfile
vendored
44
Vagrantfile
vendored
@ -1,14 +1,13 @@
|
|||||||
# -*- mode: ruby -*-
|
# -*- mode: ruby -*-
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
#require 'vagrant-ansible'
|
|
||||||
#Vagrant::Config.run do |config|
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.provision "shell", inline: "echo 'Hello, lets start deployment.'"
|
config.vm.provision "shell", inline: "echo 'Hello, lets start deployment.'"
|
||||||
|
|
||||||
config.vm.define "web" do |web|
|
config.vm.define "web" do |web|
|
||||||
web.vm.box = "ubuntu12.04-server-amd64"
|
web.vm.box = "ubuntu12.04-server-amd64"
|
||||||
web.vm.box_url = "http://goo.gl/8kWkm"
|
web.vm.box_url = "http://goo.gl/8kWkm"
|
||||||
web.vm.network "forwarded_port", guest: 8000, host: 8000
|
web.vm.network "forwarded_port", guest: 8000, host: 8000, host_ip: '0.0.0.0'
|
||||||
web.vm.network "forwarded_port", guest: 5000, host: 5000
|
web.vm.network "forwarded_port", guest: 5000, host: 5000
|
||||||
web.vm.provision :chef_solo do |chef|
|
web.vm.provision :chef_solo do |chef|
|
||||||
chef.cookbooks_path = ["vagrant/cookbooks"]
|
chef.cookbooks_path = ["vagrant/cookbooks"]
|
||||||
@ -16,24 +15,23 @@ Vagrant.configure("2") do |config|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# config.vm.define "dev" do |dev|
|
config.vm.define "dev" do |dev|
|
||||||
# dev.vm.box = "precise64"
|
dev.vm.box = "precise64"
|
||||||
# dev.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
dev.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
||||||
## dev.vm.network "forwarded_port", guest: 22, host: 2022
|
dev.vm.network "forwarded_port", guest: 22, host: 2202, host_ip: '0.0.0.0'
|
||||||
# dev.vm.network :private_network, ip: "192.168.27.100"
|
dev.vm.network :private_network, ip: "192.168.26.100"
|
||||||
# dev.vm.network :private_network, ip: "172.24.4.225", :netmask => "255.255.255.224", :auto_config => false
|
dev.vm.network :private_network, ip: "172.24.4.225", :netmask => "255.255.255.224", :auto_config => false
|
||||||
# dev.vm.provider "virtualbox" do |vb|
|
dev.vm.provider "virtualbox" do |vb|
|
||||||
# vb.customize ["modifyvm", :id, "--memory", "2048"]
|
vb.customize ["modifyvm", :id, "--memory", "2048"]
|
||||||
# vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
|
vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
|
||||||
# end
|
end
|
||||||
# dev.vm.provision "ansible" do |ansible|
|
dev.vm.provision "ansible" do |ansible|
|
||||||
# ansible.playbook = "devstack.yaml"
|
ansible.host_key_checking = false
|
||||||
# ansible.verbose = "v"
|
ansible.playbook = "devstack.yaml"
|
||||||
# end
|
ansible.verbose = "vv"
|
||||||
# dev.vm.provision :shell, :inline => "cd devstack; sudo -u vagrant env HOME=/home/vagrant ./stack.sh"
|
end
|
||||||
# dev.vm.provision :shell, :inline => "ovs-vsctl add-port br-ex eth2"
|
dev.vm.provision :shell, :inline => "cd devstack; sudo -u vagrant env HOME=/home/vagrant ./stack.sh"
|
||||||
## dev.vm.provision :shell do |shell|
|
dev.vm.provision :shell, :inline => "ovs-vsctl add-port br-ex eth2"
|
||||||
## shell.inline = "apt-get update && apt-get -y install git vim-gtk libxml2-dev libxslt1-dev libpq-dev python-pip libsqlite3-dev && apt-get -y build-dep python-mysqldb && pip install git-review tox && git clone git://git.openstack.org/openstack-dev/devstack && chown -R vagrant:vagrant devstack && cd devstack && tools/create-stack-user.sh && ./stack.sh"
|
end
|
||||||
## end
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
26
devstack.yaml
Normal file
26
devstack.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
- hosts: dev
|
||||||
|
vars:
|
||||||
|
devstack_repo: git://github.com/openstack-dev/devstack.git
|
||||||
|
public_ip: 192.168.26.101
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: install packages
|
||||||
|
apt: "pkg={{ item }} update_cache=yes"
|
||||||
|
sudo: True
|
||||||
|
with_items:
|
||||||
|
- git
|
||||||
|
|
||||||
|
- name: checkout devstack
|
||||||
|
git: "repo={{ devstack_repo }} dest=/home/vagrant/devstack version=stable/grizzly"
|
||||||
|
|
||||||
|
- name: localrc
|
||||||
|
template: src=localrc dest=/home/vagrant/devstack/localrc
|
||||||
|
|
||||||
|
- name: source openrc in profile
|
||||||
|
lineinfile: dest=/home/vagrant/.profile regexp=".*openrc" line='. /home/vagrant/devstack/openrc'
|
||||||
|
|
||||||
|
- name: enable eth2
|
||||||
|
command: ip link set dev eth2 up
|
||||||
|
sudo: True
|
||||||
|
|
28
localrc
Normal file
28
localrc
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Default passwords
|
||||||
|
ADMIN_PASSWORD=password
|
||||||
|
MYSQL_PASSWORD=password
|
||||||
|
RABBIT_PASSWORD=password
|
||||||
|
SERVICE_PASSWORD=password
|
||||||
|
SERVICE_TOKEN=password
|
||||||
|
|
||||||
|
|
||||||
|
SCREEN_LOGDIR=/opt/stack/logs
|
||||||
|
|
||||||
|
|
||||||
|
HOST_IP={{ public_ip }}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Neutron configs
|
||||||
|
#
|
||||||
|
# https://wiki.openstack.org/wiki/NeutronDevstack
|
||||||
|
disable_service n-net
|
||||||
|
enable_service q-svc
|
||||||
|
enable_service q-agt
|
||||||
|
enable_service q-dhcp
|
||||||
|
enable_service q-l3
|
||||||
|
enable_service q-meta
|
||||||
|
enable_service neutron
|
||||||
|
|
||||||
|
# Disable security groups entirely
|
||||||
|
Q_USE_SECGROUP=False
|
||||||
|
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
|
Loading…
x
Reference in New Issue
Block a user