Преглед на файлове

Solr is now using Tomcat8

Thomas Buck преди 5 години
родител
ревизия
be280210b5

+ 0
- 1
roles/mailserver/files/etc_rspamd_local.d_redis.conf Целия файл

@@ -1,2 +1 @@
1 1
 servers = "127.0.0.1";
2
-

roles/mailserver/files/etc_tomcat7_server.xml → roles/mailserver/files/etc_tomcat8_server.xml Целия файл

@@ -1,4 +1,4 @@
1
-<?xml version='1.0' encoding='utf-8'?>
1
+<?xml version="1.0" encoding="UTF-8"?>
2 2
 <!--
3 3
   Licensed to the Apache Software Foundation (ASF) under one or more
4 4
   contributor license agreements.  See the NOTICE file distributed with
@@ -20,15 +20,12 @@
20 20
      Documentation at /docs/config/server.html
21 21
  -->
22 22
 <Server port="8005" shutdown="SHUTDOWN">
23
+  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
23 24
   <!-- Security listener. Documentation at /docs/config/listeners.html
24 25
   <Listener className="org.apache.catalina.security.SecurityListener" />
25 26
   -->
26 27
   <!--APR library loader. Documentation at /docs/apr.html -->
27
-  <!--
28 28
   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
29
-  -->
30
-  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
31
-  <Listener className="org.apache.catalina.core.JasperListener" />
32 29
   <!-- Prevent memory leaks due to use of particular java/javax APIs-->
33 30
   <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
34 31
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
@@ -64,14 +61,13 @@
64 61
 
65 62
     <!-- A "Connector" represents an endpoint by which requests are received
66 63
          and responses are returned. Documentation at :
67
-         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
64
+         Java HTTP Connector: /docs/config/http.html
68 65
          Java AJP  Connector: /docs/config/ajp.html
69 66
          APR (HTTP/AJP) Connector: /docs/apr.html
70
-         Define a non-SSL HTTP/1.1 Connector on port 8080
67
+         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
71 68
     -->
72 69
     <Connector address="127.0.0.1" port="8080" protocol="HTTP/1.1"
73 70
                connectionTimeout="20000"
74
-               URIEncoding="UTF-8"
75 71
                redirectPort="8443" />
76 72
     <!-- A "Connector" using the shared thread pool-->
77 73
     <!--
@@ -80,15 +76,40 @@
80 76
                connectionTimeout="20000"
81 77
                redirectPort="8443" />
82 78
     -->
83
-    <!-- Define a SSL HTTP/1.1 Connector on port 8443
84
-         This connector uses the BIO implementation that requires the JSSE
85
-         style configuration. When using the APR/native implementation, the
86
-         OpenSSL style configuration is required as described in the APR/native
87
-         documentation -->
79
+    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
80
+         This connector uses the NIO implementation. The default
81
+         SSLImplementation will depend on the presence of the APR/native
82
+         library and the useOpenSSL attribute of the
83
+         AprLifecycleListener.
84
+         Either JSSE or OpenSSL style configuration may be used regardless of
85
+         the SSLImplementation selected. JSSE style configuration is used below.
86
+    -->
87
+    <!--
88
+    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
89
+               maxThreads="150" SSLEnabled="true">
90
+        <SSLHostConfig>
91
+            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
92
+                         type="RSA" />
93
+        </SSLHostConfig>
94
+    </Connector>
95
+    -->
96
+    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
97
+         This connector uses the APR/native implementation which always uses
98
+         OpenSSL for TLS.
99
+         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
100
+         configuration is used below.
101
+    -->
88 102
     <!--
89
-    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
90
-               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
91
-               clientAuth="false" sslProtocol="TLS" />
103
+    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
104
+               maxThreads="150" SSLEnabled="true" >
105
+        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
106
+        <SSLHostConfig>
107
+            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
108
+                         certificateFile="conf/localhost-rsa-cert.pem"
109
+                         certificateChainFile="conf/localhost-rsa-chain.pem"
110
+                         type="RSA" />
111
+        </SSLHostConfig>
112
+    </Connector>
92 113
     -->
93 114
 
94 115
     <!-- Define an AJP 1.3 Connector on port 8009 -->
@@ -139,7 +160,7 @@
139 160
              Documentation at: /docs/config/valve.html
140 161
              Note: The pattern used is equivalent to using pattern="common" -->
141 162
         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
142
-               prefix="localhost_access_log." suffix=".txt"
163
+               prefix="localhost_access_log" suffix=".txt"
143 164
                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
144 165
 
145 166
       </Host>

+ 1
- 1
roles/mailserver/handlers/main.yml Целия файл

@@ -8,7 +8,7 @@
8 8
   service: name=opendkim state=restarted
9 9
 
10 10
 - name: restart solr
11
-  service: name=tomcat7 state=restarted
11
+  service: name=tomcat8 state=restarted
12 12
 
13 13
 - name: import sql postfix
14 14
   action: shell PGPASSWORD='{{ mail_db_password }}' psql -h localhost -d {{ mail_db_database }} -U {{ mail_db_username }} -f /etc/postfix/import.sql --set ON_ERROR_STOP=1

+ 25
- 6
roles/mailserver/tasks/solr.yml Целия файл

@@ -2,24 +2,43 @@
2 2
 # Installs and configures the Solr full-text-search.
3 3
 
4 4
 - name: Install Solr and related packages
5
-  apt: pkg={{ item }} state=present
6
-  with_items:
5
+  apt:
6
+    name: "{{ packages }}"
7
+    state: present
8
+  vars:
9
+    packages:
7 10
     - dovecot-solr
8 11
     - solr-tomcat
9 12
   tags:
10 13
     - dependencies
11 14
 
12 15
 - name: Work around Debian bug and copy Solr schema file into place
13
-  copy: src=solr-schema.xml dest=/etc/solr/conf/schema.xml group=root owner=root
16
+  copy:
17
+    src=solr-schema.xml
18
+    dest=/etc/solr/conf/schema.xml
19
+    owner=root
20
+    group=root
14 21
 
15 22
 - name: Copy tweaked Tomcat config file into place
16
-  copy: src=etc_tomcat7_server.xml dest=/etc/tomcat7/server.xml group=tomcat7 owner=root
23
+  copy:
24
+    src=etc_tomcat8_server.xml
25
+    dest=/etc/tomcat8/server.xml
26
+    owner=root
27
+    group=tomcat8
17 28
   notify: restart solr
18 29
 
19 30
 - name: Copy tweaked Solr config file into place
20
-  copy: src=etc_solr_conf_solrconfig.xml dest=/etc/solr/conf/solrconfig.xml group=root owner=root
31
+  copy:
32
+    src=etc_solr_conf_solrconfig.xml
33
+    dest=/etc/solr/conf/solrconfig.xml
34
+    owner=root
35
+    group=root
21 36
   notify: restart solr
22 37
 
23 38
 - name: Create Solr index directory
24
-  file: state=directory path=/data/solr group=tomcat7 owner=tomcat7
39
+  file:
40
+    state=directory
41
+    path=/data/solr
42
+    owner=tomcat8
43
+    group=tomcat8
25 44
   notify: restart solr

Loading…
Отказ
Запис