{"id":15022729,"url":"https://github.com/puppetlabs/puppetlabs-tomcat","last_synced_at":"2025-12-11T21:47:22.543Z","repository":{"id":17488977,"uuid":"20273751","full_name":"puppetlabs/puppetlabs-tomcat","owner":"puppetlabs","description":"PuppetLabs Tomcat module","archived":false,"fork":false,"pushed_at":"2025-04-23T11:57:41.000Z","size":1464,"stargazers_count":38,"open_issues_count":8,"forks_count":171,"subscribers_count":165,"default_branch":"main","last_synced_at":"2025-05-05T16:18:42.438Z","etag":null,"topics":["hacktoberfest","module","supported"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/puppetlabs/tomcat","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-28T21:55:19.000Z","updated_at":"2025-04-23T11:57:44.000Z","dependencies_parsed_at":"2023-11-07T10:25:27.066Z","dependency_job_id":"cbafc997-d244-4159-bb30-f2408cfe28f4","html_url":"https://github.com/puppetlabs/puppetlabs-tomcat","commit_stats":{"total_commits":598,"total_committers":121,"mean_commits":"4.9421487603305785","dds":0.8645484949832776,"last_synced_commit":"056d508c0952a96f641ae64288b0c347a5c273a1"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-tomcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-tomcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-tomcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-tomcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-tomcat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253428502,"owners_count":21906930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","module","supported"],"created_at":"2024-09-24T19:58:19.412Z","updated_at":"2025-12-11T21:47:22.501Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tomcat\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n3. [Setup - The basics of getting started with tomcat](#setup)\n    * [Setup requirements](#requirements)\n    * [Beginning with tomcat](#beginning-with-tomcat)\n4. [Usage - Configuration options and additional functionality](#usage)\n    * [I want to run multiple instances of multiple versions of Tomcat](#i-want-to-run-multiple-instances-of-multiple-versions-of-tomcat)\n    * [I want to configure SSL and specify which protocols and ciphers to use](#i-want-to-configure-ssl-and-specify-which-protocols-and-ciphers-to-use)\n    * [I want to deploy WAR files.](#i-want-to-deploy-war-files)\n    * [I want to remove some configuration](#i-want-to-remove-some-configuration)\n    * [I want to manage a Connector or Realm that already exists](#i-want-to-manage-a-connector-or-realm-that-already-exists)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n6. [Limitations - OS compatibility, etc.](#limitations)\n7. [License](#license)\n8. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nThe tomcat module lets you use Puppet to install, deploy, and configure Tomcat web services.\n\n## Module Description\n\nTomcat is a Java web service provider. The tomcat module lets you use Puppet to install Tomcat, manage its configuration file, and deploy web apps to it. It supports multiple instances of Tomcat spanning multiple versions.\n\n## Setup\n\n### Requirements\n\nThe tomcat module requires [puppetlabs-stdlib](https://forge.puppetlabs.com/puppetlabs/stdlib) version 4.0 or newer. On Puppet Enterprise you must meet this requirement before installing the module. To update stdlib, run:\n\n```bash\npuppet module upgrade puppetlabs-stdlib\n```\n\n### Beginning with tomcat\n\nThe simplest way to get Tomcat up and running with the tomcat module is to install the Tomcat source and start the service:\n\n```puppet\ntomcat::install { '/opt/tomcat':\n  source_url =\u003e 'https://www-us.apache.org/dist/tomcat/tomcat-8/v8.0.x/bin/apache-tomcat-8.0.x.tar.gz',\n}\ntomcat::instance { 'default':\n  catalina_home =\u003e '/opt/tomcat',\n}\n```\n\n\u003e Note: look up the correct version you want to install on the [version list](http://tomcat.apache.org/whichversion.html).\n\n## Usage\n\n### I want to run multiple instances of multiple versions of Tomcat\n\n```puppet\nclass { 'java': }\n\ntomcat::install { '/opt/tomcat9':\n  source_url =\u003e 'https://www.apache.org/dist/tomcat/tomcat-9/v9.0.x/bin/apache-tomcat-9.0.x.tar.gz'\n}\ntomcat::instance { 'tomcat9-first':\n  catalina_home =\u003e '/opt/tomcat9',\n  catalina_base =\u003e '/opt/tomcat9/first',\n}\ntomcat::instance { 'tomcat9-second':\n  catalina_home =\u003e '/opt/tomcat9',\n  catalina_base =\u003e '/opt/tomcat9/second',\n}\n# Change the default port of the second instance server and HTTP connector\ntomcat::config::server { 'tomcat9-second':\n  catalina_base =\u003e '/opt/tomcat9/second',\n  port          =\u003e '8006',\n}\ntomcat::config::server::connector { 'tomcat9-second-http':\n  catalina_base         =\u003e '/opt/tomcat9/second',\n  port                  =\u003e '8081',\n  protocol              =\u003e 'HTTP/1.1',\n  additional_attributes =\u003e {\n    'redirectPort' =\u003e '8443'\n  },\n}\n\n```\n\n\u003e Note: look up the correct version you want to install on the [version list](http://tomcat.apache.org/whichversion.html).\n\n### I want to upgrade the version of Tomcat to use\n\nSee information about running multiple versions above. Instead of upgrading in-place, install a second version to a new directory and then point the `catalina_home` of your instance to it. This gives you the ability to validate and rollback if needed. After validation, you may remove the older instance if you'd like. The links can be updated in order to match programmer preferences:\n\n```puppet\nclass { 'java': }\n\ntomcat::install { '/opt/tomcat/9.0.24':\n  source_url =\u003e 'https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.24/bin/apache-tomcat-9.0.24.tar.gz'\n}\ntomcat::install { '/opt/tomcat/9.0.44':\n  source_url =\u003e 'https://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.46/bin/apache-tomcat-9.0.46.tar.gz'\n}\ntomcat::instance { 'my_tomcat_app':\n# catalina_home =\u003e '/opt/tomcat/9.0.24',\n  catalina_home =\u003e '/opt/tomcat/9.0.46',\n  catalina_base =\u003e '/opt/my_tomcat_app',\n}\n```\n\n\n### I want to configure SSL and specify which protocols and ciphers to use\n\n```puppet\n  file { $keystore_path:\n    ensure =\u003e present,\n    source =\u003e $keystore_source,\n    owner =\u003e $keystore_user,\n    mode =\u003e '0400',\n    checksum =\u003e 'md5',\n    checksum_value =\u003e $keystore_checksum,\n  } -\u003e\n\n  tomcat::config::server::connector { \"${tomcat_instance}-https\":\n    catalina_base         =\u003e $catalina_base,\n    port                  =\u003e $https_port,\n    protocol              =\u003e $http_version,\n    purge_connectors      =\u003e true,\n    cert_key_file         =\u003e '/path/to/key.pem',\n    cert_file             =\u003e '/path/to/cert.pem',\n    cert_chain_file       =\u003e '/path/to/chain.pem',\n    cert_type             =\u003e 'RSA',\n    additional_attributes =\u003e {\n      'SSLEnabled'          =\u003e bool2str($https_enabled),\n      'maxThreads'          =\u003e $https_connector_max_threads,\n      'scheme'              =\u003e $https_connector_scheme,\n      'secure'              =\u003e bool2str($https_connector_secure),\n      'clientAuth'          =\u003e bool2str($https_connector_client_auth),\n      'sslProtocol'         =\u003e $https_connector_ssl_protocol,\n      'sslEnabledProtocols' =\u003e join($https_connector_ssl_protocols_enabled, \",\"),\n      'ciphers'             =\u003e join($ciphers_enabled, \",\"),\n\n      'keystorePass'        =\u003e $keystore_pass.unwrap,\n      'keystoreFile'        =\u003e $keystore_path,\n    },\n  }\n```\n\n\u003e See also: [SSL/TLS Configuration HOW-TO](https://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html)\n\n### I want to deploy WAR files\n\nAdd the following to any existing installation with your own war source:\n```puppet\ntomcat::war { 'sample.war':\n  catalina_base =\u003e '/opt/tomcat9/first',\n  war_source    =\u003e '/opt/tomcat9/webapps/docs/appdev/sample/sample.war',\n}\n```\n\nThe name of the WAR file must end with `.war`.\n\nThe `war_source` can be a local path or a `puppet:///`, `http://`, or `ftp://` URL.\n\n### I want to remove some configuration\n\nDifferent configuration defined types will allow an ensure parameter to be passed, though the name may vary based on the defined type.\n\nTo remove a connector, for instance, the following configuration ensure that it is absent:\n\n```puppet\ntomcat::config::server::connector { 'tomcat9-jsvc':\n  connector_ensure =\u003e 'absent',\n  catalina_base    =\u003e '/opt/tomcat9/first',\n  port             =\u003e '8080',\n  protocol         =\u003e 'HTTP/1.1',\n}\n```\n\n### I want to manage a Connector or Realm that already exists\n\nDescribe the Realm or HTTP Connector element using `tomcat::config::server::realm` or `tomcat::config::server::connector`, and set `purge_realms` or `purge_connectors` to `true`.\n\n```puppet\ntomcat::config::server::realm { 'org.apache.catalina.realm.LockOutRealm':\n  realm_ensure =\u003e 'present',\n  purge_realms =\u003e true,\n}\n```\n\nPuppet removes any existing Connectors or Realms and leaves only the ones you've specified.\n\n## Reference\n\nSee [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-tomcat/blob/main/REFERENCE.md)\n\n## Limitations\n\nFor an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-tomcat/blob/main/metadata.json)\n\nThe `tomcat::config::server*` defined types require Augeas version 1.0.0 or newer.\n\n### Multiple Instances\n\nSome Tomcat packages do not let you install more than one instance. You can avoid this limitation by installing Tomcat from source.\n\n## License\n\nThis codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing.\n\n## Development\n\nPuppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.\n\nWe want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.\n\nFor more information, see our [module contribution guide.](https://puppet.com/docs/puppet/latest/contributing.html)\n\n### Contributors\n\nTo see who's already involved, see the [list of contributors.](https://github.com/puppetlabs/puppetlabs-tomcat/graphs/contributors)\n\n### Running tests\n\nThis project contains tests for both [rspec-puppet](http://rspec-puppet.com/) and [beaker-rspec](https://github.com/puppetlabs/beaker-rspec) to verify functionality. For in-depth information, please see their respective documentation.\n\nQuickstart:\n\n```bash\ngem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rspec spec/acceptance\nRS_DEBUG=yes bundle exec rspec spec/acceptance\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-tomcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-tomcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-tomcat/lists"}