Changes between Version 40 and Version 41 of CloudPlugin


Ignore:
Timestamp:
May 10, 2011 11:34:31 PM (3 years ago)
Author:
robguttman
Comment:

databag -> index

Legend:

Unmodified
Added
Removed
Modified
  • CloudPlugin

    v40 v41  
    4545    You can alternatively use the Trac Web Admin GUI to enable any or all rules. 
    4646 
    47  3. Configure the main {{{trac.ini}}} section.  A minimal configuration would look like this: 
     47 3. Configure the main {{{trac.ini}}} section.  A minimal configuration would look like this (although several are optional): 
    4848    {{{ 
    4949    [cloud] 
     
    134134field.run_list = multiselect 
    135135field.run_list.label = Roles 
    136 field.run_list.databag = roles  # special token 
     136field.run_list.index = role 
    137137field.run_list.handler = RunListHandler 
    138138field.ec2.placement_availability_zone = select 
     
    145145Each {{{field.*}}} option must map exactly to its chef [http://wiki.opscode.com/display/chef/Attributes attribute] name.  For example, {{{ec2.placement_availability_zone}}} above maps to the {{{ec2}}} attribute namespace and the {{{placement_availability_zone}}} attribute within that namespace in chef.  It's defined as a {{{select}}} field with a display label and several options separated by a pipe ({{{|}}}) just like Trac custom fields.  There are some important differences to Trac custom fields, however: 
    146146 
    147  * A field can define a data bag instead of options 
     147 * A field can define a search index instead of options 
    148148 * A field can define a "field handler" 
    149149 
    150 ===== Data Bags for options ===== 
    151 You may prefer to define a select (or multiselect) field's options by using a chef [http://wiki.opscode.com/display/chef/Data+Bags data bag] instead of listing them in the trac.ini file.  For example, a field defined like this: 
     150===== Search indexes for options ===== 
     151You may prefer to define a select (or multiselect) field's options by using a chef search index (e.g., the built-in {{{node}}} or {{{role}}}, or a [http://wiki.opscode.com/display/chef/Data+Bags data bag]) instead of listing them in the trac.ini file.  For example, a field defined like this: 
    152152{{{ 
    153153[cloud.instance] 
     
    155155field.ec2.ami_id = select 
    156156field.ec2.ami_id.label = Image ID 
    157 field.ec2.ami_id.databag = ec2_ami_id 
    158 }}} 
    159  
    160 will query chef for and use the {{{ec2_ami_id}}} data bag items.  The individual data bag items should be formatted like this: 
     157field.ec2.ami_id.index = ec2_ami_id 
     158}}} 
     159 
     160will query chef for and use a {{{ec2_ami_id}}} data bag items.  The individual data bag items should be formatted like this: 
    161161{{{ 
    162162{