From 9337b339bffc680942e62c08594d2c96b2839ae6 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Thu, 15 Sep 2011 21:46:20 -0700 Subject: [PATCH 1/4] adding nixon --- files/dash_settings.py | 94 ++++++++++++++++++++++++++++++++++++++++++ stack.sh | 6 ++- 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 files/dash_settings.py diff --git a/files/dash_settings.py b/files/dash_settings.py new file mode 100644 index 0000000..20442e5 --- /dev/null +++ b/files/dash_settings.py @@ -0,0 +1,94 @@ +import os + +DEBUG = True +TEMPLATE_DEBUG = DEBUG +PROD = False +USE_SSL = False + +LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(LOCAL_PATH, 'dashboard_openstack.sqlite3'), + }, +} + +CACHE_BACKEND = 'dummy://' + +# Add nixon to dash installation. +INSTALLED_APPS = ( +'dashboard.nixon', +) + +# Send email to the console by default +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' +# Or send them to /dev/null +#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' + +# django-mailer uses a different settings attribute +MAILER_EMAIL_BACKEND = EMAIL_BACKEND + +# Configure these for your outgoing email host +# EMAIL_HOST = 'smtp.my-company.com' +# EMAIL_PORT = 25 +# EMAIL_HOST_USER = 'djangomail' +# EMAIL_HOST_PASSWORD = 'top-secret!' + + +OPENSTACK_ADMIN_TOKEN = "999888777666" +OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0/" +OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" + +# NOTE(tres): Available services should come from the service +# catalog in Keystone. +SWIFT_ENABLED = False + +# Configure quantum connection details for networking +QUANTUM_ENABLED = True +QUANTUM_URL = '127.0.0.1' +QUANTUM_PORT = '9696' +QUANTUM_TENANT = '1234' +QUANTUM_CLIENT_VERSION='0.1' + +# If you have external monitoring links +EXTERNAL_MONITORING = [ + ['Nagios','http://foo.com'], + ['Ganglia','http://bar.com'], +] + +# If you do not have external monitoring links +# EXTERNAL_MONITORING = [] + +# Uncomment the following segment to silence most logging +# django.db and boto DEBUG logging is extremely verbose. +#LOGGING = { +# 'version': 1, +# # set to True will disable all logging except that specified, unless +# # nothing is specified except that django.db.backends will still log, +# # even when set to True, so disable explicitly +# 'disable_existing_loggers': False, +# 'handlers': { +# 'null': { +# 'level': 'DEBUG', +# 'class': 'django.utils.log.NullHandler', +# }, +# 'console': { +# 'level': 'DEBUG', +# 'class': 'logging.StreamHandler', +# }, +# }, +# 'loggers': { +# # Comment or Uncomment these to turn on/off logging output +# 'django.db.backends': { +# 'handlers': ['null'], +# 'propagate': False, +# }, +# 'django_openstack': { +# 'handlers': ['null'], +# 'propagate': False, +# }, +# } +#} + +# How much ram on each compute host? +COMPUTE_HOST_RAM_GB = 16 diff --git a/stack.sh b/stack.sh index 13b750a..51ddcc5 100755 --- a/stack.sh +++ b/stack.sh @@ -35,6 +35,7 @@ DEST=/opt # Set the destination directories for openstack projects NOVA_DIR=$DEST/nova DASH_DIR=$DEST/dash +NIXON_DIR=$DEST/dash/openstack-dashboard/dashboard/nixon GLANCE_DIR=$DEST/glance KEYSTONE_DIR=$DEST/keystone NOVACLIENT_DIR=$DEST/python-novaclient @@ -114,6 +115,8 @@ git_clone https://github.com/cloudbuilders/keystone.git $KEYSTONE_DIR git_clone https://github.com/cloudbuilders/noVNC.git $NOVNC_DIR # django powered web control panel for openstack git_clone https://github.com/cloudbuilders/openstack-dashboard.git $DASH_DIR +# add nixon, the iframing dashboard extension +git clone https://github.com/jakedahn/nixon.git $NIXON_DIR # python client library to nova that dashboard (and others) use git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR # openstackx is a collection of extensions to openstack.compute & nova @@ -155,7 +158,8 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py cd $DASH_DIR/openstack-dashboard - sudo cp local/local_settings.py.example local/local_settings.py + sudo cp $DIR/files/dash_settings.py local/local_settings.py + dashboard/manage.py syncdb # create an empty directory that apache uses as docroot From ad73da1c8beddbf53cb38a01a8ffffe157435571 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Thu, 15 Sep 2011 22:28:53 -0700 Subject: [PATCH 2/4] adding other packages to local installed_apps --- files/dash_settings.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/files/dash_settings.py b/files/dash_settings.py index 20442e5..5f54f3d 100644 --- a/files/dash_settings.py +++ b/files/dash_settings.py @@ -15,11 +15,20 @@ DATABASES = { CACHE_BACKEND = 'dummy://' -# Add nixon to dash installation. +# Add nixon + other apps to dash installation. INSTALLED_APPS = ( -'dashboard.nixon', + 'dashboard', + 'dashboard.nixon', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django_openstack', + 'django_openstack.templatetags', + 'mailer', ) + # Send email to the console by default EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # Or send them to /dev/null From a3492ed4a95e85fae8d3a21c4737d4ae17839721 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Thu, 15 Sep 2011 22:42:43 -0700 Subject: [PATCH 3/4] updating comments, adding fixmes --- files/dash_settings.py | 6 ++++-- stack.sh | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/files/dash_settings.py b/files/dash_settings.py index 5f54f3d..d467da8 100644 --- a/files/dash_settings.py +++ b/files/dash_settings.py @@ -6,6 +6,8 @@ PROD = False USE_SSL = False LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) + +# FIXME: We need to change this to mysql, instead of sqlite. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', @@ -43,7 +45,7 @@ MAILER_EMAIL_BACKEND = EMAIL_BACKEND # EMAIL_HOST_USER = 'djangomail' # EMAIL_HOST_PASSWORD = 'top-secret!' - +# FIXME: This needs to be changed to allow for multi-node setup. OPENSTACK_ADMIN_TOKEN = "999888777666" OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0/" OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" @@ -53,7 +55,7 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" SWIFT_ENABLED = False # Configure quantum connection details for networking -QUANTUM_ENABLED = True +QUANTUM_ENABLED = False QUANTUM_URL = '127.0.0.1' QUANTUM_PORT = '9696' QUANTUM_TENANT = '1234' diff --git a/stack.sh b/stack.sh index 3d941a6..c250940 100755 --- a/stack.sh +++ b/stack.sh @@ -140,7 +140,7 @@ git_clone https://github.com/cloudbuilders/keystone.git $KEYSTONE_DIR git_clone https://github.com/cloudbuilders/noVNC.git $NOVNC_DIR # django powered web control panel for openstack git_clone https://github.com/cloudbuilders/openstack-dashboard.git $DASH_DIR -# add nixon, the iframing dashboard extension +# add nixon, will use this to show munin graphs in dashboard git clone https://github.com/jakedahn/nixon.git $NIXON_DIR # python client library to nova that dashboard (and others) use git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR @@ -198,6 +198,8 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py cd $DASH_DIR/openstack-dashboard + + # Includes settings for Nixon, to expose munin charts. sudo cp $DIR/files/dash_settings.py local/local_settings.py dashboard/manage.py syncdb From 38fc665584e906f9b6832663953388e9fc24e1b2 Mon Sep 17 00:00:00 2001 From: Jake Dahn Date: Thu, 15 Sep 2011 22:58:06 -0700 Subject: [PATCH 4/4] changing nixon repo to cloudbuilders --- stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index c250940..554cf69 100755 --- a/stack.sh +++ b/stack.sh @@ -141,7 +141,7 @@ git_clone https://github.com/cloudbuilders/noVNC.git $NOVNC_DIR # django powered web control panel for openstack git_clone https://github.com/cloudbuilders/openstack-dashboard.git $DASH_DIR # add nixon, will use this to show munin graphs in dashboard -git clone https://github.com/jakedahn/nixon.git $NIXON_DIR +git_clone https://github.com/cloudbuilders/nixon.git $NIXON_DIR # python client library to nova that dashboard (and others) use git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR # openstackx is a collection of extensions to openstack.compute & nova