Permalink
Browse files

Split nova.sh into controller + compute scripts

  • Loading branch information...
1 parent ee8b9d1 commit caa599994cbd8c72a88296fa3052757c4d6fb2d8 @kiall kiall committed Nov 17, 2011
Showing with 51 additions and 6 deletions.
  1. +12 −4 README.md
  2. +7 −0 nova-all.sh
  3. +31 −0 nova-compute.sh
  4. +1 −2 nova.sh → nova-controller.sh
View
@@ -1,6 +1,6 @@
# OpenStack Setup Scripts
-These scripts install+setup OpenStack (an all in one server).
+These scripts install+setup OpenStack (an all in one server, or all bar compute + compute nodes).
# Do this on all servers
@@ -39,11 +39,19 @@ then test with:
## Install Nova
+### Controller Node
+
+Run this, and do what it says!
+
+> ./nova-controller.sh
+
+### Compute Node(s)
+
Run this, and do what it says!
-> ./nova.sh
+> ./nova-compute.sh
-then, you guessed it, test with:
+Then test with:
> ./nova-test.sh
@@ -53,4 +61,4 @@ Run this, and do what it says!
> ./dashboard.sh
-then test by visiting http://$HOST_IP/
+then test by visiting http://$HOST_IP/
View
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# Settings
+. settings
+
+./nova-controller.sh
+./nova-compute.sh
View
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Settings
+. settings
+
+apt-get install -y nova-api nova-compute nova-network python-mysqldb mysql-client curl dnsmasq bridge-utils
+
+# Nova Setup
+sed -e "s,999888777666,$SERVICE_TOKEN,g" api-paste-keystone.ini.tmpl > api-paste-keystone.ini
+
+mysql -h $MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS -e 'DROP DATABASE IF EXISTS nova;'
+mysql -h $MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS -e 'CREATE DATABASE nova;'
+
+# Nova Config
+sed -e "s,%HOST_IP%,$HOST_IP,g" nova.conf.tmpl > nova.conf
+sed -e "s,%VLAN_INTERFACE%,$VLAN_INTERFACE,g" -i nova.conf
+sed -e "s,%REGION%,$REGION,g" -i nova.conf
+sed -e "s,%MYSQL_CONN%,$MYSQL_CONN,g" -i nova.conf
+
+# Fix dnsmasq
+sed -e "s,ENABLED=1,ENABLED=0,g" -i /etc/default/dnsmasq
+killall dnsmasq
+
+echo "$COUNT: Copy nova.conf to /etc/nova and chown nova:nova /etc/nova/nova.conf"
+COUNT=`expr $COUNT + 1`
+
+echo "$COUNT: Copy api-paste-keystone.ini to /etc/nova and chown nova:nova /etc/nova/api-paste-keystone.ini"
+COUNT=`expr $COUNT + 1`
+
+echo "$COUNT: Restart all nova services"
+COUNT=`expr $COUNT + 1`
@@ -3,7 +3,7 @@
# Settings
. settings
-apt-get install -y nova-api nova-scheduler nova-compute nova-network nova-volume nova-objectstore python-mysqldb mysql-client curl dnsmasq bridge-utils
+apt-get install -y nova-api nova-scheduler nova-volume nova-objectstore python-mysqldb mysql-client curl
# Nova Setup
sed -e "s,999888777666,$SERVICE_TOKEN,g" api-paste-keystone.ini.tmpl > api-paste-keystone.ini
@@ -33,4 +33,3 @@ echo "$COUNT: Run nova-manage network create --multi_host T --network_size 16 --
COUNT=`expr $COUNT + 1`
echo "(this is for VLAN networking .. go read the OS docs for other network types and dont forget to update /etc/nova/nova.conf!)"
-

0 comments on commit caa5999

Please sign in to comment.