Merge branch 'master' of github.com:cloudbuilders/devstack

This commit is contained in:
Anthony Young 2011-09-15 23:11:53 -07:00
commit a9a32de4af
2 changed files with 115 additions and 5 deletions

105
files/dash_settings.py Normal file
View file

@ -0,0 +1,105 @@
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
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',
'NAME': os.path.join(LOCAL_PATH, 'dashboard_openstack.sqlite3'),
},
}
CACHE_BACKEND = 'dummy://'
# Add nixon + other apps to dash installation.
INSTALLED_APPS = (
'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
#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!'
# 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"
# NOTE(tres): Available services should come from the service
# catalog in Keystone.
SWIFT_ENABLED = False
# Configure quantum connection details for networking
QUANTUM_ENABLED = False
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

View file

@ -2,7 +2,7 @@
# **stack.sh** is rackspace cloudbuilder's opinionated openstack dev installation. # **stack.sh** is rackspace cloudbuilder's opinionated openstack dev installation.
# To keep this script simple we assume you are running on an **Ubuntu 11.04 i # To keep this script simple we assume you are running on an **Ubuntu 11.04
# Natty** machine. It should work in a VM or physical server. Additionally we # Natty** machine. It should work in a VM or physical server. Additionally we
# put the list of *apt* and *pip* dependencies and other configuration files in # put the list of *apt* and *pip* dependencies and other configuration files in
# this repo. So start by grabbing this script and the dependencies. # this repo. So start by grabbing this script and the dependencies.
@ -11,9 +11,8 @@
# Sanity Check # Sanity Check
# ============ # ============
# Warn users who aren't on natty, but allow they to override check and attempt # Warn users who aren't on natty, but allow them to override check and attempt
# installation with ``FORCE=yes ./stack`` # installation with ``FORCE=yes ./stack``
#
if ! grep -q natty /etc/lsb-release; then if ! grep -q natty /etc/lsb-release; then
echo "WARNING: this script has only been tested on natty" echo "WARNING: this script has only been tested on natty"
if [[ "$FORCE" != "yes" ]]; then if [[ "$FORCE" != "yes" ]]; then
@ -25,7 +24,7 @@ fi
# stack.sh keeps the list of **apt** and **pip** dependencies in files. # stack.sh keeps the list of **apt** and **pip** dependencies in files.
# Additionally we have a few config templates and other useful files useful # Additionally we have a few config templates and other useful files useful
# installation. They are needed to be located at ``apts``, ``files`` and # installation. They are needed to be located at ``apts``, ``files`` and
# ``pips`` in the same directory as this script. # ``pips`` in the ``DEVSTACK`` directory (next to this script).
DEVSTACK=`pwd` DEVSTACK=`pwd`
if [ ! -d $DEVSTACK/apts ] || [ ! -d $DEVSTACK/files ] || [ ! -d $DEVSTACK/pips ]; then if [ ! -d $DEVSTACK/apts ] || [ ! -d $DEVSTACK/files ] || [ ! -d $DEVSTACK/pips ]; then
echo "ERROR: missing devstack files - did you grab more than just stack.sh?" echo "ERROR: missing devstack files - did you grab more than just stack.sh?"
@ -60,6 +59,7 @@ DEST=${DEST:-/opt}
# Set the destination directories for openstack projects # Set the destination directories for openstack projects
NOVA_DIR=$DEST/nova NOVA_DIR=$DEST/nova
DASH_DIR=$DEST/dash DASH_DIR=$DEST/dash
NIXON_DIR=$DEST/dash/openstack-dashboard/dashboard/nixon
GLANCE_DIR=$DEST/glance GLANCE_DIR=$DEST/glance
KEYSTONE_DIR=$DEST/keystone KEYSTONE_DIR=$DEST/keystone
NOVACLIENT_DIR=$DEST/python-novaclient NOVACLIENT_DIR=$DEST/python-novaclient
@ -139,6 +139,8 @@ git_clone https://github.com/cloudbuilders/keystone.git $KEYSTONE_DIR
git_clone https://github.com/cloudbuilders/noVNC.git $NOVNC_DIR git_clone https://github.com/cloudbuilders/noVNC.git $NOVNC_DIR
# django powered web control panel for openstack # django powered web control panel for openstack
git_clone https://github.com/cloudbuilders/openstack-dashboard.git $DASH_DIR 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/cloudbuilders/nixon.git $NIXON_DIR
# python client library to nova that dashboard (and others) use # python client library to nova that dashboard (and others) use
git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR
# openstackx is a collection of extensions to openstack.compute & nova # openstackx is a collection of extensions to openstack.compute & nova
@ -204,7 +206,10 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py
cd $DASH_DIR/openstack-dashboard cd $DASH_DIR/openstack-dashboard
sudo cp local/local_settings.py.example local/local_settings.py
# Includes settings for Nixon, to expose munin charts.
sudo cp $DIR/files/dash_settings.py local/local_settings.py
dashboard/manage.py syncdb dashboard/manage.py syncdb
# create an empty directory that apache uses as docroot # create an empty directory that apache uses as docroot