GithubHelp home page GithubHelp logo

grahamlyus / chef-haproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mentorembedded/chef-haproxy

0.0 2.0 0.0 160 KB

Development repository for Opscode Cookbook haproxy

Home Page: http://community.opscode.com/cookbooks/haproxy

License: Apache License 2.0

Ruby 100.00%

chef-haproxy's Introduction

Description

Installs haproxy and prepares the configuration location.

Requirements

Platform

Tested on Ubuntu 8.10 and higher.

Cookbooks:

Attributes

  • node['haproxy']['incoming_port'] - sets the port on which haproxy listens

  • node['haproxy']['member_port'] - the port that member systems will be listening on, default 80

  • node['haproxy']['enable_admin'] - whether to enable the admin interface. default true. Listens on port 22002.

  • node['haproxy']['app_server_role'] - used by the app_lb recipe to search for a specific role of member systems. Default webserver.

  • node['haproxy']['balance_algorithm'] - sets the load balancing algorithm; defaults to roundrobin.

  • node['haproxy']['member_max_connections'] - the maxconn value to be set for each app server

  • node['haproxy']['x_forwarded_for'] - if true, creates an X-Forwarded-For header containing the original client's IP address. This option disables KeepAlive.

  • node['haproxy']['enable_ssl'] - whether or not to create listeners for ssl, default false

  • node['haproxy']['ssl_member_port'] - the port that member systems will be listening on for ssl, default 8443

  • node['haproxy']['ssl_incoming_port'] - sets the port on which haproxy listens for ssl, default 443

  • node['haproxy']['source']['enabled'] - installs from source if true, from package if false. default: false

  • node['haproxy']['source']['version'] - full version of haproxy to install from source

  • node['haproxy']['source']['version_branch'] - version branch of haproxy to install from source (1.3, 1.4, 1.5, etc.)

  • node['haproxy']['source']['user'] - user to install haproxy as

  • node['haproxy']['source']['install_prefix_root'] - prefix root under which to install haproxy from source

Usage

Use either the default recipe or the app_lb recipe.

When using the default recipe, modify the haproxy.cfg.erb file with listener(s) for your sites/servers.

The app_lb recipe is designed to be used with the application cookbook, and provides search mechanism to find the appropriate application servers. Set this in a role that includes the haproxy::app_lb recipe. For example,

name "load_balancer"
description "haproxy load balancer"
run_list("recipe[haproxy::app_lb]")
override_attributes(
  "haproxy" => {
    "app_server_role" => "webserver"
  }
)

The search uses the node's chef_environment. For example, create environments/production.rb, then upload it to the server with knife

% cat environments/production.rb
name "production"
description "Nodes in the production environment."
% knife environment from file production.rb

License and Author

Author:: Joshua Timberman ([email protected])

Copyright:: 2009-2011, Opscode, 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.

chef-haproxy's People

Contributors

freerobby avatar grahamlyus avatar miketheman avatar nathenharvey avatar schisamo avatar

Watchers

 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.