mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
DCD-224: Add server.xml template.
This commit is contained in:
26
roles/jira_config/defaults/main.yml
Normal file
26
roles/jira_config/defaults/main.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
atl_jvm_heap: "2048m"
|
||||
|
||||
atl_catalina_opts: ""
|
||||
atl_catalina_opts_extra: >-
|
||||
-XX:+UseG1GC
|
||||
-XX:+PrintAdaptiveSizePolicy
|
||||
-XX:+PrintGCDetails
|
||||
-XX:NumberOfGCLogFiles=10
|
||||
-XX:GCLogFileSize=5m
|
||||
-XX:+UseGCLogFileRotation
|
||||
-XX:+PrintTenuringDistribution
|
||||
-Dfile.encoding=UTF-8
|
||||
|
||||
atl_tomcat_port: "8080"
|
||||
atl_tomcat_mgmt_port: "8005"
|
||||
atl_tomcat_acceptcount: "10"
|
||||
atl_tomcat_connectiontimeout: "20000"
|
||||
atl_tomcat_contextpath: "false"
|
||||
atl_tomcat_maxthreads: "200"
|
||||
atl_tomcat_minsparethreads: "10"
|
||||
atl_tomcat_protocol: "HTTP/1.1"
|
||||
atl_tomcat_redirectport: ""
|
||||
atl_tomcat_scheme: "http"
|
||||
atl_tomcat_secure: "false"
|
||||
@@ -25,3 +25,10 @@ def test_cluster_file(host):
|
||||
assert f.exists
|
||||
assert f.contains('jira.node.id = FAKEID')
|
||||
assert f.contains('jira.shared.home = /media/atl/jira/shared')
|
||||
|
||||
def test_server_file(host):
|
||||
f = host.file('/opt/atlassian/jira-software/current/conf/server.xml')
|
||||
assert f.exists
|
||||
assert f.contains('Connector port="8080"')
|
||||
assert f.contains('Server port="8005"')
|
||||
assert not f.contains('proxyName=')
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
dest: "{{ atl_product_home }}/cluster.properties"
|
||||
owner: "{{ atl_product_user }}"
|
||||
|
||||
- name: Create server config
|
||||
template:
|
||||
src: server.xml.j2
|
||||
dest: "{{ atl_product_installation_target }}/conf/server.xml"
|
||||
|
||||
- name: Override JVM memory settings.
|
||||
# Ugly but necessary as the product installs this file so we need to make the change here.
|
||||
lineinfile:
|
||||
|
||||
72
roles/jira_config/templates/server.xml.j2
Normal file
72
roles/jira_config/templates/server.xml.j2
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Server port="{{ atl_tomcat_mgmt_port }}"
|
||||
shutdown="SHUTDOWN">
|
||||
|
||||
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
|
||||
<Listener className="org.apache.catalina.core.AprLifecycleListener"
|
||||
SSLEngine="on"/>
|
||||
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
|
||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
|
||||
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
|
||||
|
||||
<Service name="Catalina">
|
||||
|
||||
<Connector port="{{ atl_tomcat_port }}"
|
||||
{% if atl_proxy_name is defined and atl_proxy_name != '' %}
|
||||
proxyName="{{ atl_proxy_name }}"
|
||||
{% endif %}
|
||||
{% if atl_proxy_port is defined and atl_proxy_port != '' %}
|
||||
proxyPort="{{ atl_proxy_port }}"
|
||||
{% endif %}
|
||||
maxThreads="{{ atl_tomcat_maxthreads }}"
|
||||
minSpareThreads="{{ atl_tomcat_minsparethreads }}"
|
||||
connectionTimeout="{{ atl_tomcat_connectiontimeout }}"
|
||||
enableLookups="{{ atl_tomcat_enablelookups }}"
|
||||
protocol="{{ atl_tomcat_protocol }}"
|
||||
redirectPort="{{ atl_tomcat_redirectport }}"
|
||||
acceptCount="{{ atl_tomcat_acceptcount }}"
|
||||
|
||||
disableUploadTimeout="true"
|
||||
relaxedPathChars="[]|"
|
||||
relaxedQueryChars="[]|{}^\`"<>"
|
||||
useBodyEncodingForURI="true"
|
||||
maxHttpHeaderSize="8192"
|
||||
bindOnInit="false" />
|
||||
|
||||
<Engine name="Catalina"
|
||||
defaultHost="localhost">
|
||||
|
||||
<Host name="localhost"
|
||||
appBase="webapps"
|
||||
unpackWARs="true"
|
||||
autoDeploy="true">
|
||||
|
||||
<Context path=""
|
||||
docBase="${catalina.home}/atlassian-jira"
|
||||
reloadable="false"
|
||||
useHttpOnly="true">
|
||||
|
||||
<Resource name="UserTransaction"
|
||||
auth="Container"
|
||||
type="javax.transaction.UserTransaction"
|
||||
factory="org.objectweb.jotm.UserTransactionFactory"
|
||||
jotm.timeout="60"/>
|
||||
|
||||
<Manager pathname=""/>
|
||||
|
||||
<JarScanner scanManifest="false"/>
|
||||
|
||||
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
|
||||
threshold="120" />
|
||||
|
||||
</Context>
|
||||
|
||||
</Host>
|
||||
|
||||
<Valve className="org.apache.catalina.valves.AccessLogValve"
|
||||
pattern="%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%q %H" %s %b %D "%{Referer}i" "%{User-Agent}i" "%{jira.request.assession.id}r""/>
|
||||
|
||||
</Engine>
|
||||
</Service>
|
||||
</Server>
|
||||
Reference in New Issue
Block a user