From 2a15a7c40afd22c9b4a14043a4bb569ccea82824 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 13 Sep 2011 13:22:14 -0500 Subject: [PATCH 1/3] Minor fixes --- stack.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stack.sh b/stack.sh index 647ddbe..72c056f 100755 --- a/stack.sh +++ b/stack.sh @@ -37,7 +37,7 @@ NOVNC_DIR=$DEST/noVNC # Use the first IP unless an explicit is set by ``HOST_IP`` environment variable if [ ! -n "$HOST_IP" ]; then - HOST_IP=`LC_ALL=C ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'` + HOST_IP=`LC_ALL=C /sbin/ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'` fi # Nova network configuration @@ -145,16 +145,16 @@ fi # of installing quantum we can create a simple module that will pass the # initial imports mkdir $DASH_DIR/openstack-dashboard/quantum || true -touch $DASH_DIR/openstack-dashboard/quantum/__init__.py -touch $DASH_DIR/openstack-dashboard/quantum/client.py +touch $DASH_DIR/openstack-dashboard/quantum/__init__.py || true +touch $DASH_DIR/openstack-dashboard/quantum/client.py || true cd $DASH_DIR/openstack-dashboard -cp local/local_settings.py.example local/local_settings.py +[ ! -r local/local_settings.py ] && cp local/local_settings.py.example local/local_settings.py dashboard/manage.py syncdb # setup apache # create an empty directory to use as our -mkdir $DASH_DIR/.blackhole +mkdir -p $DASH_DIR/.blackhole # FIXME(ja): can't figure out how to make $DASH_DIR work in sed, also install to available/a2e it cat $DIR/files/000-default.template | sed 's/%DASH_DIR%/\/opt\/dash/g' > /tmp/000-default From 0017c8f9d51553d7f19d931b313931d78fea526b Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 13 Sep 2011 15:37:50 -0500 Subject: [PATCH 2/3] Add munin to stack --- apts/general | 1 + stack.sh | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/apts/general b/apts/general index 57506f4..eb37e9a 100644 --- a/apts/general +++ b/apts/general @@ -10,3 +10,4 @@ lsof # useful when debugging openssh-server vim-nox locate # useful when debugging +munin diff --git a/stack.sh b/stack.sh index 72c056f..22874d9 100755 --- a/stack.sh +++ b/stack.sh @@ -34,6 +34,7 @@ KEYSTONE_DIR=$DEST/keystone NOVACLIENT_DIR=$DEST/python-novaclient API_DIR=$DEST/openstackx NOVNC_DIR=$DEST/noVNC +MUNIN_DIR=$DEST/openstack-munin # Use the first IP unless an explicit is set by ``HOST_IP`` environment variable if [ ! -n "$HOST_IP" ]; then @@ -101,12 +102,15 @@ git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR # openstackx is a collection of extensions to openstack.compute & nova # that is *deprecated*. The code is being moved into python-novaclient & nova. git_clone https://github.com/cloudbuilders/openstackx.git $API_DIR +# openstack-munin is a collection of munin plugins for monitoring the stack +git_clone https://github.com/cloudbuilders/openstack-munin.git $MUNIN_DIR # Initialization # ============== # setup our checkouts so they are installed into python path # allowing ``import nova`` or ``import glance.client`` +cd $NOVA_DIR; sudo python setup.py develop cd $NOVACLIENT_DIR; sudo python setup.py develop cd $KEYSTONE_DIR; sudo python setup.py develop cd $GLANCE_DIR; sudo python setup.py develop @@ -165,6 +169,30 @@ sudo mv /tmp/000-default /etc/apache2/sites-enabled # dashboard can run sudo chown -R www-data:www-data $DASH_DIR +# Munin +# ----- + +# allow connections from other hosts +sudo sed -i -e '/Allow from localhost/s/localhost.*$/all/' /etc/munin/apache.conf + +cat >/tmp/nova < Date: Wed, 14 Sep 2011 10:20:57 -0500 Subject: [PATCH 3/3] Auto-detect current user --- stack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.sh b/stack.sh index 22874d9..2e97ef0 100755 --- a/stack.sh +++ b/stack.sh @@ -177,10 +177,10 @@ sudo sed -i -e '/Allow from localhost/s/localhost.*$/all/' /etc/munin/apache.con cat >/tmp/nova <