Skip to content

Commit

Permalink
Split nova.sh into controller + compute scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kiall committed Nov 17, 2011
1 parent ee8b9d1 commit caa5999
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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/
7 changes: 7 additions & 0 deletions nova-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Settings
. settings

./nova-controller.sh
./nova-compute.sh
31 changes: 31 additions & 0 deletions nova-compute.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 1 addition & 2 deletions nova.sh → nova-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.