Skip to content

Instantly share code, notes, and snippets.

@jhoblitt
Created June 14, 2013 19:56
Show Gist options
  • Save jhoblitt/5784767 to your computer and use it in GitHub Desktop.
Save jhoblitt/5784767 to your computer and use it in GitHub Desktop.
install apache mod_cluster for torquebox
class portal::mod_cluster (
$version = '1.2.0.Final'
) {
include wget
$package_filename = "mod_cluster-${version}-linux2-x64-so.tar.gz"
$package_url = "http://downloads.jboss.org/mod_cluster/${version}/${package_filename}"
$unzip_root = '/root/mod_cluster'
$unzip_path = $unzip_root
$http_mod_path = '/usr/lib64/httpd/modules'
file { $unzip_root:
ensure => directory,
} ->
wget::fetch { $package_filename:
source => $package_url,
destination => "${unzip_root}/${package_filename}",
timeout => 30,
require => File[$unzip_root],
} ->
exec { "tar -xf ${package_filename}":
path => ['/bin', '/usr/bin'],
cwd => $unzip_root,
creates => "$unzip_path/mod_advertise.so",
} ->
exec { "cp mod_advertise.so ${http_mod_path}":
path => ['/bin', '/usr/bin', $unzip_path],
cwd => $unzip_path,
creates => "${http_mod_path}/mod_advertise.so",
# notify => Class[ 'apache' ],
} ->
exec { "cp mod_manager.so ${http_mod_path}":
path => ['/bin', '/usr/bin', $unzip_path],
cwd => $unzip_path,
creates => "${http_mod_path}/mod_manager.so",
# notify => Class[ 'apache' ],
} ->
exec { "cp mod_proxy_cluster.so ${http_mod_path}":
path => ['/bin', '/usr/bin', $unzip_path],
cwd => $unzip_path,
creates => "${http_mod_path}/mod_proxy_cluster.so",
# notify => Class[ 'apache' ],
} ->
exec { "cp mod_slotmem.so ${http_mod_path}":
path => ['/bin', '/usr/bin', $unzip_path],
cwd => $unzip_path,
creates => "${http_mod_path}/mod_slotmem.so",
# notify => Class[ 'apache' ],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment