Skip to content

Commit

Permalink
beginnings of the jk module.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharumpe committed Dec 3, 2014
1 parent 7f29a3b commit 0514e1b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
19 changes: 19 additions & 0 deletions manifests/jk.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class apache2::jk
(
$jkLogLevel = "error",
$jkWorkerHost = "localhost",
$jkWorkerPort = 8009
)
{
include apache2::params

validate_string( $jkLogLevel )
validate_string( $jkWorkerHost )
validate_string( $jkWorkerPort )

# install the package

# include the module

# write the config file
}
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

$configConfdPath = "${configDirPath}/conf.d"
$accessConfigPath = "${configConfdPath}/access.conf"
$jkConfigPath = "${configConfdPath}/jk.conf"
$ldapConfigPath = "${configConfdPath}/ldap.conf"
$phpConfigPath = "${configConfdPath}/php5.conf"
$remoteIpConfigPath = "${configConfdPath}/remoteip.conf"
$traceEnableConfigPath = "${configConfdPath}/trace.conf"

Expand Down
44 changes: 44 additions & 0 deletions templates/default/etc/apache2/conf.d/jk.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<IfModule mod_jk.c>
# Where to put jk logs
JkLogFile /var/log/apache2/mod_jk_log

# Set the jk log level [debug/error/info]
JkLogLevel <%= @jkLogLevel %>

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

# JKShmFile
JkShmFile /var/log/apache2/jk-runtime-status

# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkWorkerProperty lines instead of worker.properties file

# Define some properties
JkWorkerProperty workers.apache_log=/var/log/apache2
JkWorkerProperty workers.tomcat_home=/usr/share/tomcat
JkWorkerProperty workers.java_home=/etc/alternatives/jre
JkWorkerProperty ps=/

# Define the loadbalancer worker
JkWorkerProperty worker.list=localJvm1,status
JkWorkerProperty worker.maintain=60

# Set properties for localJvm1 (ajp13)
JkWorkerProperty worker.localJvm1.type=ajp13
JkWorkerProperty worker.localJvm1.host=<%= @jkWorkerHost %>
JkWorkerProperty worker.localJvm1.port=<%= @jkWorkerPort %>
JkWorkerProperty worker.localJvm1.socket_timeout=10
JkWorkerProperty worker.localJvm1.retries=3
JkWorkerProperty worker.localJvm1.lbfactor=50

# Set properties for the status worker
JkWorkerProperty worker.status.type=status

Include /etc/apache2/conf.d/jk.d/*.mount
</IfModule>

0 comments on commit 0514e1b

Please sign in to comment.