Commit 3607fde4 authored by Rafael Monnerat's avatar Rafael Monnerat

monitor: Include skeleton of distributor software type

parent 48526c68
[buildout]
extends = {{ instance_base_monitor }}
\ No newline at end of file
......@@ -22,11 +22,11 @@ parts =
symlink-re6st-logs
symlink-collected-logs
extends = ${monitor-template:output}
extends = {{ monitor_template_output }}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[cron-network-bench]
......@@ -34,26 +34,26 @@ offline = true
recipe = slapos.cookbook:cron.d
name = network-bench-test
frequency = */10 * * * *
command = ${buildout:bin-directory}/networkbench $${network-bench-configuration:rendered} $${monitor-directory:monitor-log}
command = {{ buildout }}/networkbench ${network-bench-configuration:rendered} ${monitor-directory:monitor-log}
[symlink-re6st-logs]
recipe = cns.recipe.symlink
symlink = /var/log/re6stnet = $${monitor-directory:system-log}/re6stnet
symlink = /var/log/re6stnet = ${monitor-directory:system-log}/re6stnet
autocreate = true
[symlink-collected-logs]
recipe = cns.recipe.symlink
symlink = /srv/slapgrid/var/data-log = $${monitor-directory:server-log}/data-log
symlink = /srv/slapgrid/var/data-log = ${monitor-directory:server-log}/data-log
autocreate = true
[network-bench-configuration]
recipe = slapos.recipe.template:jinja2
template = ${network-bench-cfg:output}
rendered = $${monitor-directory:etc}/network_bench.cfg
template = {{ network_benck_cfg_output }}
rendered = ${monitor-directory:etc}/network_bench.cfg
mode = 0744
context =
key slapparameter_dict slap-parameters:configuration
[pwgen]
recipe = slapos.cookbook:generate.password
......@@ -66,24 +66,25 @@ user = admin
bytes = 16
[monitor-directory]
server-log = $${:private-directory}/server-log
monitor-log = $${:private-directory}/monitor-log
cache = $${:var}/cache
mod-ssl = $${:cache}/httpd_mod_ssl
system-log = $${:private-directory}/system-log
server-log = ${:private-directory}/server-log
monitor-log = ${:private-directory}/monitor-log
cache = ${:var}/cache
mod-ssl = ${:cache}/httpd_mod_ssl
system-log = ${:private-directory}/system-log
[slap-parameter]
private-hash = $${pwgen:passwd}$${pwgen32:passwd}
private-hash = ${pwgen:passwd}${pwgen32:passwd}
frontend-domain =
[monitor-frontend]
recipe = slapos.cookbook:requestoptional
name = Monitor Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
software-url = product.frontend
software-type = custom-personal
slave = true
config-url = $${monitor-parameters:url}
config-domain = $${slap-parameter:frontend-domain}
config-url = ${monitor-parameters:url}
config-domain = ${slap-parameter:frontend-domain}
return = site_url domain
server-url = $${slap-connection:server-url}
......
......@@ -7,17 +7,32 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = $${instance-base-runner:rendered}
default = $${instance-base-monitor:rendered}
distributor = $${instance-base-distributor:rendered}
[instance-base-runner]
[instance-base-monitor]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor:output}
template = ${template-monitor:destination}
rendered = $${buildout:directory}/template-monitor.cfg
extensions = jinja2.ext.do
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
key monitor_template_output slap-configuration:monitor_template_output
key network_benck_cfg_output slap-configuration:network_benck_cfg_output
mode = 0644
[instance-base-distributor]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor-distributor:destination}
rendered = $${buildout:directory}/template-monitor-distributor.cfg
extensions = jinja2.ext.do
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
key instance_base_monitor instance-base-monitor:rendered
mode = 0644
[slap-configuration]
......@@ -26,4 +41,6 @@ computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
\ No newline at end of file
cert = $${slap-connection:cert-file}
monitor_template_output = ${monitor-template:output}
network_benck_cfg_output = ${network-bench-cfg:output}
\ No newline at end of file
......@@ -11,6 +11,7 @@ parts =
slapos-toolbox
template
network-bench-cfg
template-monitor-distributor
template-monitor
eggs
fluentd
......@@ -19,14 +20,21 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = daf1125d0d67b6b140a4b6de8c8e35f3
md5sum = 4402626ed57cc9e27eb4282839fbfb99
mode = 0644
[template-monitor]
recipe = slapos.recipe.template
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2
output = ${buildout:directory}/template-monitor.cfg
md5sum = bf6bb18ed86fcb450e5e23d7815a208f
destination = ${buildout:directory}/template-monitor.cfg
md5sum = c11064c5b529b9dfeec6549f04dfd078
mode = 0644
[template-monitor-distributor]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor-distributor.cfg.jinja2
destination = ${buildout:directory}/template-monitor-distributor.cfg
md5sum = a58e9c20ab71d7353d4dae6daaccbd31
mode = 0644
# stupify index for now
......@@ -45,7 +53,6 @@ md5sum = cfcbf2002b8eff5153e2bf68ed24b720
output = ${buildout:directory}/template-network-bench-cfg.in
mode = 0644
[slapos-toolbox]
recipe = zc.recipe.egg
eggs =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment