Puppet manifests for DTAP environments

Here is how I implement a manifest to install an application on different environment.

1. I package the application into an RPM.

2. I build a manifest (init.pp) that hold the shared properties:

# mkdir -p /etc/puppet/modules/APPLICATION/{manifest,file,template}s

# cat /etc/puppet/modules/APPLICATION/manifests/init.pp
class APPLICATION {
package { APPLICATION:
ensure => present,
}

file { "/opt/apache-tomcat/conf/Catalina/localhost/APPLICATION.xml":
content => template("/etc/puppet/modules/APPLICATION/templates/APPLICATION.xml.erb"),
notify => Service["apache-tomcat"],
require => Package["APPLICATION"],
}
}

Add the template to the module:

# cat /etc/puppet/modules/APPLICATION/templates/APPLICATION.conf.erb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Context>
<Context>
<Resource name="jdbc/APPLICATION"
auth="Container"
type="javax.sql.DataSource"
testWhileIdle="true"
testOnBorrow="true"
testOnReturn="false"
validationQuery="select sysdate from dual"
validationInterval="30000"
timeBetweenEvictionRunsMillis="30000"
maxActive="100"
minIdle="10"
maxWait="10000"
initialSize="10"
removeAbandonedTimeout="60"
removeAbandoned="true"
logAbandoned="true"
minEvictableIdleTimeMillis="30000"
jmxEnabled="true"
username="<%= APPLICATIONUSERNAME %>"
password="<%= APPLICATIONPASSWORD %>"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="<%= APPLICATIONDBURL %>"/>
</Context>

Now I make a manifest for each environment:

# cat /etc/puppet/modules/APPLICATION/manifests/development.pp
class APPLICATION::development {
$APPLICATIONDBURL = "jdbc:oracle:thin:@HOSTNAME:1521/SID"
$APPLICATIONUSERNAME = "USERNAME"
$APPLICATIONPASSWORD = "PASSWORD"

include APPLICATION
}

# cat /etc/puppet/modules/APPLICATION/manifests/test.pp
class APPLICATION::test {
$APPLICATIONDBURL = "jdbc:oracle:thin:@HOSTNAME:1521/SID"
$APPLICATIONUSERNAME = "USERNAME"
$APPLICATIONPASSWORD = "PASSWORD"

include APPLICATION
}

# cat /etc/puppet/modules/APPLICATION/manifests/acceptance.pp
class APPLICATION::acceptance {
$APPLICATIONDBURL = "jdbc:oracle:thin:@HOSTNAME:1521/SID"
$APPLICATIONUSERNAME = "USERNAME"
$APPLICATIONPASSWORD = "PASSWORD"

include APPLICATION
}

# cat /etc/puppet/modules/APPLICATION/manifests/production.pp
class APPLICATION::production {
$APPLICATIONDBURL = "jdbc:oracle:thin:@HOSTNAME:1521/SID"
$APPLICATIONUSERNAME = "USERNAME"
$APPLICATIONPASSWORD = "PASSWORD"

include APPLICATION
}

On a machine simple include:

include APPLICATION::development

Comments

We have to make something

We have to make something respect in order to keep something amazing in order to keep allot of changes in life to become supportive and better for life Help for Research Paper

We still remember that we

We still remember that we always doing something amazing in order to keep some change in the ways we can not change in the better ways we amazing deal Please Do My Assignment for Me

Well these manifests may be

Well these manifests may be something a bit new and this has completely turned in to new innovations of the dtap environments. I got more info on this from http://superiorpapers.org blogs to reveal the facts and research it's functionality. I am glad for this post.

Accomplish you still

Accomplish you still immovable wind of a machine which is currently a days utilize Myassignmentservice.com by persons and they call it play code generator which is accessible.

On the off chance that the

On the off chance that the test is fruitful, the item is duplicated to an Acceptance test environment. Amid the Acceptance test, the client will test the item in this environment to confirm whether it lives up to their desires.

On the off chance that the

On the off chance that the test is fruitful, the write my assignment for me item is duplicated to an Acceptance test environment. Amid the Acceptance test, the client will test the item in this environment to confirm whether it lives up to their desires.

Thanks for sharing.I hope it

Thanks for sharing.I hope it will be helpful for a lot of people are looking for themes nay.ban can visit the following link to see the specific instructions the.toi think it's very useful.

I was perusing about xbox

I was perusing about xbox diversions I came to realize that Microsofts dispatches xbox codes to be connected in-amusement and Microsoft dispatches these codes only for some time. I read and read lastly following a month I got some answers concerning the spot that is as yet making these codes accessible to the guests and that as well

Click here to go to the

Click here to go to the author's website and earn a lot of free paypal money in your account.

Thanks! I've tested your

Thanks! I've tested your technology on this website

About Consultancy Articles Contact




References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning [email protected]