cookbook 'tomcat-all', '~> 0.2.0', :supermarket
tomcat-all (1) Versions 0.2.0 Follow7
Installs/Configures tomcat
cookbook 'tomcat-all', '~> 0.2.0'
knife supermarket install tomcat-all
knife supermarket download tomcat-all
tomcat-all cookbook
This cookbook will install tomcat using apache's binaries and extract it to the desired path.
Tested with test-kitchen + serverspec:
- CentOS 6.4 + Tomcat 7.0.53
- Ubuntu 12.04 + Tomcat 7.0.53
Requirements
Developed using Chef Development Kit 0.1.0 Chef-client 11.12.4 Vagrant 1.6.3
Usage
Simply include the tomcat-all recipe wherever you would like, such as a run list (recipe[tomcat-all]) or a cookbook (include_recipe 'tomcat-all'). By default, Oracle JDK 1.7 (JDK & JAVA_HOME) and Tomcat 7 will be installed.
This recipe will also create a custom server.xml, catalina.sh and init script configured with the bellow default settings if no other settings is provided.
Attributes
Default values provided as example only
['tomcat-all']['user'] = 'tomcat'
- The user under tomcat will run['tomcat-all']['group'] = 'tomcat'
- The group under tomcat will run['tomcat-all']['version'] = '7.0.53'
- Tomcat's version to be installed['tomcat-all']['install_directory'] = '/opt'
- The root directory where tomcat will be installed. Bellow this directory this recipe will create a symlink tomcat and extract to a folder called 'tomcat-#{version}). Example: creates/opt/tomcat
as a symbolic link to/opt/tomcat-7.0.53
(tomcat actual folder)['tomcat-all']['shutdown_port'] = '8005'
- Tomcat shutdown port (Set to '-1' to disable remote shutdown)['tomcat-all']['port'] = '8080'
- Port where tomcat will listen['tomcat-all']['max_threads'] = '100'
- Max threads on tomcat threadpool['tomcat-all']['min_spare_threads'] = '10'
- Min spare threads on tomcat threadpool['tomcat-all']['java_opts'] = '-d64 -server -Djava.awt.headless=true'
- JAVA_OPTS configuration
Example Config
default_attributes(
"java" => {
"install_flavor" => "oracle",
"jdk_version" => 7,
"oracle" => {
"accept_oracle_download_terms" => true
}
},
"tomcat-all" => {
"user" => "tomcat",
"group" => "tomcat",
"version" => "7.0.53",
"install_directory" => "/opt",
"shutdown_port" => "-1",
"port" => "8080",
"max_threads" => "500",
"min_spare_threads" => "100",
"java_opts" => "-d64 -server -Djava.awt.headless=true -Xms3072m -Xmx3072m -XX:MaxPermSize=512m"
}
)
Recipes
tomcat-all::default
Author
Author:: Roberto Moutinho (robertomoutinho@gmail.com)
Dependent cookbooks
ark ~> 0.8.2 |
java ~> 1.22.0 |
apt ~> 2.4.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.2.0 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.2.0 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
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: tomcat-all/metadata.rb:1
FC065: Ensure source_url is set in metadata: tomcat-all/metadata.rb:1
FC066: Ensure chef_version is set in metadata: tomcat-all/metadata.rb:1
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Publish Metric
0.2.0 passed this metric
Supported Platforms Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 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.0 passed this metric
0.2.0 failed this metric
0.2.0 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
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: tomcat-all/metadata.rb:1
FC065: Ensure source_url is set in metadata: tomcat-all/metadata.rb:1
FC066: Ensure chef_version is set in metadata: tomcat-all/metadata.rb:1
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Publish Metric
0.2.0 passed this metric
Supported Platforms Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 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.0 passed this metric
0.2.0 failed this metric
FC065: Ensure source_url is set in metadata: tomcat-all/metadata.rb:1
FC066: Ensure chef_version is set in metadata: tomcat-all/metadata.rb:1
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 passed this metric
Publish Metric
0.2.0 passed this metric
Supported Platforms Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 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.0 passed this metric
0.2.0 passed this metric
0.2.0 passed this metric
Testing File Metric
0.2.0 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.0 passed this metric
0.2.0 failed this metric
0.2.0 passed this metric