Skip to content

Instantly share code, notes, and snippets.

@lordofthejars
Created March 29, 2013 20:49
Show Gist options
  • Save lordofthejars/5273548 to your computer and use it in GitHub Desktop.
Save lordofthejars/5273548 to your computer and use it in GitHub Desktop.
TomEE with Puppet
# update the (outdated) package list
exec { "update-package-list":
command => "/usr/bin/sudo /usr/bin/apt-get update",
}
class java_6 {
package { "openjdk-6-jdk":
ensure => installed,
require => Exec["update-package-list"],
}
}
class tomee {
file {"/opt/tomee-1.5.1":
ensure => directory,
recurse => true,
} ->
exec { "download-tomee" :
command => "/usr/bin/wget http://apache.rediris.es/openejb/openejb-4.5.1/apache-tomee-1.5.1-webprofile.tar.gz -O /tmp/tomee-1.5.1.tar.gz",
creates => "/tmp/tomee-1.5.1.tar.gz",
} ->
exec { "unpack-tomee" :
command => "/bin/tar -xzf /tmp/tomee-1.5.1.tar.gz -C /opt/tomee-1.5.1 --strip-components=1",
creates => "/opt/tomee-1.5.1/bin",
}
service { "tomee" :
provider => "init",
ensure => running,
start => "/opt/tomee-1.5.1/bin/startup.sh",
stop => "/opt/tomee-1.5.1/bin/shutdown.sh",
status => "",
restart => "",
hasstatus => false,
hasrestart => false,
require => Exec["unpack-tomee"],
}
}
include java_6
include tomee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment