From 0e8cc4a2cdcc9db13dc2d0e14c1c6df3b692c42a Mon Sep 17 00:00:00 2001 From: dEBUGGER Date: Fri, 30 Aug 2013 11:09:12 -0700 Subject: [PATCH 1/5] Fix Vagrantfile to launch multiple nodes --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index e845052..4a28c6c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -27,7 +27,7 @@ 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" From d4d5cc9dc28fc0a6abdc941bf710558cdd3bff92 Mon Sep 17 00:00:00 2001 From: dEBUGGER Date: Fri, 30 Aug 2013 14:36:04 -0700 Subject: [PATCH 2/5] Reduce memory to run two compute nodes on 8G laptop --- Vagrantfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 4a28c6c..2cf4755 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,10 +5,9 @@ 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], + 'quantum' => [1, 202] } @@ -71,10 +70,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 From a86b62f14329bd21508d24967a4411e9310c009e Mon Sep 17 00:00:00 2001 From: dEBUGGER Date: Mon, 2 Sep 2013 18:38:17 -0700 Subject: [PATCH 3/5] Add Horizon dashboard to client. Comment out Quantum. --- Vagrantfile | 4 +++- client.sh | 10 ++++++++-- controller.sh | 7 +++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 2cf4755..38f2523 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,9 @@ nodes = { 'controller' => [1, 200], 'compute' => [2, 201], 'cinder' => [1, 211], - 'quantum' => [1, 202] + 'client' => [1, 100] + # Try without quantum... + # , 'quantum' => [1, 202] } diff --git a/client.sh b/client.sh index 2fc7b71..20dd919 100755 --- a/client.sh +++ b/client.sh @@ -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/^/#/' diff --git a/controller.sh b/controller.sh index 160fe30..87c322c 100644 --- a/controller.sh +++ b/controller.sh @@ -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 ############################### From df0ded7e6aea933d2a2a6720104a224a464ffe07 Mon Sep 17 00:00:00 2001 From: dEBUGGER Date: Mon, 2 Sep 2013 19:00:33 -0700 Subject: [PATCH 4/5] Add port forwarding for Horizon dashboard --- Vagrantfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 38f2523..0b184e6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -34,6 +34,9 @@ Vagrant.configure("2") do |config| 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" From 63aac589f15f74649c2aab909c2e9b7bacde5321 Mon Sep 17 00:00:00 2001 From: dzimine Date: Wed, 4 Sep 2013 11:03:24 -0700 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d64ad2..6bf176e 100644 --- a/README.md +++ b/README.md @@ -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