Table of Contents
To understand the best practices of how to customize an existing Chef-based ServerTemplate such as one from one of the LTS or Infinity releases.
This document explains how to customize an existing ServerTemplate by making one or more of the following changes.
Although there are several different ways to customize a Chef-based ServerTemplate, this document will focus on some of the recommended best practices that you can follow and/or incorporate into your own design conventions for modifying existing ServerTemplates.
node.override[‘rails_app’][‘git_repo’] = ‘firstname.lastname@example.org:example_org/example.git’
attribute "ACME-app_php/new_attribute", :display_name => "Attribute Name", :description => "This attribute..." + " Example: option1", :choice => ["option1", "option2"], :required => "optional", :default => "option1", :recipes => ["acme-app_php::default"],
If the Chef cookbook that you want to modify is NOT properly parameterized (i.e. the parameter that you want to change is not defined as a Chef attribute in the cookbook), you can use 'chef-rewind' to make the modification.
template "/etc/php.conf" do source "php.conf.erb" mode "0755" end
edit "template[/etc/php.conf]" do source "acme-php.conf.erb" mode "0755" end
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.