2
# Juju managed local_settings.py for Horizon / openstack-dashboard
3
# Closely based on local_settings.py.example shipped with Horizon
7
# various defaults shipped in this file in ubuntu packaging.
8
# these will be used if juju generated configuration doesn't exist (yet)
9
OPENSTACK_HOST="127.0.0.1"
10
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
11
OPENSTACK_KEYSTONE_ADMIN_URL = "http://%s:35357/v2.0" % OPENSTACK_HOST
12
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
15
TEMPLATE_DEBUG = DEBUG
20
sys.path.append("/etc/openstack-dashboard")
22
# import /etc/openstack-dashboard/juju_dashboard_config.py
23
# which contains charm generated configuration
24
import juju_dashboard_config
26
# use the bits of config that have been set, rely on defaults
27
# for those that haven't.
28
if hasattr(juju_dashboard_config, "KEYSTONE_HOST"):
29
OPENSTACK_HOST = juju_dashboard_config.KEYSTONE_HOST
30
if hasattr(juju_dashboard_config, "KEYSTONE_URL"):
31
OPENSTACK_KEYSTONE_URL = juju_dashboard_config.KEYSTONE_URL
32
if hasattr(juju_dashboard_config, "KEYSTONE_ADMIN_URL"):
33
OPENSTACK_KEYSTONE_ADMIN_URL = juju_dashboard_config.KEYSTONE_ADMIN_URL
34
if hasattr(juju_dashboard_config, "KEYSTONE_ROLE"):
35
OPENSTACK_KEYSTONE_ROLE = juju_dashboard_config.KEYSTONE_ROLE
37
# juju config is missing, but fall back to defaults set above.
38
print "Could not import juju_dashboard_config. Falling back to defaults"
40
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
43
'ENGINE': 'django.db.backends.sqlite3',
44
'NAME': '/var/lib/openstack-dashboard/dashboard_openstack.sqlite',
45
'TEST_NAME': os.path.join(LOCAL_PATH, 'test.sqlite3'),
49
# We recommend you use memcached for development; otherwise after every reload
50
# of the django development server, you will have to login again. To use
51
# memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/'
52
CACHE_BACKEND = 'locmem://'
54
# Send email to the console by default
55
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
56
# Or send them to /dev/null
57
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
59
# Configure these for your outgoing email host
60
# EMAIL_HOST = 'smtp.my-company.com'
62
# EMAIL_HOST_USER = 'djangomail'
63
# EMAIL_HOST_PASSWORD = 'top-secret!'
66
'dashboards': ('nova', 'syspanel', 'settings',),
67
'default_dashboard': 'nova',
68
'user_home': 'dashboard.views.user_home',
71
# The number of Swift containers and objects to display on a single page before
72
# providing a paging element (a "more" link) to paginate results.
73
SWIFT_PAGINATE_LIMIT = 1000
75
# Configure quantum connection details for networking
76
QUANTUM_ENABLED = False
77
QUANTUM_URL = '%s' % OPENSTACK_HOST
79
QUANTUM_TENANT = '1234'
80
QUANTUM_CLIENT_VERSION='0.1'
82
# If you have external monitoring links, eg:
83
# EXTERNAL_MONITORING = [
84
# ['Nagios','http://foo.com'],
85
# ['Ganglia','http://bar.com'],
90
# When set to True this will disable all logging except
91
# for loggers specified in this configuration dictionary. Note that
92
# if nothing is specified here and disable_existing_loggers is True,
93
# django.db.backends will still log unless it is disabled explicitly.
94
'disable_existing_loggers': False,
98
'class': 'django.utils.log.NullHandler',
101
# Set the level to "DEBUG" for verbose output logging.
103
'class': 'logging.StreamHandler',
107
# Logging from django.db.backends is VERY verbose, send to null
109
'django.db.backends': {
110
'handlers': ['null'],
114
'handlers': ['console'],
118
'handlers': ['console'],
122
'handlers': ['console'],
125
'nose.plugins.manager': {
126
'handlers': ['console'],
132
# How much ram on each compute host?
133
COMPUTE_HOST_RAM_GB = 16