Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Check the Repo Wiki for instructions on how to use the environment.

## Usage

git clone https://github.com/bunchc/Couch_to_OpenStack.git
git clone https://github.com/dzimine/Couch_to_OpenStack.git
cd Couch_to_OpenStack
vagrant up

16 changes: 10 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ require 'securerandom'
# remove the 'client' entry to below to save on host resources
nodes = {
'controller' => [1, 200],
'compute' => [1, 201],
'compute' => [2, 201],
'cinder' => [1, 211],
'quantum' => [1, 202],
'client' => [1, 100],
'client' => [1, 100]
# Try without quantum...
# , 'quantum' => [1, 202]
}


Expand All @@ -27,12 +28,15 @@ Vagrant.configure("2") do |config|

nodes.each do |prefix, (count, ip_start)|
count.times do |i|
hostname = "%s" % [prefix, (i+1)]
hostname = (count == 1 ? prefix : prefix+"-#{i+1}")
config.vm.define "#{hostname}" do |box|
box.vm.hostname = "#{hostname}.book"
box.vm.network :private_network, ip: "172.16.#{third_octet}.#{ip_start+i}", :netmask => "255.255.0.0"
box.vm.network :private_network, ip: "10.10.#{third_octet}.#{ip_start+i}", :netmask => "255.255.0.0"
box.vm.network :private_network, ip: "192.168.#{third_octet}.#{ip_start+i}", :netmask => "255.255.255.0"
if prefix == "client"
box.vm.network :forwarded_port, guest: 80, host: 8180
end

# Run the Shell Provisioning Script file
box.vm.provision :shell, :path => "#{prefix}.sh"
Expand Down Expand Up @@ -71,10 +75,10 @@ Vagrant.configure("2") do |config|
vbox.customize ["modifyvm", :id, "--memory", 1024]
vbox.customize ["modifyvm", :id, "--cpus", 1]
if prefix == "compute"
vbox.customize ["modifyvm", :id, "--memory", 3128]
vbox.customize ["modifyvm", :id, "--memory", 1024]
vbox.customize ["modifyvm", :id, "--cpus", 2]
elsif prefix == "controller"
vbox.customize ["modifyvm", :id, "--memory", 2048]
vbox.customize ["modifyvm", :id, "--memory", 1024]
elsif prefix == "client" or prefix == "proxy"
vbox.customize ["modifyvm", :id, "--memory", 512]
end
Expand Down
10 changes: 8 additions & 2 deletions client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
# The routeable IP of the node is on our eth1 interface
MY_IP=$(ifconfig eth1 | awk '/inet addr/ {split ($2,A,":"); print A[2]}')

# Install client packages:
sudo apt-get -y install vim python-keystoneclient python-glanceclient python-novaclient python-cinderclient python-quantumclient

# Install horizon dashboard (Available at http://MY_IP/horizon)
sudo apt-get install -y memcached libapache2-mod-wsgi openstack-dashboard

# Install some packages:
sudo apt-get -y install vim python-keystoneclient python-glanceclient python-novaclient python-cinderclient python-quantumclient
sudo sed -i "s/^OPENSTACK_HOST.*/OPENSTACK_HOST = \"${CONTROLLER_HOST}\"/g" /etc/openstack-dashboard/local_settings.py

# TODO: turn off memcached
# sed -e '//,+4 s/^/#/'
7 changes: 7 additions & 0 deletions controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,13 @@ mysql -uroot -p$MYSQL_ROOT_PASS -e 'CREATE DATABASE cinder;'
mysql -uroot -p$MYSQL_ROOT_PASS -e "GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%';"
mysql -uroot -p$MYSQL_ROOT_PASS -e "SET PASSWORD FOR 'cinder'@'%' = PASSWORD('$MYSQL_CINDER_PASS');"


###############################
# Horizon dashboard
###############################

# sudo apt-get install -y memcached libapache2-mod-wsgi openstack-dashboard

###############################
# OpenStack Deployment Complete
###############################
Expand Down