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
Georgios Dagkakis
slapos
Commits
74008d43
Commit
74008d43
authored
Dec 22, 2014
by
Alain Takoudjou
Committed by
Tristan Cavelier
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add parameters to Activate or desactivate monitor and to set port-base
parent
f25c9f9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
software/slapos-master/instance-erp5.cfg.in
software/slapos-master/instance-erp5.cfg.in
+14
-1
software/slapos-master/instance-zope.cfg.in
software/slapos-master/instance-zope.cfg.in
+16
-1
software/slapos-master/software.cfg
software/slapos-master/software.cfg
+2
-2
No files found.
software/slapos-master/instance-erp5.cfg.in
View file @
74008d43
...
...
@@ -4,6 +4,14 @@
{% set site_id = slapparameter_dict.get('site-id', 'erp5') -%}
{% set inituser_login = slapparameter_dict.get('inituser-login', 'zope') -%}
{% set publish_dict = {'site-id': site_id, 'inituser-login': inituser_login} -%}
{% set mariadb_request_dict = {'tcpv4-port': mariadb_dict.get('tcpv4-port', 2099)} -%}
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
{% set monitor_port = monitor_dict.get('port-base', 2600) %}
{% set monitor_count = 1 -%}
{% if mariadb_dict.get('monitor', False) -%}
{% do mariadb_request_dict.__setitem__('monitor-port', mariadb_dict.get('monitor-port', monitor_port)) -%}
{% endif -%}
[request-common]
recipe = slapos.cookbook:request.serialised
software-url = ${slap-connection:software-release-url}
...
...
@@ -36,7 +44,7 @@ config-{{ option }} = {{ dumps(value) }}
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}) }}
{{ request('mariadb', 'mariadb', 'mariadb',
{'tcpv4-port': mariadb_dict.get('tcpv4-port', 2099)}
, {'database-list': True, 'test-database-list': True}) }}
{{ request('mariadb', 'mariadb', 'mariadb',
mariadb_request_dict
, {'database-list': True, 'test-database-list': True}) }}
{{ request('http-monitor', 'http-monitor', 'http-monitor', {}, {'monitor-url': True}) }}
{# Fail early if an unexpected value is provided -#}
{% set zodb_type = slapparameter_dict.get('zodb-software-type') -%}
...
...
@@ -145,7 +153,12 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque
config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-monitor = {{ dumps(zope_parameter_dict.get('monitor', False)) }}
{% if zope_parameter_dict.get('monitor', False) -%}
config-monitor-port = {{ zope_parameter_dict.get('monitor-port', monitor_port + monitor_count) }}
{% endif -%}
sla-computer_guid = {{ dumps(zope_parameter_dict.get('computer-guid', computer_id)) }}
{% set monitor_count = monitor_count + 1 -%}
{% endfor -%}
{# We need to concatenate lists that we cannot read as lists, so this gets hairy. -#}
...
...
software/slapos-master/instance-zope.cfg.in
View file @
74008d43
...
...
@@ -14,6 +14,10 @@ XXX: This template only supports exactly one IPv4 and one IPv6 per
partition. No more (undefined result), no less (IndexError).
-#}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set monitor = slapparameter_dict['monitor'] -%}
{% if monitor -%}
{% set monitor_port = slapparameter_dict['monitor-port'] %}
{% endif -%}
{% if slapparameter_dict['mysql-test-url-list'] -%}
[{{ section('test-runner') }}]
...
...
@@ -85,6 +89,7 @@ recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:bin}
link-binary = {{ dumps(parameter_dict['link-binary']) }}
{% if monitor -%}
[{{ section('monitor-current-log-access') }}]
< = monitor-directory-access
source = ${directory:log}
...
...
@@ -94,7 +99,8 @@ source = ${directory:log}
source = ${directory:logrotate-backup}
[monitor-parameters]
port = {{ slapparameter_dict['port-base'] + 5000 }}
port = {{ slapparameter_dict['monitor-port'] }}
{% endif -%}
[certificate-authority-common]
requests-directory = ${directory:ca-requests}
...
...
@@ -375,7 +381,9 @@ dict toward erp5 partition, violating the DRY principle and making the intent
hard to guess.
-#}
hosts-dict = {{ dumps(hosts_dict) }}
{% if monitor -%}
monitor-url = ${monitor-parameters:url}
{% endif -%}
[erp5-promise]
recipe = slapos.cookbook:erp5.promise
...
...
@@ -394,9 +402,14 @@ certificate-authority-path = {{ dumps(slapparameter_dict['ca-path']) }}
[buildout]
extends =
{{ logrotate_cfg }}
{% if monitor -%}
# Extends template for monitor
{{ parameter_dict['template-monitor'] }}
{% endif -%}
parts +=
erp5-promise
{% if monitor -%}
# Access to zope logs
certificate-authority
cron-entry-monitor
cron-entry-rss
...
...
@@ -407,6 +420,8 @@ parts +=
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
{% endif -%}
# Complete parts with sections
{{ part_list | join('\n ') }}
publish-zope
versions = versions
...
...
software/slapos-master/software.cfg
View file @
74008d43
...
...
@@ -25,14 +25,14 @@ repository_id_list = erp5 vifib/master
[erp5]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/erp5.git
branch = erp5-
vifib
branch = erp5-
slapos-upgrade
git-executable = ${git:location}/bin/git
revision =
[vifib]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.core.git
branch = master
-dev
branch = master
git-executable = ${git:location}/bin/git
revision =
...
...
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