I am rewriting my tomcat lwrp and here is what I have in mind, partly
inspired by Andrea Campi's work
https://github.com/andreacampi/application_java
tomcat "liferay" do
gc do
min "256m"
max "512m"
max_perm_size "256m"
algorithm "UseConcMarkSweepGC"
end
profiling do # JMX
port "98204"
ssl false
authentication false
end
datasource do
driver 'org.gjt.mm.mysql.Driver'
database 'name'
port 5678
username 'user'
password 'password'
max_active 1
max_idle 2
max_wait 3
end
ports dof
http 8080
https 8443 # defaults to nil and not used
ajp 8009
shutdown 8005
end
end
Commandline JVM options that don't fit into the above api would have
to be crammed into an attribute like "additional_opts" or
node['tomcat']['additional_opts']
the issue I have is whether to group the options to be used by java
virtual machine by function or by category.
Here is a different take on the tomcat lwrp, the uses a 'jvm' block
with the xx_opts and d_opts which correspond to -XX, and -D options.
thoughts?
tomcat "pentaho" do
path "/opt/pentaho"
version "7"
user "pentaho"
unpack_wars true
auto_deploy true
environment { }
jvm do
xms "256m"
xmx "512m"
max_perm_size "256m"
xx_opts { }
d_opts { }
additional_opts [ ]
end
datasource do
driver 'org.gjt.mm.mysql.Driver'
database 'name'
port 5678
username 'user'
password 'password'
max_active 1
max_idle 2
max_wait 3
end
ports do
http 8080
https 8443 # defaults to nil and not used
ajp 8009
shutdown 8005
end
end
the JVM has so many bloody options that this may be the more feasible
solution. also w/ the xx_opts, and d_opts I can use simpler options
hash like
node['tomcat']['xx_opts'] = { 'ParallelGCThreads':'',
'+UseConcMarkSweepGC':'', 'CompileThreshold' : '10000' }
node['tomcat']['d_opts'] = { 'user.timezone': 'UTC', 'file.encoding': 'UTF8'}
would convert to -XX:ParallelGCThreads -XX:+UseConcMarkSweepGC
-XX:CompileThreshold=10000 -Duser.timezone=UTC -Dfile.encoding=UTF8
Archive powered by MHonArc 2.6.16.