Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
slapos
Commits
982cd491
Commit
982cd491
authored
Jun 03, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5: add monitoring instance & http log access
Conflicts: stack/erp5/buildout.cfg
parent
a4de5b81
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
140 additions
and
4 deletions
+140
-4
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+16
-2
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+1
-0
stack/erp5/instance-http-monitor.cfg.in
stack/erp5/instance-http-monitor.cfg.in
+50
-0
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+30
-1
stack/erp5/instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+29
-1
stack/erp5/instance.cfg.in
stack/erp5/instance.cfg.in
+14
-0
No files found.
stack/erp5/buildout.cfg
View file @
982cd491
...
@@ -58,6 +58,8 @@ extends =
...
@@ -58,6 +58,8 @@ extends =
../../component/findutils/buildout.cfg
../../component/findutils/buildout.cfg
../../component/userhosts/buildout.cfg
../../component/userhosts/buildout.cfg
logrotate-base.cfg
logrotate-base.cfg
../../stack/monitor/buildout.cfg
../../component/pycurl/buildout.cfg
parts =
parts =
erp5-util-develop
erp5-util-develop
...
@@ -163,6 +165,11 @@ url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-imp
...
@@ -163,6 +165,11 @@ url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-imp
md5sum = b32d9ee1cb85f85d8d2f2b58f58459f1
md5sum = b32d9ee1cb85f85d8d2f2b58f58459f1
mode = 755
mode = 755
[template-http-monitor]
< = download-base
filename = instance-http-monitor.cfg.in
#md5sum =
[template-mariadb]
[template-mariadb]
< = download-base
< = download-base
filename = instance-mariadb.cfg.in
filename = instance-mariadb.cfg.in
...
@@ -278,10 +285,12 @@ extra-context =
...
@@ -278,10 +285,12 @@ extra-context =
key template_create_erp5_site_real template-create-erp5-site-real:target
key template_create_erp5_site_real template-create-erp5-site-real:target
key template_erp5 template-erp5:target
key template_erp5 template-erp5:target
key template_haproxy_cfg template-haproxy-cfg:target
key template_haproxy_cfg template-haproxy-cfg:target
key template_http_monitor template-http-monitor:target
key template_kumofs template-kumofs:target
key template_kumofs template-kumofs:target
key template_logrotate_base template-logrotate-base:rendered
key template_logrotate_base template-logrotate-base:rendered
key template_mariadb template-mariadb:target
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_monitor monitor-template:output
key template_my_cnf template-my-cnf:target
key template_my_cnf template-my-cnf:target
key template_runzope_userhosts_preloaded template-runzope-userhosts-preloaded:target
key template_runzope_userhosts_preloaded template-runzope-userhosts-preloaded:target
key template_zeo template-zeo:target
key template_zeo template-zeo:target
...
@@ -531,6 +540,11 @@ eggs =
...
@@ -531,6 +540,11 @@ eggs =
# Needed for parsing .po files from our Localizer subset
# Needed for parsing .po files from our Localizer subset
polib
polib
# Needed for monitoring tool
cns.recipe.symlink
collective.recipe.template
${pycurl:egg}
# parameterizing the version of the generated python interpreter name by the
# parameterizing the version of the generated python interpreter name by the
# python section version causes dependency between this egg section and the
# python section version causes dependency between this egg section and the
# installation of python, which we don't want on an instance
# installation of python, which we don't want on an instance
...
@@ -583,10 +597,10 @@ branch = erp5-cluster
...
@@ -583,10 +597,10 @@ branch = erp5-cluster
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs =
eggs =
${lxml-python:egg}
${lxml-python:egg}
slapos.toolbox
slapos.toolbox[check_web_page_http_cache_hit,zodbpack]
slapos.toolbox[zodbpack]
scripts =
scripts =
check-web-page-http-cache-hit
is-local-tcp-port-opened
is-local-tcp-port-opened
onetimedownload
onetimedownload
slapos-kill
slapos-kill
...
...
stack/erp5/instance-erp5.cfg.in
View file @
982cd491
...
@@ -49,6 +49,7 @@ config-{{ k }} = {{ dumps(v) }}
...
@@ -49,6 +49,7 @@ config-{{ k }} = {{ dumps(v) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}) }}
{{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099}, {'database-list': True, 'test-database-list': True}) }}
{{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099}, {'database-list': True, 'test-database-list': True}) }}
{{ request('http-monitor', 'http-monitor', 'http-monitor', {}, {'monitor-url': True}) }}
{# ZODB -#}
{# ZODB -#}
{% set zodb_dict = {} -%}
{% set zodb_dict = {} -%}
...
...
stack/erp5/instance-http-monitor.cfg.in
0 → 100644
View file @
982cd491
{% if software_type == slap_software_type -%}
[buildout]
parts =
certificate-authority
cron-entry-monitor
cron-entry-rss
cron
deploy-index
deploy-settings-cgi
deploy-status-cgi
deploy-status-history-cgi
setup-static-files
certificate-authority
zero-parameters
public-symlink
cgi-httpd-wrapper
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
monitor-check-web-page-http-cache-hit
publish-http-monitor
extends = {{ parameter_dict["template-monitor"] }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
[monitor-check-web-page-http-cache-hit]
recipe = slapos.cookbook:wrapper
command-line = "{{ parameter_dict['bin-directory'] }}/check-web-page-http-cache-hit" -K "${public:filename}"
wrapper-path = ${monitor-directory:monitor-custom-scripts}/check-web-page-http-cache-hit
[public]
recipe = slapos.cookbook:zero-knowledge.write
filename = knowledge0.cfg
status-history-length = 5
# Each one of the following 2 list keys should be defined in only one line
# ex: resolve-list = www.example.com:80:127.0.0.1 www.perdu.com:80:10.0.0.1
url-list =
resolve-list =
[zero-parameters]
recipe = slapos.cookbook:zero-knowledge.read
filename = ${public:filename}
[publish-http-monitor]
recipe = slapos.cookbook:publish.serialised
monitor-url = ${monitor-parameters:url}
{% endif %}
stack/erp5/instance-mariadb.cfg.in
View file @
982cd491
...
@@ -32,6 +32,7 @@ recipe = slapos.cookbook:publish.serialised
...
@@ -32,6 +32,7 @@ recipe = slapos.cookbook:publish.serialised
{% endmacro -%}
{% endmacro -%}
database-list = {{ render_database_list(database_list) }}
database-list = {{ render_database_list(database_list) }}
test-database-list = {{ render_database_list(test_database_list) }}
test-database-list = {{ render_database_list(test_database_list) }}
monitor-url = ${publish-connection-informations:monitor_url}
[simplefile]
[simplefile]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
...
@@ -232,8 +233,21 @@ command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened"
...
@@ -232,8 +233,21 @@ command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened"
wrapper-path = ${directory:promise}/mariadb
wrapper-path = ${directory:promise}/mariadb
parameters-extra = true
parameters-extra = true
[{{ section('monitor-current-log-access') }}]
< = monitor-directory-access
source = ${directory:log}
[{{ section('monitor-backup-log-access') }}]
< = monitor-directory-access
source = ${logrotate-entry-mariadb:backup}
[monitor-parameters]
port = 3380
[buildout]
[buildout]
extends = {{ logrotate_cfg }}
extends =
{{ logrotate_cfg }}
{{ parameter_dict['template-monitor'] }}
parts +=
parts +=
publish-mariadb-url
publish-mariadb-url
logrotate-entry-mariadb
logrotate-entry-mariadb
...
@@ -243,4 +257,19 @@ parts +=
...
@@ -243,4 +257,19 @@ parts +=
resiliency-exclude-file
resiliency-exclude-file
resiliency-after-import-script
resiliency-after-import-script
promise
promise
# Access to mariadb logs
certificate-authority
cron-entry-monitor
cron-entry-rss
deploy-index
setup-static-files
certificate-authority
public-symlink
cgi-httpd-wrapper
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
# Complete parts with sections
{{ part_list | join('\n ') }}
{{ part_list | join('\n ') }}
stack/erp5/instance-zope.cfg.in
View file @
982cd491
...
@@ -77,6 +77,7 @@ ca-private = ${:ca-dir}/private
...
@@ -77,6 +77,7 @@ ca-private = ${:ca-dir}/private
ca-certs = ${:ca-dir}/certs
ca-certs = ${:ca-dir}/certs
ca-newcerts = ${:ca-dir}/newcerts
ca-newcerts = ${:ca-dir}/newcerts
ca-crl = ${:ca-dir}/crl
ca-crl = ${:ca-dir}/crl
logrotate-backup = ${:var}/logrotate
[binary-link]
[binary-link]
recipe = slapos.cookbook:symbolic.link
recipe = slapos.cookbook:symbolic.link
...
@@ -97,6 +98,17 @@ recipe = slapos.cookbook:certificate_authority
...
@@ -97,6 +98,17 @@ recipe = slapos.cookbook:certificate_authority
openssl-binary = ${binary-link:target-directory}/openssl
openssl-binary = ${binary-link:target-directory}/openssl
wrapper = ${directory:services}/ca
wrapper = ${directory:services}/ca
[{{ section('monitor-current-log-access') }}]
< = monitor-directory-access
source = ${directory:log}
[{{ section('monitor-backup-log-access') }}]
< = monitor-directory-access
source = ${directory:logrotate-backup}
[monitor-parameters]
port = {{ slapparameter_dict['port-base'] + 5000 }}
{% if use_ipv6 -%}
{% if use_ipv6 -%}
{% set ipv6 = (ipv6_set | list)[0] -%}
{% set ipv6 = (ipv6_set | list)[0] -%}
...
@@ -326,6 +338,7 @@ dict toward erp5 partition, violating the DRY principle and making the intent
...
@@ -326,6 +338,7 @@ dict toward erp5 partition, violating the DRY principle and making the intent
hard to guess.
hard to guess.
-#}
-#}
hosts-dict = {{ dumps(hosts_dict) }}
hosts-dict = {{ dumps(hosts_dict) }}
monitor-url = ${monitor-parameters:url}
[erp5-promise]
[erp5-promise]
recipe = slapos.cookbook:erp5.promise
recipe = slapos.cookbook:erp5.promise
...
@@ -338,9 +351,24 @@ bt5 = {{ dumps(slapparameter_dict['bt5']) }}
...
@@ -338,9 +351,24 @@ bt5 = {{ dumps(slapparameter_dict['bt5']) }}
bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }}
bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }}
[buildout]
[buildout]
extends = {{ logrotate_cfg }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
extends =
{{ logrotate_cfg }}
{{ parameter_dict['template-monitor'] }}
parts +=
parts +=
erp5-promise
erp5-promise
certificate-authority
cron-entry-monitor
cron-entry-rss
deploy-index
setup-static-files
certificate-authority
public-symlink
cgi-httpd-wrapper
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
{{ part_list | join('\n ') }}
{{ part_list | join('\n ') }}
publish-zope
publish-zope
versions = versions
versions = versions
...
...
stack/erp5/instance.cfg.in
View file @
982cd491
...
@@ -116,6 +116,7 @@ jsl = {{ jsl_location }}
...
@@ -116,6 +116,7 @@ jsl = {{ jsl_location }}
link-binary = {{ dumps(zope_link_binary) }}
link-binary = {{ dumps(zope_link_binary) }}
userhosts = {{ userhosts_location }}
userhosts = {{ userhosts_location }}
runzope-userhosts-preloaded-template = {{ template_runzope_userhosts_preloaded }}
runzope-userhosts-preloaded-template = {{ template_runzope_userhosts_preloaded }}
template-monitor = {{ template_monitor }}
[dynamic-template-zope]
[dynamic-template-zope]
< = jinja2-template-base
< = jinja2-template-base
...
@@ -152,6 +153,7 @@ template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
...
@@ -152,6 +153,7 @@ template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
link-binary = {{ dumps(mariadb_link_binary) }}
bin-directory = {{ bin_directory }}
bin-directory = {{ bin_directory }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
template-monitor = {{ template_monitor }}
[dynamic-template-mariadb]
[dynamic-template-mariadb]
< = jinja2-template-base
< = jinja2-template-base
...
@@ -174,6 +176,18 @@ filename = instance-create-erp5-site.cfg
...
@@ -174,6 +176,18 @@ filename = instance-create-erp5-site.cfg
extra-context =
extra-context =
section parameter_dict dynamic-template-create-erp5-site-parameters
section parameter_dict dynamic-template-create-erp5-site-parameters
[dynamic-template-http-monitor-parameters]
template-monitor = {{ template_monitor }}
bin-directory = {{ bin_directory }}
[dynamic-template-http-monitor]
< = jinja2-template-base
template = {{ template_http_monitor }}
filename = instance-http-monitor.cfg
extra-context =
section parameter_dict dynamic-template-http-monitor-parameters
raw software_type http-monitor
[switch-softwaretype]
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }}
override = {{ dumps(override_switch_softwaretype |default) }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment