Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

esri-tomcat (12) Versions 0.2.1

Installs/Configures esri-tomcat

Policyfile
Berkshelf
Knife
cookbook 'esri-tomcat', '= 0.2.1', :supermarket
cookbook 'esri-tomcat', '= 0.2.1'
knife supermarket install esri-tomcat
knife supermarket download esri-tomcat
README
Dependencies
Changelog
Quality 33%

layout: default
title: "esri-tomcat cookbook"
category: cookbooks
item: esri-tomcat
version: 0.2.1

latest: true

esri-tomcat cookbook

This cookbook installs and configures Apache Tomcat for use with ArcGIS Web Adaptor.

Requirements

Platforms

  • Ubuntu Server 18.04 and 20.04 LTS
  • Red Hat Enterprise Linux Server 8
  • SUSE Linux Enterprise Server 15
  • Oracle Linux 8

Dependencies

The following cookbooks are required:
* tomcat
* openssl

Attributes

General

  • node['tomcat']['version'] = Tomcat version to install. Default is 9.0.48.
  • node['tomcat']['instance_name'] = Tomcat instance name. Default is arcgis.
  • node['tomcat']['install_path'] = Tomcat installation directory. Default is /opt/tomcat_INSTANCENAME_VERSION.
  • node['tomcat']['tarball_path'] = Tomcat tarball archive path. Default is <Chef file cache path>/apache-tomcat-<tomcat version>.tar.gz.
  • node['tomcat']['verify_checksum'] = Verify checksum of downloaded Tomcat tarball. Default value is true.
  • node['tomcat']['forward_ports'] = If set to true, default recipe includes the 'firewalld' or 'iptables' recipe. Default value is true.
  • node['tomcat']['firewalld']['init_cmd'] = The firewalld initialization command. The default command is firewall-cmd --zone=public --permanent --add-port=0-65535/tcp.
  • node['tomcat']['create_symlink'] = Create symlink at node['tomcat']['symlink_path'] to node['tomcat']['install_path']. Default is true.
  • node['tomcat']['symlink_path'] = Full path to where the symlink will be created targeting node['tomcat']['install_path']. Default path is /opt/tomcat_<instance name>.
  • node['tomcat']['tomcat_user_shell'] = Shell of the tomcat user. Default is /bin/false.
  • node['tomcat']['create_user'] = Create the specified tomcat user within the OS. Default is true.
  • node['tomcat']['create_group'] = Create the specified tomcat group within the OS. Default is true.
  • node['tomcat']['user'] = User to run tomcat as. Default is tomcat_<instance name>.
  • node['tomcat']['group'] = Group of the tomcat user. Default is tomcat_<instance name>.

SSL/TLS

  • node['tomcat']['keystore_file'] = Optional: Path to the keystore file. If not provided, a new file and a self-signed certificate will be created.
  • node['tomcat']['keystore_password'] = Optional: Password to the keystore.
  • node['tomcat']['ssl_enabled_protocols'] = SSL protocols of the HTTPS listener. Default is TLSv1.3,TLSv1.2.
  • node['tomcat']['domain_name'] = Domain name for generated self-signed SSL certificate. Default is Fully Qualified Domain Name.

OpenJDK

  • node['java']['version'] = Major Java version. Default version is 11.
  • node['java']['tarball_uri'] = JDK tarball URI. Default URI is https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz.
  • node['java']['tarball_path'] = JDK tarball local path. Default path is <file_cache_path>/openjdk-11_linux-x64_bin.tar.gz.
  • node['java']['install_path'] = JDK installation path. Default path is /opt.

Recipes

configure_ssl

Configures the HTTPS listener in Apache Tomcat application server.

{
  "tomcat": {
    "version" : "9.0.48",
    "instance_name" : "arcgis",
    "user": "tomcat_arcgis",
    "group": "tomcat_arcgis",
    "install_path" : "/opt/tomcat_arcgis_9.0.48",
    "keystore_type" : "PKCS12",
    "keystore_file" : "/tomcat_arcgis/conf/resources/sslcerts/sslcert.pfx",
    "keystore_password": "<password>",
    "domain_name": "domain.com",
    "ssl_enabled_protocols" : "TLSv1.2,TLSv1.1,TLSv1"
  },
  "run_list" : [
    "recipe[esri-tomcat::configure_ssl]"
  ]
}

Note: If the specified keystore file does not exist, the recipe generates a self-signed SSL certificate for the specified domain.

default

Installs Apache Tomcat and configures the HTTPS listener. If the node['tomcat']['forward_ports'] attribute is true (default value), the recipe also configures port forwarding (80 to 8080 and 443 to 8443) using the iptables or firewalld recipes.

{
  "tomcat": {
    "version" : "9.0.48",
    "instance_name" : "arcgis",
    "user": "tomcat_arcgis",
    "group": "tomcat_arcgis",
    "install_path" : "/opt/tomcat_arcgis_9.0.48",
    "keystore_type" : "PKCS12",
    "keystore_file" : "/tomcat_arcgis/conf/resources/sslcerts/sslcert.pfx",
    "keystore_password": "<password>",
    "domain_name": "domain.com",
    "ssl_enabled_protocols" : "TLSv1.2,TLSv1.1,TLSv1",
    "tarball_path": "/opt/software/archives/apache-tomcat-9.0.48.tar.gz",
    "forward_ports": true
  },
  "run_list" : [
    "recipe[esri-tomcat]"
  ]
}

Note: If the specified keystore file does not exist, the recipe generates a self-signed SSL certificate for the specified domain.

firewalld

Configures port forwarding (80 to 8080 and 443 to 8443) using FirewallD.

Note: If the firewalld service was started by the recipe, the recipe runs the script specified by node['tomcat']['firewalld']['init_cmd'], which, by default, opens all the TCP ports on the machine.

{
  "tomcat": {
    "firewalld": {
      "init_cmd": "firewall-cmd --zone=public --permanent --add-port=0-65535/tcp"
    }
  },
  "run_list" : [
    "recipe[esri-tomcat::firewalld]"
  ]
}

install

Installs Apache Tomcat application server.

{
  "tomcat": {
    "version" : "9.0.48",
    "instance_name" : "arcgis",
    "user": "tomcat_arcgis",
    "group": "tomcat_arcgis",
    "install_path" : "/opt/tomcat_arcgis_9.0.48",
    "tarball_path": "/opt/software/archives/apache-tomcat-9.0.48.tar.gz"
  },
  "run_list" : [
    "recipe[esri-tomcat::install]"
  ]
}

iptables

Configures port forwarding (80 to 8080 and 443 to 8443) using iptables.

{
  "run_list" : [
    "recipe[esri-tomcat::iptables]"
  ]
}

openjdk

Installs OpenJDK for Apache Tomcat from a local or remote tarball.

{
  "java": {
    "version": "11",
    "tarball_path": "/opt/software/archives/openjdk-11_linux-x64_bin.tar.gz"
  },
  "run_list": [
    "recipe[esri-tomcat::openjdk]"
  ]
}

Dependent cookbooks

tomcat >= 3.2.0
openssl ~> 8.5
iptables ~> 7.1

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

esri-tomcat cookbook CHANGELOG

This file is used to list changes made in each version of the esri-tomcat cookbook.

0.2.1

  • Added new attributes to control tomcat user and group creation.

0.2.0

  • Updated HTTPS connector in server.xml.

0.1.9

  • Added support for Apache Tomcat 9.
  • Added support for new linux platforms.

0.1.8

  • Added iptables, firewalld, and openjdk recipes.

0.1.7

  • Disabled AJP port connector.

0.1.6

  • Added tarball_path attribute.

0.1.5

  • Updated and locked versions of dependent cookbooks.

0.1.4

  • Install Tomcat 8.0.53 as default.
  • Use openjdk for test kitchen.

0.1.3

  • Add ec2 test kitchen.

0.1.2

  • Update tomcat dependency version > 2.5.2
  • Fix chef 14 deprecation warnings
  • Update kitchen to use chef 13

0.1.1

  • Add additional guard for tomcat_install resource
  • Fix some rubocop offenses

0.1.0

  • Installs and configures Apache Tomcat for using with ArcGIS Web Adaptor

Collaborator Number Metric
            

0.2.1 passed this metric

Contributing File Metric
            

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Cookstyle Metric
            

0.2.1 failed this metric

Chef/Correctness/InvalidPlatformInCase: Use valid platform values in case statements. (https://docs.chef.io/workstation/cookstyle/chef_correctness_invalidplatformincase): esri-tomcat/recipes/default.rb: 26
Chef/Correctness/InvalidPlatformInCase: Use valid platform values in case statements. (https://docs.chef.io/workstation/cookstyle/chef_correctness_invalidplatformincase): esri-tomcat/recipes/iptables.rb: 43
Chef/Modernize/DependsOnOpensslCookbook: Don't depend on the `openssl` cookbook which was made obsolete by Chef Infra Client 14.4. All `openssl_*` resources are now included directly in Chef Infra Client. (https://docs.chef.io/workstation/cookstyle/chef_modernize_dependsonopensslcookbook): esri-tomcat/metadata.rb: 11
Chef/Modernize/RespondToInMetadata: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later (https://docs.chef.io/workstation/cookstyle/chef_modernize_respondtoinmetadata): esri-tomcat/metadata.rb: 25
Chef/Modernize/RespondToInMetadata: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later (https://docs.chef.io/workstation/cookstyle/chef_modernize_respondtoinmetadata): esri-tomcat/metadata.rb: 26
Chef/RedundantCode/LongDescriptionMetadata: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata): esri-tomcat/metadata.rb: 6
Chef/RedundantCode/RecipeMetadata: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata): esri-tomcat/metadata.rb: 18
Chef/RedundantCode/RecipeMetadata: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata): esri-tomcat/metadata.rb: 19
Chef/RedundantCode/RecipeMetadata: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata): esri-tomcat/metadata.rb: 20
Chef/RedundantCode/RecipeMetadata: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata): esri-tomcat/metadata.rb: 21
Chef/RedundantCode/RecipeMetadata: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata): esri-tomcat/metadata.rb: 22
Chef/RedundantCode/RecipeMetadata: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata): esri-tomcat/metadata.rb: 23
Chef/RedundantCode/UseCreateIfMissing: Use the :create_if_missing action instead of not_if with a ::File.exist(FOO) check. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_usecreateifmissing): esri-tomcat/recipes/openjdk.rb: 23
Chef/Sharing/InvalidLicenseString: Cookbook metadata.rb does not use a SPDX compliant license string or "all rights reserved". See https://spdx.org/licenses/ for a complete list of license identifiers. (https://docs.chef.io/workstation/cookstyle/chef_sharing_invalidlicensestring): esri-tomcat/metadata.rb: 4

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric
            

0.2.1 passed this metric

Testing File Metric
            

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number