Commit 185ee671 authored by Hardik Juneja's avatar Hardik Juneja

stack/erp5: Generate same passwords as root monitor for all the sub monitors

parent 0990dcaf
...@@ -19,19 +19,19 @@ md5sum = 1e89de954d816b93f76d9b75820d192c ...@@ -19,19 +19,19 @@ md5sum = 1e89de954d816b93f76d9b75820d192c
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = e8c5a6669c0d3b6f05065146a7fc40f0 md5sum = 18ff195d951cc58de84aaad58b782db3
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
md5sum = 579bfcc29802bbead021a1a79ed569b1 md5sum = fd3e94d804d35ce7b6a4ee1cc0f01021
[template-cloudooo] [template-cloudooo]
filename = instance-cloudoo.cfg.in filename = instance-cloudoo.cfg.in
md5sum = b9197d7fa0cd5ce0656032b55d3b185b md5sum = 099f49bff1e9cb1a1634389eaf9f6d23
[template-zope-conf] [template-zope-conf]
filename = zope.conf.in filename = zope.conf.in
md5sum = 77ab4f229a92e02603028a0bd3772edd md5sum = 107a19282f766cc6916bef43a1108918
[site-zcml] [site-zcml]
filename = site.zcml filename = site.zcml
...@@ -71,7 +71,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0 ...@@ -71,7 +71,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = feec15d1841d55d05f481eed24ac5065 md5sum = 8ab417cf1ca98d2840c80a266f0e2be7
[monitor-template-dummy] [monitor-template-dummy]
filename = dummy.cfg filename = dummy.cfg
...@@ -79,19 +79,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e ...@@ -79,19 +79,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 0500790264ced3260c44ca019878872b md5sum = 711aad7965b1cecbc48b9be17655b6e6
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = dba1a42bfcc8a9a2cc4e8ac503200e63 md5sum = 1783162199af98a6a080da8d5fd45ad0
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = b7e92234825f9d72ccb9b6c4745b6ce7 md5sum = 107a19282f766cc6916bef43a1108918
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = d71c49f91b3455e6866f4b2db591009f md5sum = dbf08b36e215dc545babded2dda8ca25
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -211,6 +211,7 @@ crl = ${:ca-dir}/crl ...@@ -211,6 +211,7 @@ crl = ${:ca-dir}/crl
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = Balancer monitor monitor-title = Balancer monitor
password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout] [buildout]
extends = extends =
...@@ -219,4 +220,8 @@ extends = ...@@ -219,4 +220,8 @@ extends =
parts += parts +=
publish publish
logrotate-apache logrotate-apache
monitor-base
{{ part_list | join('\n ') }} {{ part_list | join('\n ') }}
[publish-connection-information]
<= monitor-publish
...@@ -111,6 +111,7 @@ framebuffer = ${:srv}/framebuffer ...@@ -111,6 +111,7 @@ framebuffer = ${:srv}/framebuffer
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 2 }} monitor-httpd-port = {{ tcpv4_port + 2 }}
monitor-title = Cloudooo monitor monitor-title = Cloudooo monitor
password = {{ slapparameter_dict['monitor-passwd'] }}
[binary-link] [binary-link]
recipe = slapos.cookbook:symbolic.link recipe = slapos.cookbook:symbolic.link
......
...@@ -34,10 +34,10 @@ config-{{ k }} = {{ '${' ~ v ~ '}' }} ...@@ -34,10 +34,10 @@ config-{{ k }} = {{ '${' ~ v ~ '}' }}
{% endfor -%} {% endfor -%}
{% endmacro -%} {% endmacro -%}
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}) }} {{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000, 'monitor-passwd': ${monitor-passwd:passwd}}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}) }} {{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64, 'monitor-passwd': ${monitor-passwd:passwd}}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}) }} {{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020, 'monitor-passwd': ${monitor-passwd:passwd}}) }}
{{ 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, 'monitor-passwd': ${monitor-passwd:passwd}}) }}
{% if has_posftix -%} {% 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'}) }} {{ request('smtp', 'postfix', 'smtp', {'tcpv4-port': 2025, 'smtpd-sasl-user': 'erp5@nowhere'}, key_config={'smtpd-sasl-password': 'publish-early:smtpd-sasl-password'}) }}
{%- else %} {%- else %}
...@@ -74,7 +74,7 @@ connection-url = smtp://127.0.0.2:0/ ...@@ -74,7 +74,7 @@ connection-url = smtp://127.0.0.2:0/
{% else -%} {% else -%}
{{ assert(server_type == 'zeo', server_type) -}} {{ assert(server_type == 'zeo', server_type) -}}
{# BBB: for compatibility, keep 'zodb' as partition_reference for ZEO -#} {# 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'))) }} {{ request('zodb', 'zodb-' ~ server_type, 'zodb-' ~ server_type, {'tcpv4-port': 2100, 'zodb-dict': server_dict, 'monitor-passwd': ${monitor-passwd:passwd}}, dict.fromkeys(('storage-dict', 'tidstorage-ip', 'tidstorage-port'))) }}
{% endif -%} {% endif -%}
{% endfor -%} {% endfor -%}
...@@ -141,6 +141,7 @@ config-inituser-login = {{ dumps(inituser_login) }} ...@@ -141,6 +141,7 @@ config-inituser-login = {{ dumps(inituser_login) }}
config-inituser-password = ${publish-early:inituser-password} config-inituser-password = ${publish-early:inituser-password}
config-kumofs-url = ${request-memcached-persistent:connection-url} config-kumofs-url = ${request-memcached-persistent:connection-url}
config-memcached-url = ${request-memcached-volatile:connection-url} config-memcached-url = ${request-memcached-volatile:connection-url}
config-monitor-passwd = ${monitor-passwd:passwd}
config-mysql-test-url-list = ${request-mariadb:connection-test-database-list} config-mysql-test-url-list = ${request-mariadb:connection-test-database-list}
config-mysql-url-list = ${request-mariadb:connection-database-list} config-mysql-url-list = ${request-mariadb:connection-database-list}
config-site-id = {{ dumps(site_id) }} config-site-id = {{ dumps(site_id) }}
...@@ -248,6 +249,7 @@ config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list} ...@@ -248,6 +249,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-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-backend-path = {{ dumps(balancer_dict.get('apache-backend-path', '/') % {'site-id': site_id}) }}
config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }} config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }}
config-monitor-passwd = ${monitor-passwd:passwd}
[request-frontend-base] [request-frontend-base]
{% if has_frontend -%} {% if has_frontend -%}
...@@ -293,13 +295,11 @@ extends = {{ monitor_template }} ...@@ -293,13 +295,11 @@ extends = {{ monitor_template }}
parts += parts +=
monitor-base monitor-base
[monitor-parameters]
port = 9686
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-port = 8386 monitor-httpd-port = 8386
[publish-connection-information] [monitor-passwd]
<= monitor-publish recipe = slapos.cookbook:generate.password
bytes = 8
{{ root_common.common_section() }} {{ root_common.common_section() }}
...@@ -112,3 +112,4 @@ port = ${kumofs-instance:manager-port} ...@@ -112,3 +112,4 @@ port = ${kumofs-instance:manager-port}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 4 }} monitor-httpd-port = {{ tcpv4_port + 4 }}
monitor-title = Kumofs monitor monitor-title = Kumofs monitor
password = {{ slapparameter_dict['monitor-passwd'] }}
...@@ -266,10 +266,12 @@ command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" ...@@ -266,10 +266,12 @@ 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
{% set monitor_passwd = slapparameter_dict['monitor-passwd'] -%}
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ port + 1 }} monitor-httpd-port = {{ port + 1 }}
monitor-title = Mariadb monitor monitor-title = Mariadb monitor
password = {{monitor_passwd}}
[buildout] [buildout]
extends = extends =
......
...@@ -185,6 +185,7 @@ tidstorage = {{ tidstorage_repozo_path }} ...@@ -185,6 +185,7 @@ tidstorage = {{ tidstorage_repozo_path }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = ZODB monitor monitor-title = ZODB monitor
password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout] [buildout]
extends = extends =
......
...@@ -394,6 +394,7 @@ bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }} ...@@ -394,6 +394,7 @@ bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }}
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = Zope monitor monitor-title = Zope monitor
password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout] [buildout]
extends = extends =
......
...@@ -72,7 +72,6 @@ extra-context = ...@@ -72,7 +72,6 @@ extra-context =
[dynamic-template-erp5-parameters] [dynamic-template-erp5-parameters]
jupyter-enable-default = {{ jupyter_enable_default }} jupyter-enable-default = {{ jupyter_enable_default }}
local-bt5-repository = {{ local_bt5_repository }} local-bt5-repository = {{ local_bt5_repository }}
template-monitor = {{ dumps(template_monitor) }}
[dynamic-template-erp5] [dynamic-template-erp5]
<= jinja2-template-base <= jinja2-template-base
...@@ -81,7 +80,6 @@ filename = instance-erp5.cfg ...@@ -81,7 +80,6 @@ filename = instance-erp5.cfg
extra-context = extra-context =
key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default
key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository
key monitor_template dynamic-template-erp5-parameters:template-monitor
key openssl_location :openssl-location key openssl_location :openssl-location
import urlparse urlparse import urlparse urlparse
import-list = import-list =
......
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