-
Notifications
You must be signed in to change notification settings - Fork 3
/
test_settings.py
90 lines (74 loc) · 2.88 KB
/
test_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
from planb.default_settings import * # noqa
from planb.default_settings import LOGGING, Q_CLUSTER
# Remember that DEBUG=True causes error-mails to not get sent, while
# successmails still get sent. This should probably be fixed. (FIXME)
# DEBUG = True
# Set the default paths
PLANB_SUDO_BIN = '/usr/bin/sudo'
PLANB_ZFS_BIN = '/sbin/zfs'
PLANB_RSYNC_BIN = '/usr/bin/rsync'
# Disable during dev?
PLANB_SUDO_BIN = '/bin/echo'
PLANB_ZFS_BIN = '/bin/echo'
# Globally unique identifier. Can be used by PlanB to mark snapshots as "owned"
# by this instance.
PLANB_GUID = 'c18f8afe-eb50-42ae-b559-7aa0b3b49fae' # use uuidgen(1) here
# Configure storage pools.
# Name and engine are required.
# The config keys are passed to the Storage class in the config parameter.
# Note: If you migrate from an old planb you must ensure all fileset.dest_pool
# values map to a storage pool. e.g.
# PLANB_STORAGE_POOLS['tank'] = <your zfs config for dest_pool=tank>
PLANB_STORAGE_POOLS = {
'dummy': {
'ENGINE': 'planb.storage.dummy.DummyStorage',
'NAME': 'Pool I',
},
'zfs': {
'ENGINE': 'planb.storage.zfs.ZfsStorage',
'NAME': 'ZFS Pool',
'BINARY': PLANB_ZFS_BIN,
'SUDOBIN': PLANB_SUDO_BIN,
'POOLNAME': 'tank',
'DATASETKEYS': False, # enable for ZFS encryption per dataset (safer!)
},
}
MANAGERS = ADMINS = (
# ('My Name', '[email protected]'),
)
DEFAULT_FROM_EMAIL = '[email protected]'
SERVER_EMAIL = '[email protected]'
EMAIL_SUBJECT_PREFIX = '[PlanB] '
COMPANY_NAME = 'Example Company'
COMPANY_EMAIL = '[email protected]'
# MySQL config example:
#
# SQL> set names utf8;
# SQL> create database planb;
# SQL> grant all on planb.* to planb identified by 'FIXMEFIXMEFIXME';
DATABASES = {
'default': {
# Choose 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Empty for localhost. Not used with sqlite3.
'PORT': '', # Empty for default. Not used with sqlite3.
'OPTIONS': {},
}
}
# Replace file logging with output to stderr.
for key, handler in LOGGING['handlers'].items():
if handler['class'] == 'logging.handlers.WatchedFileHandler':
handler['class'] = 'logging.StreamHandler'
handler['level'] = 'DEBUG'
del handler['filename']
del handler['delay']
ALLOWED_HOSTS = ('testserver',)
SECRET_KEY = 'T3$TK3Y_T3$TK3Y_T3$TK3Y_T3$TK3Y_T3$TK3Y_T3$TK3Y_T3$TK3Y_T3$TK3Y'
#STATIC_ROOT = '/srv/http/planb.example.com/static'
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
# XXX synchronous mode isn't fully supported by django-q and causes problems
# with transactions in the calling context.
#Q_CLUSTER['sync'] = True