Revision 0cfa5e03
b/ci/schemas/one_node_wheezy/synnefo.conf | ||
---|---|---|
21 | 21 |
ns = node1 |
22 | 22 |
client = node1 |
23 | 23 |
router = node1 |
24 |
stats = node1 |
|
24 | 25 |
|
25 | 26 |
|
26 | 27 |
[synnefo] |
b/ci/schemas/one_node_wheezy/wheezy.conf | ||
---|---|---|
23 | 23 |
python-django-south = |
24 | 24 |
python-django = |
25 | 25 |
drbd8-utils = |
26 |
collectd = |
|
26 | 27 |
|
27 | 28 |
|
28 | 29 |
[synnefo] |
... | ... | |
37 | 38 |
snf-pithos-app = wheezy |
38 | 39 |
snf-pithos-backend = wheezy |
39 | 40 |
snf-tools = wheezy |
41 |
snf-stats-app = wheezy |
|
40 | 42 |
|
41 | 43 |
|
42 | 44 |
[ganeti] |
b/snf-deploy/conf/synnefo.conf | ||
---|---|---|
21 | 21 |
ns = node1 |
22 | 22 |
client = node1 |
23 | 23 |
router = node1 |
24 |
stats = node1 |
|
24 | 25 |
|
25 | 26 |
|
26 | 27 |
[synnefo] |
b/snf-deploy/conf/wheezy.conf | ||
---|---|---|
23 | 23 |
python-django-south = |
24 | 24 |
python-django = |
25 | 25 |
drbd8-utils = |
26 |
collectd = |
|
26 | 27 |
|
27 | 28 |
|
28 | 29 |
[synnefo] |
... | ... | |
37 | 38 |
snf-pithos-app = wheezy |
38 | 39 |
snf-pithos-backend = wheezy |
39 | 40 |
snf-tools = wheezy |
41 |
snf-stats-app = wheezy |
|
40 | 42 |
|
41 | 43 |
|
42 | 44 |
[ganeti] |
b/snf-deploy/files/etc/collectd/collectd.conf | ||
---|---|---|
1 |
FQDNLookup true |
|
2 |
|
|
3 |
LoadPlugin syslog |
|
4 |
<Plugin syslog> |
|
5 |
LogLevel info |
|
6 |
</Plugin> |
|
7 |
|
|
8 |
Include "/etc/collectd/synnefo-*.conf" |
|
9 |
Include "/etc/collectd/filters.conf" |
|
10 |
Include "/etc/collectd/thresholds.conf" |
b/snf-deploy/files/etc/collectd/passwd | ||
---|---|---|
1 |
user: pass |
b/snf-deploy/files/etc/collectd/synnefo-ganeti.conf | ||
---|---|---|
1 |
<LoadPlugin python> |
|
2 |
Globals true |
|
3 |
</LoadPlugin> |
|
4 |
<Plugin python> |
|
5 |
ModulePath "/usr/lib/snf-cyclades-gtools/collectd/" |
|
6 |
LogTraces true |
|
7 |
Interactive false |
|
8 |
Import "ganeti-cpustats" |
|
9 |
Import "ganeti-netstats" |
|
10 |
</Plugin> |
|
11 |
|
|
12 |
LoadPlugin network |
|
13 |
<Plugin network> |
|
14 |
<Server "%STATS%" "25826"> |
|
15 |
SecurityLevel "Encrypt" |
|
16 |
Username "user" |
|
17 |
Password "secret" |
|
18 |
</Server> |
|
19 |
TimeToLive 128 |
|
20 |
ReportStats false |
|
21 |
MaxPacketSize 65535 |
|
22 |
</Plugin> |
b/snf-deploy/files/etc/collectd/synnefo-stats.conf | ||
---|---|---|
1 |
LoadPlugin network |
|
2 |
<Plugin network> |
|
3 |
TimeToLive 128 |
|
4 |
|
|
5 |
<Listen "%STATS%" "25826"> |
|
6 |
SecurityLevel "Sign" |
|
7 |
AuthFile "/etc/collectd/passwd" |
|
8 |
</Listen> |
|
9 |
|
|
10 |
ReportStats false |
|
11 |
MaxPacketSize 65535 |
|
12 |
</Plugin> |
|
13 |
|
|
14 |
LoadPlugin rrdtool |
|
15 |
<Plugin rrdtool> |
|
16 |
DataDir "/var/lib/collectd/rrd" |
|
17 |
CacheTimeout 120 |
|
18 |
CacheFlush 900 |
|
19 |
WritesPerSecond 30 |
|
20 |
RandomTimeout 0 |
|
21 |
</Plugin> |
b/snf-deploy/files/etc/synnefo/cyclades.conf | ||
---|---|---|
14 | 14 |
} |
15 | 15 |
MAX_NETWORKS_PER_USER = 3 |
16 | 16 |
NETWORKS_USER_QUOTA = { 'psomas@grnet.gr': 1000 } |
17 |
CPU_BAR_GRAPH_URL = 'https://%HOST%/stats/%s/cpu-bar.png'
|
|
18 |
CPU_TIMESERIES_GRAPH_URL = 'https://%HOST%/stats/%s/cpu-ts.png'
|
|
19 |
NET_BAR_GRAPH_URL = 'https://%HOST%/stats/%s/net-bar.png'
|
|
20 |
NET_TIMESERIES_GRAPH_URL = 'https://%HOST%/stats/%s/net-ts.png'
|
|
17 |
CPU_BAR_GRAPH_URL = 'https://%STATS%/stats/v1.0/cpu-bar/%s'
|
|
18 |
CPU_TIMESERIES_GRAPH_URL = 'https://%STATS%/stats/v1.0/cpu-ts/%s'
|
|
19 |
NET_BAR_GRAPH_URL = 'https://%STATS%/stats/v1.0/net-bar/%s'
|
|
20 |
NET_TIMESERIES_GRAPH_URL = 'https://%STATS%/stats/v1.0/net-ts/%s'
|
|
21 | 21 |
GANETI_DISK_TEMPLATES = ('blockdev', 'diskless', 'drbd', 'file', 'plain', |
22 | 22 |
'rbd', 'sharedfile', 'ext') |
23 | 23 |
ASTAKOS_AUTH_URL = 'https://%ACCOUNTS%/identity/v2.0' |
... | ... | |
86 | 86 |
'auth_user': 'synnefo', |
87 | 87 |
'auth_password': 'synnefo_vnc_pass', |
88 | 88 |
} |
89 |
|
|
90 |
CYCLADES_STATS_SECRET_KEY = "random" |
b/snf-deploy/files/etc/synnefo/stats.conf | ||
---|---|---|
1 |
STATS_BASE_URL = "https://%STATS%/stats/" |
|
2 |
STATS_SECRET_KEY = "random" |
b/snf-deploy/snfdeploy/__init__.py | ||
---|---|---|
80 | 80 |
setup_apt add_rapi_user add_backend |
81 | 81 |
setup_astakos add_nodes add_image_locally |
82 | 82 |
setup_cms astakos_loaddata add_network |
83 |
setup_collectd |
|
83 | 84 |
setup_common astakos_register_components add_ns |
84 | 85 |
setup_cyclades cms_loaddata add_user |
85 | 86 |
setup_db cyclades_loaddata connect_bridges |
86 | 87 |
setup_ganeti enable_drbd create_bridges |
88 |
setup_ganeti_collectd |
|
87 | 89 |
setup_gtools init_cluster create_vlans |
88 | 90 |
setup_gunicorn setup_nfs_clients destroy_db |
89 | 91 |
setup_hosts setup_nfs_server \ |
... | ... | |
100 | 102 |
setup_pithos |
101 | 103 |
setup_pithos_dir |
102 | 104 |
setup_router |
105 |
setup_stats |
|
106 |
setup_stats_collectd |
|
103 | 107 |
setup_vncauthproxy |
104 | 108 |
setup_webproject |
105 | 109 |
|
... | ... | |
445 | 449 |
"setup_cyclades", "cyclades_loaddata", "add_pools", |
446 | 450 |
"export_services", "import_services", "set_user_quota", |
447 | 451 |
"setup_kamaki", "upload_image", "register_image", |
448 |
"setup_burnin" |
|
452 |
"setup_burnin", |
|
453 |
"setup_stats" |
|
449 | 454 |
], |
450 | 455 |
"supdate": [ |
451 | 456 |
"apt_get_update", "setup_astakos", |
... | ... | |
480 | 485 |
"setup_image_host", "setup_image_helper", "add_image_locally", |
481 | 486 |
"debootstrap", "setup_net_infra", |
482 | 487 |
"setup_lvm", "enable_lvm", "enable_drbd", "setup_drbd_dparams", |
488 |
"setup_ganeti_collectd" |
|
483 | 489 |
], |
484 | 490 |
"gupdate": ["setup_apt", "setup_ganeti"], |
485 | 491 |
"gdestroy": ["destroy_cluster"], |
b/snf-deploy/snfdeploy/fabfile.py | ||
---|---|---|
62 | 62 |
"ns": [env.env.ns.ip], |
63 | 63 |
"client": [env.env.client.ip], |
64 | 64 |
"router": [env.env.router.ip], |
65 |
"stats": [env.env.stats.ip], |
|
65 | 66 |
} |
66 | 67 |
|
67 | 68 |
env.enable_lvm = False |
... | ... | |
1129 | 1130 |
#run("snf-manage loaddata flavors") |
1130 | 1131 |
|
1131 | 1132 |
|
1133 |
@roles("ganeti", "stats") |
|
1134 |
def setup_collectd(): |
|
1135 |
install_package("collectd") |
|
1136 |
tmpl = "/etc/collectd/collectd.conf" |
|
1137 |
replace = {} |
|
1138 |
custom = customize_settings_from_tmpl(tmpl, replace) |
|
1139 |
try_put(custom, tmpl, mode=0644) |
|
1140 |
|
|
1141 |
|
|
1142 |
@roles("ganeti") |
|
1143 |
def setup_ganeti_collectd(): |
|
1144 |
setup_collectd() |
|
1145 |
|
|
1146 |
tmpl = "/etc/collectd/passwd" |
|
1147 |
replace = {} |
|
1148 |
custom = customize_settings_from_tmpl(tmpl, replace) |
|
1149 |
try_put(custom, tmpl, mode=0644) |
|
1150 |
|
|
1151 |
tmpl = "/etc/collectd/synnefo-ganeti.conf" |
|
1152 |
replace = { |
|
1153 |
"STATS": env.env.stats.fqdn, |
|
1154 |
} |
|
1155 |
custom = customize_settings_from_tmpl(tmpl, replace) |
|
1156 |
try_put(custom, tmpl, mode=0644) |
|
1157 |
|
|
1158 |
try_run("/etc/init.d/collectd restart") |
|
1159 |
|
|
1160 |
|
|
1161 |
@roles("stats") |
|
1162 |
def setup_stats_collectd(): |
|
1163 |
setup_collectd() |
|
1164 |
tmpl = "/etc/collectd/synnefo-stats.conf" |
|
1165 |
|
|
1166 |
replace = { |
|
1167 |
"STATS": env.env.stats.fqdn, |
|
1168 |
} |
|
1169 |
custom = customize_settings_from_tmpl(tmpl, replace) |
|
1170 |
try_put(custom, tmpl, mode=0644) |
|
1171 |
try_run("/etc/init.d/collectd restart") |
|
1172 |
|
|
1173 |
|
|
1174 |
@roles("stats") |
|
1175 |
def setup_stats(): |
|
1176 |
debug(env.host, "Setting up snf-stats-app...") |
|
1177 |
setup_stats_collectd() |
|
1178 |
setup_gunicorn() |
|
1179 |
setup_apache() |
|
1180 |
setup_webproject() |
|
1181 |
install_package("snf-stats-app") |
|
1182 |
cmd = """ |
|
1183 |
mkdir /var/cache/snf-stats-app/ |
|
1184 |
chown www-data:www-data /var/cache/snf-stats-app/ |
|
1185 |
""" |
|
1186 |
try_run(cmd) |
|
1187 |
tmpl = "/etc/synnefo/stats.conf" |
|
1188 |
|
|
1189 |
replace = { |
|
1190 |
"STATS": env.env.stats.fqdn, |
|
1191 |
} |
|
1192 |
custom = customize_settings_from_tmpl(tmpl, replace) |
|
1193 |
try_put(custom, tmpl, mode=0644) |
|
1194 |
try_run("/etc/init.d/gunicorn restart") |
|
1195 |
|
|
1196 |
|
|
1132 | 1197 |
@roles("cyclades") |
1133 | 1198 |
def setup_cyclades(): |
1134 | 1199 |
debug(env.host, "Setting up snf-cyclades-app...") |
... | ... | |
1163 | 1228 |
"HOST": env.env.cyclades.ip, |
1164 | 1229 |
"domain": env.env.domain, |
1165 | 1230 |
"CYCLADES_SERVICE_TOKEN": service_token, |
1231 |
'STATS': env.env.stats.fqdn, |
|
1166 | 1232 |
} |
1167 | 1233 |
custom = customize_settings_from_tmpl(tmpl, replace) |
1168 | 1234 |
try_put(custom, tmpl, mode=0644) |
Also available in: Unified diff