What do I need to know about using the sample script to build my own Puppet module?
Every deployment is different, so this task doesn't lend itself to one all-inclusive Puppet script maintained by AppDynamics. However, the attached sample script can help you get started on your own Puppet module.
Table of Contents
What do I need to know about the Puppet sample’s environment and components
This sample script is intended for a Linux/Tomcat deployment. The script is relatively straightforward, and is intended to serve as a rough framework for building a script appropriate for your specific environment. Definitely edit it as appropriate for your environment and test out your config!
Puppet configuration essentials
If you haven't used Puppet before, we recommend running through the first two sections of the Puppet Quick Start Guide.
What guidelines are there for creating my own Puppet module from the sample?
java_agent.zip file needs to be unzipped into the prospect's Puppet modules directory (
/etc/puppet/environments/production/modules/ by default).
It contains 4 subdirectories: manifests, templates, files, and tests:
/manifests contains the main Puppet script,
/templates contains the
catalina.sh template file (see lines 236-238) for how the
init.pp variables are inserted.
Common system variables you would use can be found here: https://puppet.com/docs/puppet/6.19/lang_variables.html
/files contains the
AppServerAgent.zip — Replace this with the version of
AppServerAgent.zip that you'd like to deploy
/tests is not used for this module
init.pp you see the list of variables used for the deployment. You need to set these as appropriate for the target system.
For SaaS or other configurations, be sure to add the appropriate Java configuration properties to the command line.
- If you already deploy a customized
catalina.sh, you may want to inherit that template file or you may need to get more creative. A simple line replace should suffice.