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
Eteri
slapos
Commits
300c2a81
Commit
300c2a81
authored
May 31, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5: add the ability to run in WSGI mode
parent
cbd033f6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
7 deletions
+37
-7
software/erp5/instance-erp5-input-schema.json
software/erp5/instance-erp5-input-schema.json
+5
-0
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+10
-1
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+3
-3
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+1
-0
stack/erp5/instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+10
-1
stack/erp5/zope.conf.in
stack/erp5/zope.conf.in
+8
-2
No files found.
software/erp5/instance-erp5-input-schema.json
View file @
300c2a81
...
...
@@ -111,6 +111,11 @@
},
"type"
:
"object"
},
"wsgi"
:
{
"description"
:
"If set to true, Zope is run as a WSGI application, instead of using the Medusa HTTP server."
,
"type"
:
"boolean"
,
"default"
:
false
},
"zope-partition-dict"
:
{
"description"
:
"Zope layout definition"
,
"default"
:
{
...
...
stack/erp5/buildout.cfg
View file @
300c2a81
...
...
@@ -564,18 +564,25 @@ eggs = ${neoppod:eggs}
unidiff
jsonpickle
# WSGI server
zope.globalrequest
waitress
# parameterizing the version of the generated python interpreter name by the
# python section version causes dependency between this egg section and the
# installation of python, which we don't want on an instance
interpreter = ${buildout:python}
entry-points =
runwsgi=Products.ERP5.bin.zopewsgi:runwsgi
scripts =
apachedex
repozo
runwsgi
runzope
runzeo
tidstoraged
tidstorage_repozo
web_checker_utility
= erp5.util.webchecker:web_checker_utility
web_checker_utility
extra-paths =
${erp5:location}
...
...
@@ -739,6 +746,8 @@ zbarlight = 2.0
cloudpickle = 0.5.3
dask = 0.18.1
toolz = 0.9.0
zope.globalrequest = 1.5
waitress = 1.3.0
# Re-add for as it is required to be there for uninstallation
erp5.recipe.w3validator = 1.0.2
...
...
stack/erp5/buildout.hash.cfg
View file @
300c2a81
...
...
@@ -34,7 +34,7 @@ md5sum = 13315c109deab534b81e7a45e7320eea
[template-zope-conf]
filename = zope.conf.in
md5sum =
adb25a1ab15c8aecf40a3952528f81c2
md5sum =
114e0ac43281b943931754ed317ebc36
[site-zcml]
filename = site.zcml
...
...
@@ -78,7 +78,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum =
d2221cab154dd0cc6c21527c435f7126
md5sum =
417b20649cb424e1adc843369401794a
[template-zeo]
filename = instance-zeo.cfg.in
...
...
@@ -86,7 +86,7 @@ md5sum = 10a01b85c966ad9fe13bc981f1ddabe8
[template-zope]
filename = instance-zope.cfg.in
md5sum =
d9da770b4a83a58db8637f0eba97f4e8
md5sum =
646f10824178eaa817cdef3479853bcf
[template-balancer]
filename = instance-balancer.cfg.in
...
...
stack/erp5/instance-erp5.cfg.in
View file @
300c2a81
...
...
@@ -227,6 +227,7 @@ config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longreques
config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-wsgi = {{ dumps(slapparameter_dict.get('wsgi', False)) }}
{% if test_runner_enabled -%}
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list}
{% endif -%}
...
...
stack/erp5/instance-zope.cfg.in
View file @
300c2a81
{% set wsgi = slapparameter_dict['wsgi'] -%}
{% set webdav = slapparameter_dict['webdav'] -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set next_port = itertools.count(slapparameter_dict['port-base']).next -%}
{% set site_id = slapparameter_dict['site-id'] -%}
...
...
@@ -182,7 +184,11 @@ pem = {{dumps(storage_dict.pop(k))}}
[runzope-base]
<= run-common
instance-home = ${directory:instance}
{% if wsgi -%}
wrapped-command-line = '{{ bin_directory }}/runwsgi' {% if webdav %}-w{% endif %} {{ ipv4 }}:${:port} '${:configuration-file}'
{% else -%}
wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}'
{%- endif %}
private-dev-shm = {{ slapparameter_dict['private-dev-shm'] }}
[{{ section('zcml') }}]
...
...
@@ -249,13 +255,13 @@ tidstorage-port = {{ dumps(slapparameter_dict['tidstorage-port']) }}
{% set thread_amount = slapparameter_dict['thread-amount'] -%}
{% set large_file_threshold = slapparameter_dict['large-file-threshold'] -%}
thread-amount = {{ thread_amount }}
{% set webdav = slapparameter_dict['webdav'] -%}
webdav = {{ dumps(webdav) }}
{% if webdav -%}
{% set timerserver_interval = 0 -%}
{% else -%}
{% set timerserver_interval = slapparameter_dict['timerserver-interval'] -%}
{%- endif %}
wsgi = {{ dumps(wsgi) }}
timerserver-interval = {{ dumps(timerserver_interval) }}
[zope-conf-base]
...
...
@@ -315,6 +321,9 @@ context =
< = runzope-base
wrapper-path = ${directory:service-on-watch}/{{ name }}
configuration-file = {{ '${' ~ conf_name ~ ':rendered}' }}
{%- if wsgi %}
port = {{ port }}
{%- endif %}
[{{ section("promise-" ~ name) }}]
recipe = slapos.cookbook:check_port_listening
...
...
stack/erp5/zope.conf.in
View file @
300c2a81
...
...
@@ -22,15 +22,17 @@ rest-output-encoding utf-8
# XXX: isn't this entry implicit ?
products {{ parameter_dict['instance-products'] }}
{% if parameter_dict['webdav'] -%}
{% if not parameter_dict['wsgi'] -%}
{% if parameter_dict['webdav'] -%}
<webdav-source-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
force-connection-close off
</webdav-source-server>
{% else %}
{%
else %}
<http-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
</http-server>
{% endif %}
{%- endif %}
<zoperunner>
...
...
@@ -68,7 +70,11 @@ large-file-threshold {{ parameter_dict['large-file-threshold'] }}
{% set timerserver_interval = parameter_dict['timerserver-interval'] -%}
{% if timerserver_interval -%}
{% if parameter_dict['wsgi'] -%}
%import Products.TimerService.timerserver
{% else %}
%import timerserver
{% endif -%}
<timer-server>
interval {{ timerserver_interval }}
</timer-server>
...
...
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