Giter Site home page Giter Site logo

rkondra1 / tomcat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sous-chefs/tomcat

0.0 2.0 0.0 579 KB

Development repository for tomcat Chef cookbook

Home Page: http://supermarket.chef.io/cookbooks/tomcat

License: Apache License 2.0

Ruby 76.69% HTML 3.33% Shell 19.98%

tomcat's Introduction

tomcat Cookbook

Build Status Cookbook Version

Provides resources for installing Tomcat and managing the Tomcat service for use in wrapper cookbooks. Installs Tomcat from tarballs on the Apache.org website and installs the appropriate configuration for your platform's init system.

Requirements

Platforms

  • Debian / Ubuntu derivatives
  • RHEL and derivatives
  • Fedora
  • openSUSE / SUSE Linux Enterprises

Chef

  • Chef 13+

Cookbooks

  • none

Usage

Due to the complexity of Tomcat cookbooks it's not possible to create an attribute driven cookbook that solves everyone's problems. Instead this cookbook provides resources for installing Tomcat and managing the Tomcat service, which are best used in your own wrapper cookbook. The best way to understand how this could be used is to look at the helloworld test recipe located at https://github.com/chef-cookbooks/tomcat/blob/master/test/cookbooks/test/recipes/helloworld_example.rb

Resources

tomcat_install

tomcat_install installs an instance of the tomcat binary direct from Apache's mirror site. As distro packages are not used we can easily deploy per-instance installations and any version available on the Apache archive site can be installed.

properties

  • version: The version to install. Default: 8.0.47
  • install_path: Full path to the install directory. Default: /opt/tomcat_INSTANCENAME_VERSION
  • tarball_base_uri: The base uri to the apache mirror containing the tarballs. Default: 'http://archive.apache.org/dist/tomcat/'
  • checksum_base_uri: The base uri to the apache mirror containing the md5 file. Default: 'http://archive.apache.org/dist/tomcat/'
  • verify_checksum: Whether the checksum should be verified against checksum_base_uri. Default: true.
  • dir_mode: Directory permissions of the install_path. Default: '0750'.
  • tarball_uri: The complete uri to the tarball. If specified would override (tarball_base_uri and checksum_base_uri). checksum will be loaded from "#{tarball_uri}.md5". This attribute is useful, if you are hosting tomcat tarballs from artifact repositories such as nexus.
  • tarball_path: Local path on disk to the tarball. If the file does not exist, or the checksum does not match, it will be downloaded from tarball_uri.
  • tarball_validate_ssl: Validate the SSL certificate, if tarball_uri is using HTTPS. Default true.
  • exclude_docs: Exclude ./webapps/docs from installation. Default true.
  • exclude_examples: Exclude ./webapps/examples from installation. Default true.
  • exclude_manager: Exclude ./webapps/manager from installation. Default: false.
  • exclude_hostmanager: Exclude ./webapps/host-manager from installation. Default: false.
  • tomcat_user: User to run tomcat as. Default: tomcat_INSTANCENAME
  • tomcat_group: Group of the tomcat user. Default: tomcat_INSTANCENAME
  • tomcat_user_shell: Shell of the tomcat user. Default: /bin/false

example

Install an Tomcat 8.0.36 instance named 'helloworld' to /opt/tomcat_helloworld_8_0_36/ with a symlink at /opt/tomcat_helloworld/

tomcat_install 'helloworld' do
  version '8.0.36'
end

Install an Tomcat instance named 'helloworld' from a local tarball to /opt/tomcat_helloworld_8_0_36/ with a symlink at /opt/tomcat_helloworld/

tomcat_install 'helloworld' do
  version '8.0.36'
  verify_checksum false
  tarball_path '/tmp/apache-tomcat-8.0.36.tar.gz'
end

tomcat_service

tomcat_service sets up the installed tomcat instance to run using the appropriate init system (sys-v, upstart, or systemd)

properties

  • install_path: Full path to the install directory. Default: /opt/tomcat_INSTANCENAME
  • env_vars: An array of hashes containing the environmental variables for Tomcat's setenv.sh script. Note: If CATALINA_BASE is not passed it will automatically be added as the first item in the array. Default: [ {'CATALINA_BASE' => '/opt/INSTANCE_NAME/'}, {'CATALINA_PID' => '$CATALINA_BASE/bin/tomcat.pid'} ]
  • service_vars: An array of hashes containing additional systemd directives when setting up a service under systemd.
  • sensitive: Excludes diffs that may expose ENV values from the chef-client logs. Default: false
  • tomcat_user: The user the service runs under
  • tomcat_group: The group the service runs under

actions

  • start
  • stop
  • enable
  • disable
  • restart

example

tomcat_service 'helloworld' do
  action :start
  env_vars [{ 'CATALINA_PID' => '/my/special/path/tomcat.pid' }]
end

License & Authors

Copyright:: 2010-2018, Chef Software, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

tomcat's People

Contributors

tas50 avatar nickpetrovic avatar schisamo avatar elliotkendallucsf avatar ncerny avatar reset avatar sethvargo avatar davidbernick avatar cwebberops avatar juliandunn avatar iennae avatar b0d0nne11 avatar bob2build avatar eheydrick avatar thefynx avatar mengesb avatar guilhem avatar rojomisin avatar ekanaisint avatar rhass avatar nathenharvey avatar mcortesi avatar jolcese avatar alain-odea-vgh avatar karl-fen avatar lloydmeta avatar petracvv avatar vinyar avatar nkadel-skyhook avatar pjelou avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.