0
votes

Has anyone successfully installed Apache Tomcat using Puppet? I am following the instructions on Puppets own tomcat module - https://forge.puppetlabs.com/puppetlabs/tomcat but it does not work!

2

2 Answers

1
votes

I have managed to get this working - I believe firewalls was the issue.

node 'xx' {

  include os

  class { 'tomcat': }
  class { 'java': }
  tomcat::instance { 'test':
    source_url => 'http://mirror.nexcess.net/apache/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7.0.57.tar.gz'
  }->tomcat::service { 'default': }

  Class['os'] -> Class['tomcat']

 }  


 class os {


  exec { "chkconfig_iptables":
          onlyif => "/sbin/chkconfig --level 3 iptables",
          command => "/sbin/chkconfig --level 3 iptables off",
          before => exec["kill_iptables"]
     }
  exec { "kill_iptables":
          onlyif => "/sbin/lsmod | grep ip_tables",
          command => "/sbin/service iptables stop;/sbin/modprobe -f -r ip_tables"
      }


 }
0
votes

Yes - After trying many examples with the puppetlabs module I was able to install tomcat, nevertheless i find aco/tomcat module much easier to use (the installation of the services is automated aswell).

If you are not forced to use the supported module I'd go with aco/tomcat instead.