cc1
v2.1
CC1 source code docs
Main Page
Related Pages
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Pages
config_example.py
Go to the documentation of this file.
1
# logging
2
import
logging
3
4
# Logging directory. Inside CM will create directory per user for user's logs.
5
LOG_DIR =
'/var/log/cc1/cm/'
6
7
# Log level - WARNING, DEBUG, INFO or ERROR
8
LOG_LEVEL = logging.DEBUG
9
10
# Log format for each entry
11
LOG_FORMAT =
"%(asctime)s - %(levelname)s - %(message)s"
12
13
# Default user quota for new users.
14
USER_QUOTA = {
15
'cpu'
: 20,
16
'memory'
: 40000,
# MB
17
'storage'
: 40000,
# MB
18
'public_ip'
: 1,
19
'points'
: 2000
20
}
21
22
DATABASES = {
23
'default'
: {
24
'ENGINE'
:
'django.db.backends.postgresql_psycopg2'
,
25
'NAME'
:
'cm'
,
# Or path to database file if using sqlite3.
26
# 'USER': 'cc1', # Not used with sqlite3.
27
# 'PASSWORD': '', # Not used with sqlite3.
28
# 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
29
# 'PORT': '', # Set to empty string for default. Not used with sqlite3.
30
},
31
# Historical database for logs and old virtual machine entries
32
'history'
: {
33
'ENGINE'
:
'django.db.backends.postgresql_psycopg2'
,
34
'NAME'
:
'cm_history'
,
# Or path to database file if using sqlite3.
35
# 'USER': 'cc1', # Not used with sqlite3.
36
# 'PASSWORD': '', # Not used with sqlite3.
37
# 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
38
# 'PORT': '', # Set to empty string for default. Not used with sqlite3.
39
}
40
}
41
42
# OSPF Token which is authorising all routing updates in network
43
OSPF_TOKEN =
'RANDOM_OSPF_TOKEN'
44
45
# DNS domain name
46
DNS_DOMAIN =
'localdomain'
47
48
# Public address of RM used for VNC redirection
49
VNC_ADDRESS =
'127.0.0.1'
50
VNC_PORTS = {
51
'START'
: 5900,
52
'END'
: 6899,
53
'EXCLUDE'
: []
54
}
55
NOVNC_PORTS = {
56
'START'
: 6900,
57
'END'
: 7899,
58
'EXCLUDE'
: []
59
}
60
61
62
################################################################################
63
# Monitoring Configuration #
64
################################################################################
65
66
MONITOR_ENABLE =
False
67
TIMEOUT = 30
# timeout of reading information from node
68
PATH_TO_RRD =
'/var/lib/cc1/cm/rrd/'
# path to stats db
69
BACKUP_PATH =
'/var/lib/cc1/cm/rrd_backup/'
# path to backuped stats
70
71
PERIOD = 5
# period of the check every node (in seconds)
72
73
CLEANING_PERIOD = 60
# period in seconds of running cleaning thread
74
TIME_TO_REMOVE = 60 * 10
# after this time (s) stats are removed (and moved to backup) if vm was closed
75
76
# definition of monitoring data periods.
77
# first value define how many rows of raw data is calcutate to average
78
# second value define how many rows are stored in db
79
# ie. 2 and 43200 (with PERIOD=5) means that resolution of statistics is 2*5=10s
80
# and the data are available from last 5 days (43200 * 10s)
81
STATS = [
# [RESOLUTION] [TIME RANGE] [SIZE]
82
[2, 8640],
# 2*PERIOD = 10 s 8640*10 = 1 days (864 00s) 675.00 KB
83
[12, 43200],
# 12*PERIOD = 1 min 43200*60 = 1 month (2 592 000s) 3.30 MB
84
[60, 8640],
# 60*PERIOD = 5 min 8640*300 = 1 month (2 592 000s) 675.00 KB
85
[180, 2880],
# 180*PERIOD = 15 min 2880*900 = 1 month (2 592 000s) 225.00 KB
86
[720, 8760],
# 720*PERIOD = 1 h 8760*3600 = 1 year (31 536 000s) 684.38 KB
87
[17280, 3650],
# 17280*5s = 1 days 3650*86400 = 10.0 years (315 360 000s) 285.16 KB
88
[120960, 521],
# 120960*5s = 7 days 521*604800 = 10.0 years (315 100 800s) 40.7 KB
89
]
# Total: 5.82 MB
90
91
# # Dir should not include trailing slash
92
CTX_SSL_DIR =
'/etc/cc1/cm/ctx'
93
CTX_SSL_CERT =
'ctx.crt'
94
CTX_SSL_KEY =
'ctx.key'
95
96
# Make this unique, and don't share it with anybody.
97
SECRET_KEY =
'CM_SECRET_KEY'
98
cm
config_example.py
Generated on Wed Jun 18 2014 13:32:50 for cc1 by
1.8.1.2