diff --git a/software/neoppod/instance-common.cfg.in b/software/neoppod/instance-common.cfg.in index 8b576a14f5d7171f8b0aa13e68f7c3bb216f492e..2e8207c9d33dc08ce99bda6425a596a0da7d839f 100644 --- a/software/neoppod/instance-common.cfg.in +++ b/software/neoppod/instance-common.cfg.in @@ -22,6 +22,7 @@ context = key ipv6_set slap-configuration:ipv6 key slapparameter_dict slap-configuration:configuration raw logrotate_cfg {{ template_logrotate_base }} + raw template_monitor {{ template_monitor }} raw bin_directory {{ bin_directory }} ${:extra-context} diff --git a/software/neoppod/root-common.cfg.in b/software/neoppod/root-common.cfg.in index 6254f5d2fa13de7af36f9722e5ec3667c7b9abf5..dd64b7610748090b6a65e2889d24c02bc20b73b9 100644 --- a/software/neoppod/root-common.cfg.in +++ b/software/neoppod/root-common.cfg.in @@ -27,6 +27,7 @@ computer-id = ${slap-connection:computer-id} partition-id = ${slap-connection:partition-id} [buildout] +extends = {{ template_monitor }} parts = publish {{ part_list | join('\n\t') }} diff --git a/software/neoppod/software-common.cfg b/software/neoppod/software-common.cfg index 39fe2fef09f2481e1cd3fdbd859b8c9baeeea972..b7945c3f5eb3333d13dd52ef5a357b4018459d4e 100644 --- a/software/neoppod/software-common.cfg +++ b/software/neoppod/software-common.cfg @@ -8,6 +8,7 @@ extends = ../../stack/slapos.cfg ../../stack/logrotate/buildout.cfg + ../../stack/monitor/buildout.cfg ../../component/cython-zstd/buildout.cfg #LXML ../../component/lxml-python/buildout.cfg @@ -93,7 +94,7 @@ mode = 644 recipe = slapos.recipe.template:jinja2 template = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in rendered = ${buildout:directory}/${:_buildout_section_name_}.cfg -md5sum = b867ba222a436807954f732642fb116d +md5sum = c0e22816537b56bceef0b4c2b40f6219 context = key bin_directory buildout:bin-directory key develop_eggs_directory buildout:develop-eggs-directory @@ -102,6 +103,7 @@ context = key neo_master instance-neo-master:target key neo instance-neo:target key template_logrotate_base template-logrotate-base:rendered + key template_monitor monitor2-template:rendered ${:adapter-context} adapter-context = key mariadb_location mariadb:location @@ -109,7 +111,7 @@ adapter-context = [root-common] <= download-base-neo -md5sum = f3259726bd5d824c569dc7db6b7d26a0 +md5sum = 66055aa82f9097c5301864c07e6e5d80 [instance-neo-admin] <= download-base-neo diff --git a/software/slapos-master/buildout.hash.cfg b/software/slapos-master/buildout.hash.cfg index d46efba15ca8a4dc1176e35c449cc10a9d994fa2..1aa48c43ec10d6a9d6465f2f293f9268119b3801 100644 --- a/software/slapos-master/buildout.hash.cfg +++ b/software/slapos-master/buildout.hash.cfg @@ -14,11 +14,11 @@ # not need these here). [template-erp5] filename = instance-erp5.cfg.in -md5sum = c4941a1c862474b71fd7255feb830299 +md5sum = 0c929dcaba31e024d94c63c4aee181d6 [template-balancer] filename = instance-balancer.cfg.in -md5sum = 1a6a00153441d6a8e7ff9d27039e541e +md5sum = b7504fcbd8eaecb91709abbcb5bcabe8 [template-apache-backend-conf] filename = apache-backend.conf.in diff --git a/software/slapos-master/instance-balancer.cfg.in b/software/slapos-master/instance-balancer.cfg.in index 142e6f9a6344875e180796722b4bc9d9ce6f1734..97dedc273c6972c2d894b9a177c7c5b600e2ca93 100644 --- a/software/slapos-master/instance-balancer.cfg.in +++ b/software/slapos-master/instance-balancer.cfg.in @@ -289,7 +289,6 @@ password = {{ slapparameter_dict['monitor-passwd'] }} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts += {{ part_list | join('\n ') }} diff --git a/software/slapos-master/instance-erp5.cfg.in b/software/slapos-master/instance-erp5.cfg.in index 12ef5be5cf9ff276cdf3af520c80d95d7cae6477..b873e571689e8f224ccfcc4a39ffc5fa79c8a76d 100644 --- a/software/slapos-master/instance-erp5.cfg.in +++ b/software/slapos-master/instance-erp5.cfg.in @@ -290,7 +290,7 @@ certs = ${:ca-dir}/certs newcerts = ${:ca-dir}/newcerts crl = ${:ca-dir}/crl -[apache-certificate-authority] +[{{root_common.section('apache-certificate-authority')}}] recipe = slapos.cookbook:certificate_authority openssl-binary = {{ openssl_location }}/bin/openssl ca-dir = ${directory:ca-dir} @@ -308,7 +308,7 @@ company = {{ dumps(slapparameter_dict.get('company', 'Compagny')) }} # XXX - Big hack: Change access for certificate authority configuration # To allow apache to read openssl.cnf in this folder -[fix-ca-folder] +[{{root_common.section('fix-ca-folder')}}] recipe = plone.recipe.command stop-on-error = true command = @@ -457,14 +457,6 @@ monitor-httpd-port = 8386 {{ root_common.common_section() }} -[buildout] -extends = {{ template_monitor }} - -parts += - apache-certificate-authority - fix-ca-folder - monitor-base - [monitor-conf-parameters] monitor-title = ERP5 password = ${monitor-htpasswd:passwd} diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg index 321c2b8929afd0212c55d71149f59777a9b2a1bf..0cfad8c55cf9a05695b03153d1d77394cce0166a 100644 --- a/stack/erp5/buildout.cfg +++ b/stack/erp5/buildout.cfg @@ -61,7 +61,6 @@ extends = ../../component/postfix/buildout.cfg ../../component/zbarlight/buildout.cfg ../../component/perl/buildout.cfg - ../monitor/buildout.cfg ../../stack/caucase/buildout.cfg ../../software/jupyter/software.cfg ../../software/neoppod/software-common.cfg @@ -294,7 +293,6 @@ 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_my_cnf template-my-cnf:target key template_postfix template-postfix:target key template_postfix_aliases template-postfix-aliases:target diff --git a/stack/erp5/buildout.hash.cfg b/stack/erp5/buildout.hash.cfg index e3adc52d0cdc2044210e85894b4ae629b21a2c65..62f27bc20312c952385277e7d86a4c03ff30e1a7 100644 --- a/stack/erp5/buildout.hash.cfg +++ b/stack/erp5/buildout.hash.cfg @@ -26,11 +26,11 @@ md5sum = d95e8500bdc72d1f40b97cc414656e7e [template-mariadb] filename = instance-mariadb.cfg.in -md5sum = 2d687117150528fb5aad503874a1ad33 +md5sum = b2fea225fbeadcbf004eb2e2e3a68156 [template-kumofs] filename = instance-kumofs.cfg.in -md5sum = fe6ae121134a0e5bdb060073478be44e +md5sum = 13315c109deab534b81e7a45e7320eea [template-zope-conf] filename = zope.conf.in @@ -50,7 +50,7 @@ md5sum = dec33a617fa1b307c8ddb883efcfe3ce [template-postfix] filename = instance-postfix.cfg.in -md5sum = d920170577b611f973145c5807b01fce +md5sum = cbcb5f4c2885e3f2589770e76a422be7 [template-postfix-master-cf] filename = postfix_master.cf.in @@ -70,7 +70,7 @@ md5sum = c64f35f825200fe35328641b2b8e0fdd [template] filename = instance.cfg.in -md5sum = 1f88fb841394a1d24b7cc01f966c7b21 +md5sum = f81f4c9881bf868882cd56fe6a769666 [monitor-template-dummy] filename = dummy.cfg @@ -78,19 +78,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e [template-erp5] filename = instance-erp5.cfg.in -md5sum = 4e03b3fba30162019eae76132555dcde +md5sum = ff2f4d9f806fa783421d34204f2a74c8 [template-zeo] filename = instance-zeo.cfg.in -md5sum = d400c3d449ce437a0ded77ee3d5c5df2 +md5sum = 10a01b85c966ad9fe13bc981f1ddabe8 [template-zope] filename = instance-zope.cfg.in -md5sum = 5cbfcc02ffe6c2ae8cdf412134addd8f +md5sum = d9da770b4a83a58db8637f0eba97f4e8 [template-balancer] filename = instance-balancer.cfg.in -md5sum = 3034ccaa76dbb94f4fe07150a4681843 +md5sum = 10c620e934397390dc9b737453aab387 [template-haproxy-cfg] filename = haproxy.cfg.in diff --git a/stack/erp5/instance-balancer.cfg.in b/stack/erp5/instance-balancer.cfg.in index 9e8fa19a486863de0b4b662bb63784ae5db18944..586c0f9334242ee2521dfb693bf606c42a95c5a8 100644 --- a/stack/erp5/instance-balancer.cfg.in +++ b/stack/erp5/instance-balancer.cfg.in @@ -264,7 +264,6 @@ password = {{ slapparameter_dict['monitor-passwd'] }} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts += {{ part_list | join('\n ') }} diff --git a/stack/erp5/instance-erp5.cfg.in b/stack/erp5/instance-erp5.cfg.in index 20454014e86a79a95b801a4c996d1d598581a45f..17362a63c0f54b48a3a816be96180f6d3d03d0b2 100644 --- a/stack/erp5/instance-erp5.cfg.in +++ b/stack/erp5/instance-erp5.cfg.in @@ -414,12 +414,6 @@ monitor-httpd-port = 8386 {{ root_common.common_section() }} -[buildout] -extends = {{ template_monitor }} - -parts += - monitor-base - [monitor-conf-parameters] monitor-title = ERP5 password = ${monitor-htpasswd:passwd} diff --git a/stack/erp5/instance-kumofs.cfg.in b/stack/erp5/instance-kumofs.cfg.in index c2b4fa93e81ae4ade327a66c9821909e1f4c65f3..3748aa4a68bd6333bbfed290dc554de4732e2ab9 100644 --- a/stack/erp5/instance-kumofs.cfg.in +++ b/stack/erp5/instance-kumofs.cfg.in @@ -1,8 +1,7 @@ {% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts += publish kumofs-instance diff --git a/stack/erp5/instance-mariadb.cfg.in b/stack/erp5/instance-mariadb.cfg.in index b1e7d566d5c1d76e95981312634d5c34ffa38660..477522e464e1a1bad44ab57e65ebb1921a501569 100644 --- a/stack/erp5/instance-mariadb.cfg.in +++ b/stack/erp5/instance-mariadb.cfg.in @@ -362,7 +362,6 @@ password = {{ slapparameter_dict['monitor-passwd'] }} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts += {{ part_list | join('\n ') }} diff --git a/stack/erp5/instance-postfix.cfg.in b/stack/erp5/instance-postfix.cfg.in index 5b599c2f78de91ecb44f44602e8f53a7cbf5f0d9..485332bed18e2040b6a9c8f012a5ee2f8ed424da 100644 --- a/stack/erp5/instance-postfix.cfg.in +++ b/stack/erp5/instance-postfix.cfg.in @@ -278,7 +278,6 @@ password = {{ slapparameter_dict['monitor-passwd'] }} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts = {{ part_list | join('\n ') }} diff --git a/stack/erp5/instance-zeo.cfg.in b/stack/erp5/instance-zeo.cfg.in index 8386f06d9169eb629210b878535d3281c56e0280..2297016acd16404e431b1f8caf2cce75536f48ef 100644 --- a/stack/erp5/instance-zeo.cfg.in +++ b/stack/erp5/instance-zeo.cfg.in @@ -212,8 +212,7 @@ password = {{ slapparameter_dict['monitor-passwd'] }} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts += {{ part_list | join('\n ') }} publish diff --git a/stack/erp5/instance-zope.cfg.in b/stack/erp5/instance-zope.cfg.in index 6e307245cdd62ec8374087d93938c519874cd1ed..b3d2484c7667296fddc6a57be9713559f3e10d5e 100644 --- a/stack/erp5/instance-zope.cfg.in +++ b/stack/erp5/instance-zope.cfg.in @@ -521,8 +521,7 @@ password = {{ slapparameter_dict['monitor-passwd'] }} [buildout] extends = - {{ logrotate_cfg }} - {{ parameter_dict['template-monitor'] }} + {{ template_monitor }} parts += {{ '\n '.join(part_list) }} publish diff --git a/stack/erp5/instance.cfg.in b/stack/erp5/instance.cfg.in index 8f2e59e192bb1d5cd7a430437d9dc0439dcac524..803e0d654ac9634d4f53d30b50ebf10f7acdec14 100644 --- a/stack/erp5/instance.cfg.in +++ b/stack/erp5/instance.cfg.in @@ -18,7 +18,6 @@ postfix-location = {{ postfix_location }} template-postfix-aliases = {{ template_postfix_aliases }} template-postfix-main-cf = {{ template_postfix_main_cf }} template-postfix-master-cf = {{ template_postfix_master_cf }} -template-monitor = {{ dumps(template_monitor) }} [dynamic-template-postfix] < = jinja2-template-base @@ -33,7 +32,6 @@ extra-context = default-cloudooo-url = {{ dumps(default_cloudooo_url) }} jupyter-enable-default = {{ jupyter_enable_default }} local-bt5-repository = {{ ' '.join(local_bt5_repository.split()) }} -template-monitor = {{ dumps(template_monitor) }} [context] root-common = {{ root_common }} @@ -47,7 +45,6 @@ extra-context = key default_cloudooo_url dynamic-template-erp5-parameters:default-cloudooo-url key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository - key template_monitor dynamic-template-erp5-parameters:template-monitor key openssl_location :openssl-location import urlparse urlparse import-list = @@ -66,7 +63,6 @@ run-apachedex-location = {{ bin_directory }}/runApacheDex promise-check-apachedex-result = {{ bin_directory }}/check-apachedex-result template-haproxy-cfg = {{ template_haproxy_cfg }} template-apache-conf = {{ template_apache_conf }} -template-monitor = {{ dumps(template_monitor) }} [dynamic-template-balancer] <= jinja2-template-base @@ -80,7 +76,6 @@ import-list = [dynamic-template-zeo-parameters] <= default-dynamic-template-parameters -template-monitor = {{ dumps(template_monitor) }} [dynamic-template-zeo] <= jinja2-template-base @@ -105,7 +100,6 @@ jsl = {{ jsl_location }} link-binary = {{ dumps(zope_link_binary) }} userhosts = {{ userhosts_location }} site-zcml = {{ site_zcml }} -template-monitor = {{ dumps(template_monitor) }} extra-path-list = {{ dumps(extra_path_list) }} matplotlibrc = {{ matplotlibrc_location }} erp5-location = {{ erp5_location }} @@ -129,7 +123,6 @@ dcron-location = {{ dcron_location }} gzip-location = {{ gzip_location }} kumo-location = {{ kumo_location }} logrotate-location = {{ logrotate_location }} -template-monitor = {{ dumps(template_monitor) }} [dynamic-template-kumofs] <= jinja2-template-base @@ -154,7 +147,6 @@ mariadb-slow-query-report-script = {{ mariadb_slow_query_report_script }} mariadb-start-clone-from-backup = {{ mariadb_start_clone_from_backup }} promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-queries-digest-result percona-tools-location = {{ percona_toolkit_location }} -template-monitor = {{ template_monitor }} unixodbc-location = {{ unixodbc_location }} [dynamic-template-mariadb] diff --git a/stack/monitor/buildout.hash.cfg b/stack/monitor/buildout.hash.cfg index 675a1dad6a1379c447c463e8c8973c47ed773ce6..d539a315bdc7a585cd397652eb2a6ba95cafdcf4 100644 --- a/stack/monitor/buildout.hash.cfg +++ b/stack/monitor/buildout.hash.cfg @@ -14,4 +14,4 @@ # not need these here). [monitor2-template] filename = instance-monitor.cfg.jinja2.in -md5sum = da5fa743dba8709dfdd9c2d474741de8 +md5sum = e713bc55b68e3102f20902abc9f34f4b diff --git a/stack/monitor/instance-monitor.cfg.jinja2.in b/stack/monitor/instance-monitor.cfg.jinja2.in index 2412839c9949e5ab7f2f08fa58a1ea57f24b884a..c3b913cef573a814056b3d3d7f974a12bba4160c 100644 --- a/stack/monitor/instance-monitor.cfg.jinja2.in +++ b/stack/monitor/instance-monitor.cfg.jinja2.in @@ -97,7 +97,7 @@ parameter-file-path = ${monitor-instance-parameter:configuration-file-path} parameter-list = raw monitor-user ${monitor-instance-parameter:username} - htpasswd monitor-password ${httpd-monitor-htpasswd:password-file} ${monitor-instance-parameter:username} ${httpd-monitor-htpasswd:htpasswd-path} + htpasswd monitor-password ${monitor-htpasswd:storage-path} ${monitor-instance-parameter:username} ${httpd-monitor-htpasswd:htpasswd-path} file min-free-disk-MB ${promise-check-free-disk-space:config-threshold-file} ${monitor-instance-parameter:instance-configuration} # htpasswd entry: htpasswd key password-file username htpasswd-file @@ -147,17 +147,13 @@ bytes = 8 [httpd-monitor-htpasswd] recipe = plone.recipe.command stop-on-error = true -password-file = ${directory:etc}/.monitor_pwd htpasswd-path = ${monitor-directory:etc}/monitor-htpasswd # Keep multiple lines as password can end with newline char. command = if [ ! -s "${:htpasswd-path}" ]; then - {{ apache_location }}/bin/htpasswd -cb ${:htpasswd-path} ${:user} ${:password} + {{ apache_location }}/bin/htpasswd -cb ${:htpasswd-path} ${monitor-instance-parameter:username} ${monitor-instance-parameter:password} fi - if [ ! -s "${:password-file}" ]; then echo "${monitor-instance-parameter:password}" > ${:password-file}; fi update-command = ${:command} -user = ${monitor-instance-parameter:username} -password = ${monitor-instance-parameter:password} [monitor-symlink] recipe = cns.recipe.symlink @@ -399,7 +395,6 @@ depends = ${cron-entry-logrotate:name} ${logrotate-entry-cron:name} ${certificate-authority-service:wrapper-path} - ${monitor-conf:rendered} ${start-monitor:wrapper-path} ${ca-monitor-httpd-service:wrapper-path} ${monitor-httpd-promise:name}