forked from saltstack-formulas/tomcat-formula
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pillar.example
180 lines (176 loc) · 5.9 KB
/
pillar.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
tomcat:
# The Tomcat version can be overridden like so.
# ver: 7
security: 'no'
# The Java home directory can be overridden like so.
# java_home: '/usr/lib/jvm/default-java'
# Any parameter you may pass to the java app, you can pass it here,
# without the preceding dash. The template builds the correct JAVA_OPTS
# line, adding the dash.
# Java's parameter don't follow a pattern (that I can see), so I think it's
# the best way to build the string of opts.
java_opts:
- 'Djava.awt.headless=true'
- 'Xmx128m'
- 'XX:MaxPermSize=256m'
- 'XX:+UseConcMarkSweepGC'
- 'XX:+CMSIncrementalMode'
- 'Dlog4j.configuration=file:/path/to/log4j.properties'
- 'Dlogback.configurationFile=/path/to/logback.xml'
jsp_compiler: javac
logfile_days: 14
logfile_compress: 1
jvm_tmp: /tmp/tomcat
authbind: no
expires_when: '2 weeks'
with_haveged: true
haveged_enabled: true
cluster:
simple: true
catalina_base: /usr/share/tomcat
catalina_home: /usr/share/tomcat
catalina_tmpdir: /var/cache/tomcat/temp
catalina_pid: /var/run/tomcat.pid
limit:
soft: 64000
hard: 64000
connector:
example_connector:
port: 8443
protocol: 'org.apache.coyote.http11.Http11Protocol'
connectionTimeout: 20000
URIEncoding: 'UTF-8'
redirectPort: 8443
maxHttpHeaderSize: 8192
maxThreads: 150
minSpareThreads: 25
enableLookups: 'false'
disableUploadTimeout: 'true'
acceptCount: 100
scheme: https
secure: 'true'
SSLEnabled: 'true'
clientAuth: 'false'
sslProtocol: TLS
keystoreFile: '/path/to/keystoreFile'
keystorePass: 'somerandomtext'
sites:
example.com: # must be unique; used as an ID declaration in Salt; also used in the template as {{ host_name }} is name is not declared
name: some_string # to use as "Host name=" in server.xml definitions. If not declared, ID declaration will be used
appBase: ../webapps/myapp
path: ''
docBase: '/var/lib/tomcat7/webapps/myapp'
alias: {{ id }}
host_parameters:
unpackWARs: "true"
autoDeploy: "true"
deployXML: "false"
reloadable: "true"
debug: 0
example.net:
appBase: ../webapps/myapp2
path: ''
docBase: '/var/lib/tomcat7/webapps/myapp2'
alias: {{ id }}
unpackWARs: "true"
autoDeploy: "true"
reloadable: "true"
debug: 0
valves:
- className: org.apache.catalina.valves.AccessLogValve
directory: logs
prefix: localhost_access_log.
fileDateFormat: yyyy-MM-dd-HH
suffix: .log
pattern: '%h %l %u %t "%m http://%v%U %H" %s %b "%{Referer}i" "%{User-Agent}i" %D'
- className: org.apache.catalina.authenticator.SingleSignOn
manager:
# UPDATE: This version of the pillar file now supports multiple user acccounts and variable roles. The previous version of this formula supported only a single user and fixed roles.
roles:
- manager-gui
- manager-script
- manager-jmx
- manager-status
users:
saltuser1:
passwd: RfgpE2iQwD
roles: manager-gui,manager-script,manager-jmx,manager-status
saltuser2:
passwd: RfgpE2iQwD
roles: manager-gui,manager-script,manager-jmx,manager-status
context:
# Let's you define multiple elements in the global context.xml file.
# The state does not try to be clever about the correctness of what you add here,
# just iterates over the dictionary of <Elements_types> and generates entries
# in the file. Ie, the lines below will generate:
#
# <Environment
# name="env.first"
# value="first.text"
# type="java.lang.String"
# override="true"
# />
# <Environment
# name="env.second"
# value="second.value"
# type="some.other.type"
# override="false"
# />
# <Listener
# className="org.apache.catalina.security.SecurityListener"
# />
# <Listener
# className="org.apache.catalina.core.AprLifecycleListener"
# SSLEngine="on"
# />
# <Resource
# name="jdbc/__postgres"
# auth="Container"
# type="javax.sql.DataSource"
# driverClassName="org.postgresql.Driver"
# url="jdbc:postgresql://db.server/dbname"
# username="dbuser"
# password="aycaramba!"
# maxActive="20"
# maxIdle="10"
# maxWait="-1"
# />
# <ResourceLink
# name="linkToGlobalResource"
# global="simpleValue"
# type="java.lang.Integer"
# />
Environment:
env.first:
name: env.first
value: first.text
type: java.lang.String
override: true
env.second:
name: env.second
value: second.value
type: some.other.type
override: false
Listener:
first:
className: org.apache.catalina.security.SecurityListener
second:
className: org.apache.catalina.core.AprLifecycleListener
SSLEngine: on
Resource:
jdbc:
name: jdbc/__postgres
auth: Container
type: javax.sql.DataSource
driverClassName: org.postgresql.Driver
url: jdbc:postgresql://db.server/dbname
user: dbuser
password: aycaramba!
maxActive: 20
maxIdle: 10
maxWait: -1
ResourceLink:
any_name_here_will_be_ignored:
name: linkToGlobalResource
global: simpleValue
type: java.lang.Integer