tomcat multiple instances: add some variables, see https://support.d4science.org/issues/10153

This commit is contained in:
Andrea Dell'Amico 2017-11-22 18:00:27 +01:00
parent 83f7276956
commit 5d81cc4f57
3 changed files with 24 additions and 3 deletions

View File

@ -31,6 +31,10 @@ tomcat_m_java_gc_opts: "-XX:+UseConcMarkSweepGC"
# exactly one CPU chip that contains one or two cores, you should also add
# the "-XX:+CMSIncrementalMode" option.
#tomcat_m_other_java_opts: "-Djsse.enableSNIExtension=false"
tomcat_m_reverse_proxy_name_enabled: False
tomcat_m_reverse_proxy_name: '{{ ansible_fqdn }}'
tomcat_m_reverse_proxy_port: '{{ http_port | default(80) }}'
tomcat_m_other_java_opts: ""
tomcat_m_webapps_autodeploy: False
tomcat_m_webapps_unpack: False

View File

@ -38,8 +38,12 @@
<Service name="Catalina">
{% if item.http_enabled %}
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="{{ item.max_threads }}" minSpareThreads="10"/>
<Executor name="tomcatThreadPool"
namePrefix="catalina-exec-"
maxQueueSize="{{ item.max_queue_size | default(32767) }}"
maxThreads="{{ item.max_threads }}"
minSpareThreads="10"
/>
{% endif %}
<!-- A "Connector" represents an endpoint by which requests are received
@ -53,20 +57,32 @@
<!-- A http "Connector" using the shared thread pool-->
<Connector executor="tomcatThreadPool"
enableLookups="false"
maxQueueSize="{{ item.max_queue_size | default(32767) }}"
maxThreads="{{ item.max_threads }}" connectionTimeout="60000"
URIEncoding="UTF-8" bindOnInit="false" address="{{ item.http_address }}"
port="{{ item.http_port }}" protocol="HTTP/1.1"
maxPostSize="{{ item.max_post_size | default(104857600) }}"
{% if tomcat_m)reverse_proxy_name_enabled %}
proxyName="{{ tomcat_m_reverse_proxy_name }}"
proxyPort="{{ tomcat_m_reverse_proxy_port }}"
{% endif %}
redirectPort="8443" />
{% endif %}
{% if item.ajp_enabled %}
<!-- Define an AJP 1.3 Connector on port {{ tomcat_ajp_port }} -->
<Connector port="{{ item.ajp_port }}" protocol="AJP/1.3" redirectPort="8443"
enableLookups="false" address="{{ item.ajp_address }}"
enableLookups="false"
address="{{ item.ajp_address }}"
URIEncoding="UTF-8"
maxQueueSize="{{ item.max_queue_size | default(32767) }}"
maxThreads="{{ item.max_threads }}"
connectionTimeout="60000"
maxPostSize="{{ item.max_post_size | default(104857600) }}"
{% if tomcat_m_reverse_proxy_name_enabled %}
proxyName="{{ tomcat_m_reverse_proxy_name }}"
proxyPort="{{ tomcat_m_reverse_proxy_port }}"
{% endif %}
URIEncoding="UTF-8" bindOnInit="false" />
{% endif %}

View File

@ -106,6 +106,7 @@
<Connector port="{{ tomcat_ajp_port }}" protocol="AJP/1.3" redirectPort="8443"
enableLookups="false" address="{{ tomcat_ajp_address }}"
maxQueueSize="{{ tomcat_max_queue_size | default(32767) }}"
URIEncoding="UTF-8"
maxThreads="{{ tomcat_max_threads }}"
connectionTimeout="60000"
maxPostSize="{{ tomcat_max_post_size | default(104857600) }}"