Browse code

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

Anthony Young authored on 2011/09/16 15:11:53
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,105 @@
0
+import os
1
+
2
+DEBUG = True
3
+TEMPLATE_DEBUG = DEBUG
4
+PROD = False
5
+USE_SSL = False
6
+
7
+LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
8
+
9
+# FIXME: We need to change this to mysql, instead of sqlite.
10
+DATABASES = {
11
+    'default': {
12
+        'ENGINE': 'django.db.backends.sqlite3',
13
+        'NAME': os.path.join(LOCAL_PATH, 'dashboard_openstack.sqlite3'),
14
+    },
15
+}
16
+
17
+CACHE_BACKEND = 'dummy://'
18
+
19
+# Add nixon + other apps to dash installation.
20
+INSTALLED_APPS = (
21
+    'dashboard',
22
+    'dashboard.nixon',
23
+    'django.contrib.contenttypes',
24
+    'django.contrib.sessions',
25
+    'django.contrib.messages',
26
+    'django.contrib.staticfiles',
27
+    'django_openstack',
28
+    'django_openstack.templatetags',
29
+    'mailer',
30
+)
31
+
32
+
33
+# Send email to the console by default
34
+EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
35
+# Or send them to /dev/null
36
+#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
37
+
38
+# django-mailer uses a different settings attribute
39
+MAILER_EMAIL_BACKEND = EMAIL_BACKEND
40
+
41
+# Configure these for your outgoing email host
42
+# EMAIL_HOST = 'smtp.my-company.com'
43
+# EMAIL_PORT = 25
44
+# EMAIL_HOST_USER = 'djangomail'
45
+# EMAIL_HOST_PASSWORD = 'top-secret!'
46
+
47
+# FIXME: This needs to be changed to allow for multi-node setup.
48
+OPENSTACK_ADMIN_TOKEN = "999888777666"
49
+OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0/"
50
+OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
51
+
52
+# NOTE(tres): Available services should come from the service
53
+#             catalog in Keystone.
54
+SWIFT_ENABLED = False
55
+
56
+# Configure quantum connection details for networking
57
+QUANTUM_ENABLED = False
58
+QUANTUM_URL = '127.0.0.1'
59
+QUANTUM_PORT = '9696'
60
+QUANTUM_TENANT = '1234'
61
+QUANTUM_CLIENT_VERSION='0.1'
62
+
63
+# If you have external monitoring links
64
+EXTERNAL_MONITORING = [
65
+    ['Nagios','http://foo.com'],
66
+    ['Ganglia','http://bar.com'],
67
+]
68
+
69
+# If you do not have external monitoring links
70
+# EXTERNAL_MONITORING = []
71
+
72
+# Uncomment the following segment to silence most logging
73
+# django.db and boto DEBUG logging is extremely verbose.
74
+#LOGGING = {
75
+#        'version': 1,
76
+#        # set to True will disable all logging except that specified, unless
77
+#        # nothing is specified except that django.db.backends will still log,
78
+#        # even when set to True, so disable explicitly
79
+#        'disable_existing_loggers': False,
80
+#        'handlers': {
81
+#            'null': {
82
+#                'level': 'DEBUG',
83
+#                'class': 'django.utils.log.NullHandler',
84
+#                },
85
+#            'console': {
86
+#                'level': 'DEBUG',
87
+#                'class': 'logging.StreamHandler',
88
+#                },
89
+#            },
90
+#        'loggers': {
91
+#            # Comment or Uncomment these to turn on/off logging output
92
+#            'django.db.backends': {
93
+#                'handlers': ['null'],
94
+#                'propagate': False,
95
+#                },
96
+#            'django_openstack': {
97
+#                'handlers': ['null'],
98
+#                'propagate': False,
99
+#            },
100
+#        }
101
+#}
102
+
103
+# How much ram on each compute host?
104
+COMPUTE_HOST_RAM_GB = 16
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 # **stack.sh** is rackspace cloudbuilder's opinionated openstack dev installation.
4 4
 
5
-# To keep this script simple we assume you are running on an **Ubuntu 11.04 i
5
+# To keep this script simple we assume you are running on an **Ubuntu 11.04
6 6
 # Natty** machine.  It should work in a VM or physical server.  Additionally we
7 7
 # put the list of *apt* and *pip* dependencies and other configuration files in
8 8
 # this repo.  So start by grabbing this script and the dependencies.
... ...
@@ -11,9 +11,8 @@
11 11
 # Sanity Check
12 12
 # ============
13 13
 
14
-# Warn users who aren't on natty, but allow they to override check and attempt
14
+# Warn users who aren't on natty, but allow them to override check and attempt
15 15
 # installation with ``FORCE=yes ./stack``
16
-#
17 16
 if ! grep -q natty /etc/lsb-release; then
18 17
     echo "WARNING: this script has only been tested on natty"
19 18
     if [[ "$FORCE" != "yes" ]]; then
... ...
@@ -25,7 +24,7 @@ fi
25 25
 # stack.sh keeps the list of **apt** and **pip** dependencies in files.  
26 26
 # Additionally we have a few config templates and other useful files useful 
27 27
 # installation.  They are needed to be located at ``apts``, ``files`` and 
28
-# ``pips`` in the same directory as this script.
28
+# ``pips`` in the ``DEVSTACK`` directory (next to this script).
29 29
 DEVSTACK=`pwd`
30 30
 if [ ! -d $DEVSTACK/apts ] || [ ! -d $DEVSTACK/files ] || [ ! -d $DEVSTACK/pips ]; then
31 31
     echo "ERROR: missing devstack files - did you grab more than just stack.sh?"
... ...
@@ -60,6 +59,7 @@ DEST=${DEST:-/opt}
60 60
 # Set the destination directories for openstack projects
61 61
 NOVA_DIR=$DEST/nova
62 62
 DASH_DIR=$DEST/dash
63
+NIXON_DIR=$DEST/dash/openstack-dashboard/dashboard/nixon
63 64
 GLANCE_DIR=$DEST/glance
64 65
 KEYSTONE_DIR=$DEST/keystone
65 66
 NOVACLIENT_DIR=$DEST/python-novaclient
... ...
@@ -139,6 +139,8 @@ git_clone https://github.com/cloudbuilders/keystone.git $KEYSTONE_DIR
139 139
 git_clone https://github.com/cloudbuilders/noVNC.git $NOVNC_DIR
140 140
 # django powered web control panel for openstack
141 141
 git_clone https://github.com/cloudbuilders/openstack-dashboard.git $DASH_DIR
142
+# add nixon, will use this to show munin graphs in dashboard 
143
+git_clone https://github.com/cloudbuilders/nixon.git $NIXON_DIR
142 144
 # python client library to nova that dashboard (and others) use
143 145
 git_clone https://github.com/cloudbuilders/python-novaclient.git $NOVACLIENT_DIR
144 146
 # openstackx is a collection of extensions to openstack.compute & nova 
... ...
@@ -204,7 +206,10 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
204 204
     sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py
205 205
 
206 206
     cd $DASH_DIR/openstack-dashboard
207
-    sudo cp local/local_settings.py.example local/local_settings.py
207
+    
208
+    # Includes settings for Nixon, to expose munin charts.
209
+    sudo cp $DIR/files/dash_settings.py local/local_settings.py
210
+
208 211
     dashboard/manage.py syncdb
209 212
 
210 213
     # create an empty directory that apache uses as docroot