I made a puppet class to install Apache Tomcat 7.55 in my node, but I do not know how to configure a datasource in it.
The last step of my class is to deploy an application:
tomcat::war { 'my.war':
catalina_base => '/opt/apache-tomcat/tomcat_7_0_55',
war_source => '/etc/puppet/resources/my.war',
}
After this step, I need to configure the following datasource in conf/server.xml file:
<Context path="/my-app" docBase="my-app" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/my-app-db" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="5"
username="xxx" password="yyy"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://<host>:3306/<database>?zeroDateTimeBehavior=convertToNull"/>
</Context>
How can I do this through Puppet? I am using puppetlabs-tomcat module.
Thanks!
tomcat::config::server::connector
. – jordanm