Commit 42760240 authored by Vincent Pelletier's avatar Vincent Pelletier

Add minimal support for NEO-backed storage.

Only able to use a pre-existing NEO cluster.
parent 45977c84
master 1.0 alain apache-lower-reload apache-promise arnau aurelien-test-wendelin authorized_keys bug/20170414-1800C9F cedric.ln-erp5-cluster cherry-pick-bbfbf262 cleanup/erp5_drop_erp5-util-develop drop_mt_index_in_BTreeFolder2 erp5 erp5-ca erp5-cluster erp5-cluster-monitoring erp5-cluster-scalability erp5-cluster-z2.13 erp5-component erp5-component-libressl erp5-component-subversion-1.7 erp5-component-subversion-1.8 erp5-postfix erp5-schema-balancer erp5_kernel_jupyter erp5testnode-max_timeout erp5testnode-userhosts failed-request-log-warning feat/no_allow-picked-versions feat/olapy feat/switch-software-type feature/service-recipe feature/wrapper-update fix-1.0.56 fix/cloudooo_remove_ffmpeg fix/nginx-push-stream-compilation-fixes fix/perl-dbd-mysql_link_against_system_libraries fix/slaprunner_missing_slapos_scripts fix/softwaretype_case_sensitive gitlab-test gitlab-test-8.6.1 inkscape-cmake jupyter_renderjs_extension jupyter_wendelin kvm-hotplug lab-resilent lte-standalone mariadb-10.1.26 monitor-stack monitoring_cors monitoring_propagation nayuos-kato nayuos-stable nbextension_jiocontents nbextension_jiocontents_standalone nginx_with_auth onlyoffice-core openblas-make-ext-options py_magic_workaround rafael-py3 re6st-registry roque-1.0 roque-testnode-test-SR scalability-testnode-roque selenium_test shebang_limitation slap-configuration slapos-master-cluster ttrm wendelin_notebook 1.0.56.1 1.0.56 1.0.55 1.0.54 1.0.53 1.0.52 1.0.51 1.0.50.1 1.0.50 1.0.49 1.0.48 1.0.47 1.0.46.1 1.0.46 1.0.45 1.0.44 1.0.43 1.0.42 1.0.41 1.0.40.1 1.0.40 1.0.39 1.0.38.1 1.0.38 1.0.37 1.0.36 1.0.35 1.0.34 1.0.33 1.0.32 1.0.31 1.0.30 1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 1.0.18 1.0.17 1.0.16 1.0.15 1.0.14 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8.1 vifib-20150331 vifib-20150203 vifib-20150130 vifib-20150123 vifib-20150116 vifib-20141222 mr80_review_2 frontend_parameter_doc_review1 erp5-cluster-0.1.1
No related merge requests found
......@@ -141,12 +141,13 @@
"zodb-software-type": {
"description": "Zope Object DataBase implementation",
"default": "zeo",
"enum": ["zeo"],
"enum": ["zeo", "neo"],
"type": "string"
},
"zodb": {
"description": "Zope Object DataBase service",
"oneOf": [
{"$ref": "./instance-neo-input-schema.json#properties"},
{"$ref": "./instance-zeo-input-schema.json#properties"}
]
}
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["zodb-dict"],
"properties": {
"zodb-dict": {
"description": "Maps an export identifier to its settings",
"patternProperties": {
".*": {
"properties": {
"mount-point": {
"description": "Traversal path export should be mounted at (opaque to this software type)",
"default": "/",
"type": "string"
},
"cache-size": {
"description": "Client-side cache size in object count (opaque to this software type)",
"default": -1,
"type": "integer"
},
"storage-dict": {
"default": {},
"required": ["name", "master_nodes"],
"properties": {
"name": {
"description": "NEO cluster's name",
"type": "string"
},
"master_nodes": {
"description": "Client-side settings for this mountpoint",
"minItems": 1,
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ZEO instanciation",
"properties": {
"zodb-storage-type": {
"description": "zope.cfg-friendly storage type",
"enum": ["NEOStorage"],
"type": "string"
},
"zodb-dict": {
"description": "Maps an export identifier to values received as parameters",
"patternProperties": {
".*": {
"description": "Contains the mount-point, cache-size and client-dict received as parameters for current export identifier (client-dict's 'storage' and 'server' entries are overwritten with actual values)",
"type": "array"
}
},
"type": "object"
},
},
"type": "object"
}
......@@ -210,7 +210,7 @@ md5sum = 564006953b7d7a12d40a14b6648b32f0
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = d4b6e9bdaea4c11827dcb7a30c2d20c9
md5sum = 3465c19d25e14865c6e844c9a26ee984
extra-context =
key apache_location apache:location
key aspell_location aspell:location
......@@ -266,6 +266,7 @@ extra-context =
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_my_cnf template-my-cnf:target
key template_neo template-neo:target
key template_varnish template-varnish:target
key template_zeo template-zeo:target
key template_zope template-zope:target
......@@ -286,6 +287,11 @@ md5sum = 77ec4f095a22b5bd7dfea9dff63bade5
filename = instance-erp5-cluster.cfg.in
md5sum = c745d794b28cae64feba527f894d7340
[template-neo]
< = download-base
filename = instance-neo.cfg.in
md5sum = 1499c42d196f6627efb904f7e4d48b1b
[template-zeo]
< = download-base
filename = instance-zeo.cfg.in
......
{% if software_type == slap_software_type -%}
{% set zodb_dict = {} -%}
{% for export_id, mountpoint_dict in slapparameter_dict['zodb-dict'].items() -%}
{% do zodb_dict.__setitem__(export_id, [
mountpoint_dict.get('mount-point', '/'),
mountpoint_dict.get('cache-size', -1),
mountpoint_dict.get('storage-dict', {}),
]) -%}
{% endfor -%}
[publish]
recipe = slapos.cookbook:publish.serialised
zodb-storage-type = NEOStorage
zodb-dict = {{ dumps(zodb_dict) }}
[buildout]
parts +=
publish
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %}
......@@ -183,6 +183,15 @@ extra-context =
# Must match the key id in [switch-softwaretype] which uses this section.
raw software_type balancer
[dynamic-template-neo]
< = jinja2-template-base
template = {{ template_zeo }}
filename = instance-neo.cfg
extensions = jinja2.ext.do
extra-context =
# Must match the key id in [switch-softwaretype] which uses this section.
raw software_type zodb-neo
[dynamic-template-zeo-parameters]
buildout-bin-directory = {{ buildout_bin_directory }}
instance-logrotate-cfg = {{ template_logrotate_base }}
......@@ -282,6 +291,7 @@ zope = ${dynamic-template-zope:rendered}
mariadb = ${dynamic-template-mariadb:rendered}
varnish = ${dynamic-template-varnish:rendered}
balancer = ${dynamic-template-balancer:rendered}
zodb-neo = ${dynamic-template-neo:rendered}
zodb-zeo = ${dynamic-template-zeo:rendered}
cluster-zope = ${dynamic-template-cluster-zope:rendered}
......
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