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
Hardik Juneja
slapos
Commits
17fd0fbf
Commit
17fd0fbf
authored
Jun 22, 2017
by
Hardik Juneja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack: Make monitor apache optional using a slap parameter
parent
f89c42fb
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
57 additions
and
21 deletions
+57
-21
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+7
-7
stack/erp5/instance-balancer.cfg.in
stack/erp5/instance-balancer.cfg.in
+3
-0
stack/erp5/instance-cloudoo.cfg.in
stack/erp5/instance-cloudoo.cfg.in
+4
-0
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+11
-5
stack/erp5/instance-kumofs.cfg.in
stack/erp5/instance-kumofs.cfg.in
+4
-0
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+4
-0
stack/erp5/instance-zeo.cfg.in
stack/erp5/instance-zeo.cfg.in
+4
-0
stack/erp5/instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+4
-0
stack/monitor/buildout.hash.cfg
stack/monitor/buildout.hash.cfg
+1
-1
stack/monitor/instance-monitor.cfg.jinja2.in
stack/monitor/instance-monitor.cfg.jinja2.in
+15
-8
No files found.
stack/erp5/buildout.hash.cfg
View file @
17fd0fbf
...
...
@@ -23,15 +23,15 @@ md5sum = dc974bd74cf967ae6250d81322629c44
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum =
3b6c19686ac52c2d452597dbacc88888
md5sum =
1894a05674a7f670692bb2e12ff44d9c
[template-kumofs]
filename = instance-kumofs.cfg.in
md5sum =
253027f37c4e5bd908e6af551848f03a
md5sum =
5ac90bdfd30156822b9702a8b73a4d8e
[template-cloudooo]
filename = instance-cloudoo.cfg.in
md5sum =
43253cbfd5d361047ba6a99b116b237
0
md5sum =
53a669a7fd42c14596ad7d3a79dfe76
0
[template-zope-conf]
filename = zope.conf.in
...
...
@@ -83,19 +83,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum =
929b87c01aaf6ea1bbf6ff906ce9c0d9
md5sum =
b8cb62bbbcbd7d85258aa63b14be9a20
[template-zeo]
filename = instance-zeo.cfg.in
md5sum =
2248d249cfc53c73e7c65665d4d53be0
md5sum =
d04d0f67e399543004f5f363ff448052
[template-zope]
filename = instance-zope.cfg.in
md5sum =
6a64d1615c3ef9f6311c863d5aa0c58f
md5sum =
f08e4750f66a3aa27c9379ae278bdd8c
[template-balancer]
filename = instance-balancer.cfg.in
md5sum =
a3ad32c46bb56076895441edbd66018d
md5sum =
865efaf767a747d263edad9108a76191
[template-haproxy-cfg]
filename = haproxy.cfg.in
...
...
stack/erp5/instance-balancer.cfg.in
View file @
17fd0fbf
...
...
@@ -230,6 +230,9 @@ monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }}
monitor-title = Balancer monitor
password = {{ slapparameter_dict['monitor-passwd'] }}
{% if slapparameter_dict.get('monitor-disable-apache') -%}
monitor-base-url =
{% endif -%}
instance-configuration =
file apachedex-default ${apachedex-parameters:default}
file apachedex-base-list ${apachedex-parameters:base-list}
...
...
stack/erp5/instance-cloudoo.cfg.in
View file @
17fd0fbf
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
[buildout]
extends =
{{ parameter_dict['template-monitor'] }}
...
...
@@ -112,6 +113,9 @@ framebuffer = ${:srv}/framebuffer
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 2 }}
monitor-title = Cloudooo monitor
{% if slapparameter_dict.get('monitor-disable-apache') -%}
monitor-base-url =
{% endif -%}
password = {{ slapparameter_dict['monitor-passwd'] }}
[binary-link]
...
...
stack/erp5/instance-erp5.cfg.in
View file @
17fd0fbf
...
...
@@ -8,6 +8,7 @@
{% set jupyter_dict = slapparameter_dict.get('jupyter', {}) -%}
{% set has_jupyter = jupyter_dict.get('enable', jupyter_enable_default.lower() in ('true', 'yes')) -%}
{% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
{% set monitor_base_url_dict = {} -%}
[request-common]
<= request-common-base
...
...
@@ -38,10 +39,10 @@ config-{{ k }} = {{ '${' ~ v ~ '}' }}
{% endfor -%}
{% endmacro -%}
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099}, {'database-list': True, 'test-database-list': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000
, 'monitor-disable-apache': monitor_dict.get('disable-apache')
}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64
, 'monitor-disable-apache': monitor_dict.get('disable-apache')
}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020
, 'monitor-disable-apache': monitor_dict.get('disable-apache')
}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099
, 'monitor-disable-apache': monitor_dict.get('disable-apache')
}, {'database-list': True, 'test-database-list': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{% if has_posftix -%}
{{ request('smtp', 'postfix', 'smtp', {'tcpv4-port': 2025, 'smtpd-sasl-user': 'erp5@nowhere'}, key_config={'smtpd-sasl-password': 'publish-early:smtpd-sasl-password'}) }}
{%- else %}
...
...
@@ -78,7 +79,7 @@ connection-url = smtp://127.0.0.2:0/
{% else -%}
{{ assert(server_type == 'zeo', server_type) -}}
{# BBB: for compatibility, keep 'zodb' as partition_reference for ZEO -#}
{{ request('zodb', 'zodb-' ~ server_type, 'zodb-' ~ server_type, {'tcpv4-port': 2100, 'zodb-dict': server_dict}, dict.fromkeys(('storage-dict', 'tidstorage-ip', 'tidstorage-port', 'monitor-base-url')), key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('zodb', 'zodb-' ~ server_type, 'zodb-' ~ server_type, {'tcpv4-port': 2100, 'zodb-dict': server_dict
, 'monitor-disable-apache': monitor_dict.get('disable-apache')
}, dict.fromkeys(('storage-dict', 'tidstorage-ip', 'tidstorage-port', 'monitor-base-url')), key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{% endif -%}
{% endfor -%}
...
...
@@ -146,6 +147,7 @@ config-inituser-login = {{ dumps(inituser_login) }}
config-inituser-password = ${publish-early:inituser-password}
config-kumofs-url = ${request-memcached-persistent:connection-url}
config-memcached-url = ${request-memcached-volatile:connection-url}
config-monitor-disable-apache = monitor_dict.get('disable-apache')
config-monitor-passwd = ${monitor-htpasswd:passwd}
config-mysql-test-url-list = ${request-mariadb:connection-test-database-list}
config-mysql-url-list = ${request-mariadb:connection-database-list}
...
...
@@ -258,6 +260,7 @@ config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list}
config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-check-path', '/') % {'site-id': site_id}) }}
config-backend-path = {{ dumps(balancer_dict.get('apache-backend-path', '/') % {'site-id': site_id}) }}
config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }}
config-monitor-disable-apache = monitor_dict.get('disable-apache')
config-monitor-passwd = ${monitor-htpasswd:passwd}
...
...
@@ -315,6 +318,9 @@ parts +=
[monitor-conf-parameters]
monitor-title = ERP5 monitor
password = ${monitor-htpasswd:passwd}
{% if monitor_dict.get('disable-apache') == True -%}
monitor-base-url =
{% endif -%}
[monitor-base-url-dict]
{% for key, value in monitor_base_url_dict.items() -%}
...
...
stack/erp5/instance-kumofs.cfg.in
View file @
17fd0fbf
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
[buildout]
extends =
{{ logrotate_cfg }}
...
...
@@ -113,4 +114,7 @@ port = ${kumofs-instance:manager-port}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 4 }}
monitor-title = Kumofs monitor
{% if slapparameter_dict.get('monitor-disable-apache') -%}
monitor-base-url =
{% endif -%}
password = {{ slapparameter_dict['monitor-passwd'] }}
stack/erp5/instance-mariadb.cfg.in
View file @
17fd0fbf
...
...
@@ -17,6 +17,7 @@
{% set ip = (ipv4_set | list)[0] -%}
{% endif -%}
{% set dash = parameter_dict['dash-location'] ~ '/bin/dash' %}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
[{{ section('publish') }}]
recipe = slapos.cookbook:publish.serialised
...
...
@@ -302,6 +303,9 @@ parameters-extra = true
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ port + 1 }}
monitor-title = Mariadb monitor
{% if slapparameter_dict.get('monitor-disable-apache') -%}
monitor-base-url =
{% endif -%}
password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout]
...
...
stack/erp5/instance-zeo.cfg.in
View file @
17fd0fbf
...
...
@@ -7,6 +7,7 @@
{% set default_zodb_path = buildout_directory ~ '/srv/zodb' -%}
{% set default_backup_path = buildout_directory ~ '/srv/backup/zodb' -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
[zeo-base]
recipe = slapos.cookbook:zeo
...
...
@@ -186,6 +187,9 @@ tidstorage = {{ tidstorage_repozo_path }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }}
monitor-title = ZODB monitor
{% if monitor_dict.get('disable-apache') == True -%}
monitor-base-url =
{% endif -%}
password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout]
...
...
stack/erp5/instance-zope.cfg.in
View file @
17fd0fbf
...
...
@@ -10,6 +10,7 @@
{% set longrequest_logger_base_path = buildout_directory ~ '/var/log/longrequest_logger_' -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
{#
XXX: This template only supports exactly one IPv4 and one IPv6 per
partition. No more (undefined result), no less (IndexError).
...
...
@@ -395,6 +396,9 @@ bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }}
monitor-title = Zope monitor
{% if monitor_dict.get('disable-apache') == True -%}
monitor-base-url =
{% endif -%}
password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout]
...
...
stack/monitor/buildout.hash.cfg
View file @
17fd0fbf
...
...
@@ -15,4 +15,4 @@
# not need these here).
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
md5sum =
5027f0b1abcc28ce3817cd70fb667a3b
md5sum =
054cedcee5e3b82dca992c9ff45b85cd
stack/monitor/instance-monitor.cfg.jinja2.in
View file @
17fd0fbf
...
...
@@ -289,13 +289,25 @@ monitor-url = ${:monitor-base-url}/public/feeds
monitor-user = ${monitor-instance-parameter:username}
monitor-password = ${monitor-instance-parameter:password}
[install-monitor-apache]
recipe = plone.recipe.command
command = true
update-command =
monitor-base-url = ${monitor-frontend-promise:url}
monitor-base-url-ipv6 = ${monitor-httpd-conf-parameter:url}
depends =
${certificate-authority:wrapper}
${ca-monitor-httpd:wrapper}
${monitor-httpd-promise:filename}
${promise-monitor-httpd-is-process-older-than-dependency-set:wrapper-path}
[monitor-instance-parameter]
monitor-title = ${slap-configuration:instance-title}
monitor-httpd-ipv6 = ${slap-configuration:ipv6-random}
monitor-httpd-port = 8196
# XXX - Set monitor-base-url = ${
monitor-httpd-conf-parameter:
url} => https://[ipv6]:port
monitor-base-url = ${
monitor-frontend-promise:
url}
#monitor-base-url = ${
monitor-httpd-conf-parameter:url
}
# XXX - Set monitor-base-url = ${
install-monitor-apache:monitor-base-
url} => https://[ipv6]:port
monitor-base-url = ${
install-monitor-apache:monitor-base-
url}
#monitor-base-url = ${
install-monitor-apache:monitor-base-url-ipv6
}
root-instance-title = ${slap-configuration:root-instance-title}
monitor-url-list =
cors-domains = monitor.app.officejs.com
...
...
@@ -387,7 +399,6 @@ context =
raw python_bin {{ python_with_eggs }}
config-file = ${directory:etc}/min-free-disk-size
[monitor-base]
# create dependencies between required monitor parts
recipe = plone.recipe.command
...
...
@@ -399,14 +410,10 @@ depends =
${monitor-configurator-cron-entry:name}
${cron-entry-logrotate:name}
${logrotate-entry-cron:name}
${certificate-authority:wrapper}
${monitor-conf:rendered}
${start-monitor:wrapper-path}
${ca-monitor-httpd:wrapper}
${monitor-httpd-promise:filename}
${monitor-bootstrap-promise:file}
${promise-check-slapgrid:output}
${promise-monitor-httpd-is-process-older-than-dependency-set:wrapper-path}
[monitor-publish]
monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
...
...
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