Every deployment is different, so this task doesn't lend itself to one master Puppet script maintained by AppDynamics. However, here is a sample that can help you get started on your own Puppet module.
This sample script is intended for a Linux/Tomcat deployment. The script is relatively straightforward, and is intended to serve as a framework for building a script appropriate for your specific environment. However, this script is rough and built for a specific environment, so definitely edit as appropriate for the environment and test out your config!
If you haven't used Puppet before, we recommend running through the first two sections of the quick start guide: https://docs.puppetlabs.com/pe/latest/quick_start.html.
The 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:
Within 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.