Commit 460909b7 authored by Hardik Juneja's avatar Hardik Juneja

abc

parent 17fd0fbf
......@@ -15,11 +15,11 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = 713db528880282d568278f09458d2aab
md5sum = 73c7bd7dec7f874e8423d0ff4eba9427
[template-runner]
filename = instance-runner.cfg
md5sum = 8f49df215a1596efcec94e2cca009711
md5sum = c531ca046e137459d6cccb261eb7e540
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......
......@@ -41,7 +41,7 @@ parts =
## Usability part
template-slapuser-script
extends = ${monitor2-template:rendered}
extends = {{template_monitor}}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......
......@@ -30,6 +30,7 @@ context = key buildout buildout:bin-directory
raw curl_executable_location ${curl:location}/bin/curl
raw dash_executable_location ${dash:location}/bin/dash
raw dcron_executable_location ${dcron:location}/sbin/crond
raw template_monitor ${instance-monitor:rendered}
mode = 0644
[instance-resilient]
......@@ -78,6 +79,13 @@ context =
raw pbsready_import_template_path ${pbsready-import:output}
raw software_release_information_template ${template-resilient-software-release-information:destination}/${template-resilient-software-release-information:filename}
[instance-monitor]
recipe = slapos.recipe.template:jinja2
template = $monitor2-template:output
rendered = ${buildout:directory}/template-monitor.cfg
extensions = jinja2.ext.do
mode = 0644
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
......
......@@ -296,7 +296,7 @@ context =
key template_kumofs template-kumofs:target
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_monitor monitor2-template:rendered
key template_monitor monitor2-template:output
key template_my_cnf template-my-cnf:target
key template_postfix template-postfix:target
key template_postfix_aliases template-postfix-aliases:target
......
......@@ -23,15 +23,15 @@ md5sum = dc974bd74cf967ae6250d81322629c44
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 1894a05674a7f670692bb2e12ff44d9c
md5sum = 7a51373f53ce075c58a7793abb9d1db5
[template-kumofs]
filename = instance-kumofs.cfg.in
md5sum = 5ac90bdfd30156822b9702a8b73a4d8e
md5sum = a6dcb93c8d2e34ecde07a3f79280ca51
[template-cloudooo]
filename = instance-cloudoo.cfg.in
md5sum = 53a669a7fd42c14596ad7d3a79dfe760
md5sum = d19c02f05b71fe23db248b5cbaf0d4ce
[template-zope-conf]
filename = zope.conf.in
......@@ -75,7 +75,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template]
filename = instance.cfg.in
md5sum = 09862389b2bf3da3f9387a6424329da9
md5sum = 1df9a589da262c3de6df1a73d5bb0a37
[monitor-template-dummy]
filename = dummy.cfg
......@@ -83,19 +83,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = b8cb62bbbcbd7d85258aa63b14be9a20
md5sum = 3f5eac64afbeba450e64888cbfed29ee
[template-zeo]
filename = instance-zeo.cfg.in
md5sum = d04d0f67e399543004f5f363ff448052
md5sum = 165ba64a6db5219e24d781e5019401b9
[template-zope]
filename = instance-zope.cfg.in
md5sum = f08e4750f66a3aa27c9379ae278bdd8c
md5sum = 8a507ce5f4cddfa0baf3b7561dc14539
[template-balancer]
filename = instance-balancer.cfg.in
md5sum = 865efaf767a747d263edad9108a76191
md5sum = a3ad32c46bb56076895441edbd66018d
[template-haproxy-cfg]
filename = haproxy.cfg.in
......
......@@ -230,9 +230,6 @@ 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}
......
......@@ -113,9 +113,6 @@ 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]
......
......@@ -39,10 +39,10 @@ config-{{ k }} = {{ '${' ~ v ~ '}' }}
{% endfor -%}
{% endmacro -%}
{{ 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'}) }}
{{ 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'}) }}
{% 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 %}
......@@ -79,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, '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'}) }}
{{ 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'}) }}
{% endif -%}
{% endfor -%}
......@@ -147,7 +147,6 @@ 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}
......@@ -260,7 +259,6 @@ 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}
......@@ -318,9 +316,6 @@ 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() -%}
......
......@@ -114,7 +114,4 @@ 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'] }}
......@@ -303,9 +303,6 @@ 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]
......
......@@ -187,9 +187,6 @@ 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]
......
......@@ -396,9 +396,6 @@ 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]
......
......@@ -41,7 +41,7 @@ fonts = {{ fonts_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
6tunnel = {{ sixtunnel_location }}
dash = {{ dash_location }}
template-monitor = {{ dumps(template_monitor) }}
template-monitor = ${instance-monitor:rendered}
[dynamic-template-cloudooo]
<= jinja2-template-base
......@@ -72,7 +72,7 @@ extra-context =
[dynamic-template-erp5-parameters]
jupyter-enable-default = {{ jupyter_enable_default }}
local-bt5-repository = {{ local_bt5_repository }}
template-monitor = {{ dumps(template_monitor) }}
template-monitor = ${instance-monitor:rendered}
[dynamic-template-erp5]
<= jinja2-template-base
......@@ -100,7 +100,7 @@ run-apachedex-location = {{ bin_directory }}/runApacheDex
dash = {{ dash_location }}
template-haproxy-cfg = {{ template_haproxy_cfg }}
template-apache-conf = {{ template_apache_conf }}
template-monitor = {{ dumps(template_monitor) }}
template-monitor = ${instance-monitor:rendered}
[dynamic-template-balancer]
<= jinja2-template-base
......@@ -112,7 +112,7 @@ extra-context =
[dynamic-template-zeo-parameters]
buildout-bin-directory = {{ buildout_bin_directory }}
template-monitor = {{ dumps(template_monitor) }}
template-monitor = ${instance-monitor:rendered}
[dynamic-template-zeo]
<= jinja2-template-base
......@@ -135,7 +135,7 @@ jsl = {{ jsl_location }}
link-binary = {{ dumps(zope_link_binary) }}
userhosts = {{ userhosts_location }}
site-zcml = {{ site_zcml }}
template-monitor = {{ dumps(template_monitor) }}
template-monitor = ${instance-monitor:rendered}
extra-path-list = {{ dumps(extra_path_list) }}
matplotlibrc = {{ matplotlibrc_location }}
......@@ -156,7 +156,7 @@ dcron-location = {{ dcron_location }}
gzip-location = {{ gzip_location }}
kumo-location = {{ kumo_location }}
logrotate-location = {{ logrotate_location }}
template-monitor = {{ dumps(template_monitor) }}
template-monitor = ${instance-monitor:rendered}
[dynamic-template-kumofs]
<= jinja2-template-base
......@@ -178,7 +178,7 @@ bin-directory = {{ bin_directory }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
mariadb-slow-query-report-script = {{ mariadb_slow_query_report_script }}
percona-tools-location = {{ percona_toolkit_location }}
template-monitor = {{ template_monitor }}
template-monitor = ${instance-monitor:rendered}
[dynamic-template-mariadb]
<= jinja2-template-base
......@@ -205,6 +205,14 @@ extra-context =
[dynamic-template-jupyter]
rendered = {{ template_jupyter_cfg }}
[instance-monitor]
recipe = slapos.recipe.template:jinja2
template = {{ dumps(template_monitor) }}
rendered = ${buildout:directory}/template-monitor.cfg
extensions = jinja2.ext.do
context = key buildout buildout:bin-directory
mode = 0644
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }}
......
......@@ -96,10 +96,16 @@ rendered = ${monitor2-template:rendered}
output = ${monitor2-template:rendered}
[monitor2-template]
recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
filename = instance-monitor.cfg
mode = 0644
output = ${buildout:directory}/template-monitor.cfg
[remove-section]
#recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg
context =
key apache_location apache:location
key gzip_location gzip:location
......
......@@ -14,5 +14,5 @@
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[monitor2-template]
filename = instance-monitor.cfg.jinja2.in
md5sum = 054cedcee5e3b82dca992c9ff45b85cd
filename = instance-monitor.cfg
md5sum = 3d2093fa58da21266d011a752bc2e91f
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