summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/nova.sh33
1 files changed, 20 insertions, 13 deletions
diff --git a/contrib/nova.sh b/contrib/nova.sh
index 6033c9e3a..30df4edb6 100755
--- a/contrib/nova.sh
+++ b/contrib/nova.sh
@@ -22,8 +22,10 @@ USE_MYSQL=${USE_MYSQL:-0}
MYSQL_PASS=${MYSQL_PASS:-nova}
TEST=${TEST:-0}
USE_LDAP=${USE_LDAP:-0}
+# Use OpenDJ instead of OpenLDAP when using LDAP
+USE_OPENDJ=${USE_OPENDJ:-0}
LIBVIRT_TYPE=${LIBVIRT_TYPE:-qemu}
-NET_MAN=${NET_MAN:-FlatDHCPManager}
+NET_MAN=${NET_MAN:-VlanManager}
# NOTE(vish): If you are using FlatDHCP on multiple hosts, set the interface
# below but make sure that the interface doesn't already have an
# ip or you risk breaking things.
@@ -42,11 +44,10 @@ else
fi
mkdir -p /etc/nova
-cat >/etc/nova/nova-manage.conf << NOVA_CONF_EOF
+cat >$NOVA_DIR/bin/nova.conf << NOVA_CONF_EOF
--verbose
--nodaemon
---dhcpbridge_flagfile=/etc/nova/nova-manage.conf
---FAKE_subdomain=ec2
+--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf
--network_manager=nova.network.manager.$NET_MAN
--cc_host=$HOST_IP
--routing_source_ip=$HOST_IP
@@ -56,7 +57,7 @@ cat >/etc/nova/nova-manage.conf << NOVA_CONF_EOF
NOVA_CONF_EOF
if [ -n "$FLAT_INTERFACE" ]; then
- echo "--flat_interface=$FLAT_INTERFACE" >>/etc/nova/nova-manage.conf
+ echo "--flat_interface=$FLAT_INTERFACE" >>$NOVA_DIR/bin/nova.conf
fi
if [ "$CMD" == "branch" ]; then
@@ -71,7 +72,7 @@ fi
# You should only have to run this once
if [ "$CMD" == "install" ]; then
sudo apt-get install -y python-software-properties
- sudo add-apt-repository ppa:nova-core/ppa
+ sudo add-apt-repository ppa:nova-core/trunk
sudo apt-get update
sudo apt-get install -y dnsmasq kpartx kvm gawk iptables ebtables
sudo apt-get install -y user-mode-linux kvm libvirt-bin
@@ -114,7 +115,13 @@ if [ "$CMD" == "run" ]; then
rm $NOVA_DIR/nova.sqlite
fi
if [ "$USE_LDAP" == 1 ]; then
- sudo $NOVA_DIR/nova/auth/slap.sh
+ if [ "$USE_OPENDJ" == 1 ]; then
+ echo '--ldap_user_dn=cn=Directory Manager' >> \
+ /etc/nova/nova-manage.conf
+ sudo $NOVA_DIR/nova/auth/opendj.sh
+ else
+ sudo $NOVA_DIR/nova/auth/slap.sh
+ fi
fi
rm -rf $NOVA_DIR/instances
mkdir -p $NOVA_DIR/instances
@@ -142,12 +149,12 @@ if [ "$CMD" == "run" ]; then
# nova api crashes if we start it with a regular screen command,
# so send the start command by forcing text into the window.
- screen_it api "$NOVA_DIR/bin/nova-api --flagfile=/etc/nova/nova-manage.conf"
- screen_it objectstore "$NOVA_DIR/bin/nova-objectstore --flagfile=/etc/nova/nova-manage.conf"
- screen_it compute "$NOVA_DIR/bin/nova-compute --flagfile=/etc/nova/nova-manage.conf"
- screen_it network "$NOVA_DIR/bin/nova-network --flagfile=/etc/nova/nova-manage.conf"
- screen_it scheduler "$NOVA_DIR/bin/nova-scheduler --flagfile=/etc/nova/nova-manage.conf"
- screen_it volume "$NOVA_DIR/bin/nova-volume --flagfile=/etc/nova/nova-manage.conf"
+ screen_it api "$NOVA_DIR/bin/nova-api"
+ screen_it objectstore "$NOVA_DIR/bin/nova-objectstore"
+ screen_it compute "$NOVA_DIR/bin/nova-compute"
+ screen_it network "$NOVA_DIR/bin/nova-network"
+ screen_it scheduler "$NOVA_DIR/bin/nova-scheduler"
+ screen_it volume "$NOVA_DIR/bin/nova-volume"
screen_it test ". $NOVA_DIR/novarc"
screen -S nova -x
fi