Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

fix: silverware node_util tries extra hard to get the cloud-assigned …

…private hostname when asked for a private hostname

Squashed commit of the following:

commit 96c38f9
Author: Chris Howe <howech@infochimps.com>
Date:   Tue Apr 1 10:35:19 2014 -0500

    Made the private_hostname try to look for the cloud-private hostname.

Change-Id: I00ef3f35caf2573911718c2f4f26aca36b284ff8
latest commit 082f495c59
Chris Howe howech authored April 01, 2014
..
Octocat-spinner-32 attributes silverware: cleaning up call-signs and deprecations (see infochimps-l… March 27, 2013
Octocat-spinner-32 definitions Removing owner and group declaration from containing directory defini… November 08, 2012
Octocat-spinner-32 libraries fix: silverware node_util tries extra hard to get the cloud-assigned … April 01, 2014
Octocat-spinner-32 recipes fix: silverware no longer deletes old announcements March 03, 2014
Octocat-spinner-32 spec updated test fixture for silverware February 20, 2012
Octocat-spinner-32 .rspec metachef cookbook renamed silverware February 17, 2012
Octocat-spinner-32 .watchr metachef cookbook renamed silverware February 17, 2012
Octocat-spinner-32 Gemfile metachef cookbook renamed silverware February 17, 2012
Octocat-spinner-32 README.md Document existing feature September 16, 2013
Octocat-spinner-32 VERSION fix: silverware was adding itself twice to list of discovered servers March 25, 2014
Octocat-spinner-32 metadata.rb silverware: adding conflict notice with metachef (predecessor) January 25, 2013
README.md

Overview

The Silverware Cookbook is part of the Ironfan Pantry cookbooks. Silverware Cookbook coordinates discovery of services, for example "list all the machines for awesome_webapp, that I might load balance them", and aspects, for example, "list all components that write logs, that I might logrotate them, or that I might monitor the free space on their volumes".


Silverware Chef Cookbook

Cluster orchestration -- coordinates discovery, integration and decoupling of cookbooks

Attributes are scoped by cookbook and then by component.

  • If I declare announce(:redis), it will look in node[:redis].
  • If I declare announce(:hadoop, :namenode), it will look in node[:hadoop] for cookbook-wide concerns and node[:hadoop][:namenode] for component-specific concerns.
  • The cookbook scope is always named for its cookbook. Its attributes live innode[:cookbook_name]. If everything in the cookbook shares a concern, it sits at cookbook level. So the Hadoop log directory (shared by all its components) is at (scratch_root)/hadoop/log.
  • If there is only one component, it can be implicitly named for its cookbook. In this case, it is omitted: the component attributes live in node[:cookbook_name] (which is the same as the component name).
  • If there are multiple components, they will live in node[:cookbook_name][:component_name] (eg [:hadoop][:namenode] or [:flume][:master].

Discovery

Allow nodes to discover the location for a given service at runtime, adapting when new services register.

Operations:

  • register for a service. A timestamp records the last registry.
  • discover all chef nodes that have registered for the given service.
  • discover the most recent chef node for that service.
  • get the 'public_ip' for a service -- the address that nodes in the larger world should use
  • get the 'private_ip' for a service -- the address that nodes on the local subnet / private cloud should use
  • get the 'private_hostname' for a service -- the hostname that nodes on the local subnet / private cloud should use

Implementation

Nodes register a service by calling announce(<service>[,<component>]), which adds a hash to node[:announces][][], containing 'timestamp' (the time of registry) and other metadata passed in. Nodes discover services by calling discover(<service>[,<component>[,<realm>]]), where realm is the scope of the discovery (the current cluster, by default).

Recipes

  • default - Base configuration for silverware

Integration

Supports platforms: Debian and Ubuntu

Attributes

  • [:silverware][:conf_dir] - (default: "/etc/silverware")
  • [:silverware][:log_dir] - (default: "/var/log/silverware")
  • [:silverware][:home_dir] - (default: "/etc/silverware")
  • [:silverware][:user] - (default: "root")
  • [:users][:root][:primary_group] - (default: "root")

License and Author

Author:: Philip (flip) Kromer - Infochimps, Inc (coders@infochimps.com) Copyright:: 2011, Philip (flip) Kromer - Infochimps, 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.

readme generated by ironfan's cookbook_munger

Something went wrong with that request. Please try again.