Giter Club home page Giter Club logo

passenger_apache2's Introduction

passenger_apache2 Cookbook

Installs passenger for Apache 2.

Requirements

Requires Chef 0.10.10+ and Ohai 0.6.10+ for platform_family attribute use.

Platforms

Tested on the following platforms:

  • Ubuntu 10.04, 12.04
  • CentOS 5, 6

The source install method was used on CentOS. See the .kitchen.yml file for platform testing matrix.

This cookbook may work on other platforms with or without local modification.

Note: This cookbook is not yet supported on Ubuntu 14.04, which uses Apache HTTPD 2.4.

Cookbooks

The following cookbooks are used as dependencies:

Attributes

  • node['passenger']['version'] - Specify the version of passenger to install.

  • node['passenger']['max_pool_size'] - Sets PassengerMaxPoolSize in the Apache module config.

  • node['passenger']['root_path'] - The location of the passenger gem.

  • node['passenger']['ruby_bin'] - Sets PassengerRuby in the Apache module config and is used for passenger module configuration. Defaults to node['languages']['ruby']['ruby_bin'].

  • node['passenger']['module_path'] - The location of the compiled passenger apache module.

  • node['passenger']['install_method'] - Includes the "source" (gem install) or "package" recipe. Default "source."

  • node['passenger']['apache_mpm'] - Override with an "override_attribute" (in a role, environment or with node.override) to "worker" or "threaded" to use apache2-threaded-dev package. Otherwise this assumes prefork.

  • node['passenger']['package']['name'] - Name of the package for passenger, default is nil, so this must be set before using the "package" install method/recipe.

  • node['passenger']['package']['version'] - Specify the version of the passenger package to install. Uses version attribute above by default. To install the version available by default (latest, usually), delete the attribute in a recipe with this line:

  • node['passenger']['install_module'] - Specify the boolean value which decides installing Passenger. Defaults to true, and setting to false skips the installation

    node.set['passenger']['package'].delete('version')

Recipes

default

Installs passenger from gem (source) or package depending on the value of the install_method attribute.

mod_rails

Installs the passenger gem and enables the module in Apache2.

source

Installs passenger as a RubyGem.

package

Installs passenger as a Package.

Set the install_method attribute to package, then set the package['name'] attribute to the correct package for your platform. The recipe does not yet handle adding yum repositories for RHEL platforms, so that should be done in another recipe until COOK-2414 is resolved.

Set the node['passenger']['package']['version'] attribute to the correct value for your system's available package repository if necessary. By default the value is nil which will install the latest package version from the distribution package manager.

Usage

For example, to run a Rails application on passenger:

include_recipe "rails"
include_recipe "passenger_apache2"

web_app "myproj" do
  docroot "/srv/myproj/public"
  server_name "myproj.#{node[:domain]}"
  server_aliases [ "myproj", node[:hostname] ]
  rails_env "production"
end

A sample config template is provided, web_app.conf.erb. If this is suitable for your application, add 'cookbook "passenger"' to the define above to use that template. Otherwise, copy the template to the cookbook where you're using web_app, and modify as needed. The cookbook parameter is optional, if omitted it will search the cookbook where the define is used.

License & Authors

Copyright: 2009-2013, Opscode, Inc
Copyright: 2014, Chef Software, Inc.
Copyright: 2009, 37signals
Copright: 2009, Michael Hale

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.

passenger_apache2's People

Contributors

cap10morgan avatar chrisroberts avatar chulkilee avatar erniebrodeur avatar jtimberman avatar miketheman avatar nathenharvey avatar pho3nixf1re avatar plu avatar ranjib avatar sethvargo avatar shaundomingo avatar simonrobson avatar stevendanna avatar tas50 avatar tf avatar

Watchers

 avatar  avatar

Forkers

dstape

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.