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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
slapos
Commits
ef0ab1d0
Commit
ef0ab1d0
authored
May 31, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the ability to run ERP5 in WSGI mode
Gevent is used as the WSGI server, mainly to support SSL.
parent
913ef987
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
7 deletions
+39
-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
+19
-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
+7
-1
stack/erp5/zope.conf.in
stack/erp5/zope.conf.in
+4
-2
No files found.
software/erp5/instance-erp5-input-schema.json
View file @
ef0ab1d0
...
@@ -111,6 +111,11 @@
...
@@ -111,6 +111,11 @@
},
},
"type"
:
"object"
"type"
:
"object"
},
},
"wsgi"
:
{
"description"
:
"If set to true, will run Zope as a WSGI application, otherwise will run Zope using the Medusa HTTP server."
,
"type"
:
"boolean"
,
"default"
:
false
},
"zope-partition-dict"
:
{
"zope-partition-dict"
:
{
"description"
:
"Zope layout definition"
,
"description"
:
"Zope layout definition"
,
"default"
:
{
"default"
:
{
...
...
stack/erp5/buildout.cfg
View file @
ef0ab1d0
...
@@ -110,6 +110,7 @@ parts +=
...
@@ -110,6 +110,7 @@ parts +=
eggs-all-scripts
eggs-all-scripts
testrunner
testrunner
test_suite_runner
test_suite_runner
zopewsgi
# basic Xorg
# basic Xorg
libXdmcp
libXdmcp
...
@@ -439,6 +440,16 @@ initialization =
...
@@ -439,6 +440,16 @@ initialization =
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
repository_id_list = list(reversed('''${erp5_repository_list:repository_id_list}'''.split()))
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x]) for x in repository_id_list]
[zopewsgi]
# XXX: Workaround for fact ERP5Type is not an distribution and does not
# expose entry point for test runner
recipe = zc.recipe.egg
eggs = ${eggs:eggs}
extra-paths = ${eggs:extra-paths}
entry-points =
runwsgi=Products.ERP5.bin.zopewsgi:runwsgi
scripts=runwsgi
[eggs]
[eggs]
<= neoppod
<= neoppod
eggs = ${neoppod:eggs}
eggs = ${neoppod:eggs}
...
@@ -566,6 +577,11 @@ eggs = ${neoppod:eggs}
...
@@ -566,6 +577,11 @@ eggs = ${neoppod:eggs}
unidiff
unidiff
jsonpickle
jsonpickle
# WSGI server
gevent
greenlet
zope.globalrequest
# parameterizing the version of the generated python interpreter name by the
# parameterizing the version of the generated python interpreter name by the
# python section version causes dependency between this egg section and the
# python section version causes dependency between this egg section and the
# installation of python, which we don't want on an instance
# installation of python, which we don't want on an instance
...
@@ -694,7 +710,7 @@ eventlet = 0.20.1
...
@@ -694,7 +710,7 @@ eventlet = 0.20.1
five.formlib = 1.0.4
five.formlib = 1.0.4
five.localsitemanager = 2.0.5
five.localsitemanager = 2.0.5
google-api-python-client = 1.6.1
google-api-python-client = 1.6.1
greenlet = 0.4.1
2
greenlet = 0.4.1
5
http-parser = 0.8.3
http-parser = 0.8.3
httplib2 = 0.10.3
httplib2 = 0.10.3
huBarcode = 1.0.0
huBarcode = 1.0.0
...
@@ -741,6 +757,8 @@ zbarlight = 2.0
...
@@ -741,6 +757,8 @@ zbarlight = 2.0
cloudpickle = 0.5.3
cloudpickle = 0.5.3
dask = 0.18.1
dask = 0.18.1
toolz = 0.9.0
toolz = 0.9.0
gevent = 1.4.0
zope.globalrequest = 1.5
# Re-add for as it is required to be there for uninstallation
# Re-add for as it is required to be there for uninstallation
erp5.recipe.w3validator = 1.0.2
erp5.recipe.w3validator = 1.0.2
...
...
stack/erp5/buildout.hash.cfg
View file @
ef0ab1d0
...
@@ -34,7 +34,7 @@ md5sum = fe6ae121134a0e5bdb060073478be44e
...
@@ -34,7 +34,7 @@ md5sum = fe6ae121134a0e5bdb060073478be44e
[template-zope-conf]
[template-zope-conf]
filename = zope.conf.in
filename = zope.conf.in
md5sum =
adb25a1ab15c8aecf40a3952528f81c2
md5sum =
616e55d8e7cd540f0a795244a11c77a8
[site-zcml]
[site-zcml]
filename = site.zcml
filename = site.zcml
...
@@ -74,7 +74,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
...
@@ -74,7 +74,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
[template-erp5]
filename = instance-erp5.cfg.in
filename = instance-erp5.cfg.in
md5sum =
acd108217ff7a1b02b338c01c9c4aa27
md5sum =
4257aff0c10ffc05c55aa1131fd47fc8
[template-zeo]
[template-zeo]
filename = instance-zeo.cfg.in
filename = instance-zeo.cfg.in
...
@@ -82,7 +82,7 @@ md5sum = d400c3d449ce437a0ded77ee3d5c5df2
...
@@ -82,7 +82,7 @@ md5sum = d400c3d449ce437a0ded77ee3d5c5df2
[template-zope]
[template-zope]
filename = instance-zope.cfg.in
filename = instance-zope.cfg.in
md5sum = 1
a06ffa9f54e59604d4fedac0f6a99e7
md5sum = 1
0cad3b6931eef86bf9236c81cd8b75b
[template-balancer]
[template-balancer]
filename = instance-balancer.cfg.in
filename = instance-balancer.cfg.in
...
...
stack/erp5/instance-erp5.cfg.in
View file @
ef0ab1d0
...
@@ -196,6 +196,7 @@ config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longreques
...
@@ -196,6 +196,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-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-wsgi = {{ dumps(slapparameter_dict.get('wsgi', False)) }}
{% if test_runner_enabled -%}
{% if test_runner_enabled -%}
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list}
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list}
{% endif -%}
{% endif -%}
...
...
stack/erp5/instance-zope.cfg.in
View file @
ef0ab1d0
{% set wsgi = slapparameter_dict['wsgi'] -%}
{% set webdav = slapparameter_dict['webdav'] -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set next_port = itertools.count(slapparameter_dict['port-base']).next -%}
{% set next_port = itertools.count(slapparameter_dict['port-base']).next -%}
{% set site_id = slapparameter_dict['site-id'] -%}
{% set site_id = slapparameter_dict['site-id'] -%}
...
@@ -218,7 +220,11 @@ pem = {{dumps(storage_dict.pop(k))}}
...
@@ -218,7 +220,11 @@ pem = {{dumps(storage_dict.pop(k))}}
[runzope-base]
[runzope-base]
<= run-common
<= run-common
instance-home = ${directory:instance}
instance-home = ${directory:instance}
{% if wsgi -%}
wrapped-command-line = '{{ bin_directory }}/runwsgi' {% if webdav -%}-w{%- endif %} {{ ipv4 }}:{{ next_port() }} '${:configuration-file}'
{% else -%}
wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}'
wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}'
{%- endif %}
private-dev-shm = {{ slapparameter_dict['private-dev-shm'] }}
private-dev-shm = {{ slapparameter_dict['private-dev-shm'] }}
[{{ section('zcml') }}]
[{{ section('zcml') }}]
...
@@ -285,13 +291,13 @@ tidstorage-port = {{ dumps(slapparameter_dict['tidstorage-port']) }}
...
@@ -285,13 +291,13 @@ tidstorage-port = {{ dumps(slapparameter_dict['tidstorage-port']) }}
{% set thread_amount = slapparameter_dict['thread-amount'] -%}
{% set thread_amount = slapparameter_dict['thread-amount'] -%}
{% set large_file_threshold = slapparameter_dict['large-file-threshold'] -%}
{% set large_file_threshold = slapparameter_dict['large-file-threshold'] -%}
thread-amount = {{ thread_amount }}
thread-amount = {{ thread_amount }}
{% set webdav = slapparameter_dict['webdav'] -%}
webdav = {{ dumps(webdav) }}
webdav = {{ dumps(webdav) }}
{% if webdav -%}
{% if webdav -%}
{% set timerserver_interval = 0 -%}
{% set timerserver_interval = 0 -%}
{% else -%}
{% else -%}
{% set timerserver_interval = slapparameter_dict['timerserver-interval'] -%}
{% set timerserver_interval = slapparameter_dict['timerserver-interval'] -%}
{%- endif %}
{%- endif %}
wsgi = {{ dumps(wsgi) }}
timerserver-interval = {{ dumps(timerserver_interval) }}
timerserver-interval = {{ dumps(timerserver_interval) }}
[zope-conf-base]
[zope-conf-base]
...
...
stack/erp5/zope.conf.in
View file @
ef0ab1d0
...
@@ -22,6 +22,7 @@ rest-output-encoding utf-8
...
@@ -22,6 +22,7 @@ rest-output-encoding utf-8
# XXX: isn't this entry implicit ?
# XXX: isn't this entry implicit ?
products {{ parameter_dict['instance-products'] }}
products {{ parameter_dict['instance-products'] }}
{% if not parameter_dict['wsgi'] -%}
{% if parameter_dict['webdav'] -%}
{% if parameter_dict['webdav'] -%}
<webdav-source-server>
<webdav-source-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
...
@@ -31,6 +32,7 @@ products {{ parameter_dict['instance-products'] }}
...
@@ -31,6 +32,7 @@ products {{ parameter_dict['instance-products'] }}
<http-server>
<http-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
</http-server>
</http-server>
{% endif %}
{%- endif %}
{%- endif %}
<zoperunner>
<zoperunner>
...
...
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