Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "configurations" : [
    {
      "configuration-type" : {
          "property-name"  : "property-value",
          "property-name2" : "property-value"
      }
    },
    {
      "configuration-type2" : {
          "property-name" : "property-value"
      }
    }
    ...
  ],
  "host_groups" : [
    {
      "name" : "host-group-name",
      "components" : [
        {
          "name" : "component-name"
        },
        {
          "name" : "component-name2"
        }
        ...
      ],
      "configurations" : [
	    {
          "configuration-type" : {
            "property-name" : "property-value"
          }
        }
        ...
      ],
      "cardinality" : "1"
    }
  ],
  "Blueprints" : {
    "stack_name" : "HDP",
    "stack_version" : "2.1",
    }
}
Blueprint Field Descriptions
"security" : {
         "type" : "(NONE | KERBEROS)",
         "kerberos_descriptor" : {
             ...
          }
     }
  }
}
Blueprint Field Descriptions
  • configurations : A list of configuration maps keyed by configuration type. An example of a configuration type is "core-site".  When specified at the top level, configurations are applied at cluster scope and override default values for the cluster.  When specified within a "host_groups" element, configurations are applied at the host level for all hosts mapped to the host group.  Host scoped configurations override cluster scoped configuration for all hosts mapped to the host group.  The configurations element is optional at both levels.
  • host_groups : A list of host groups which define topology (components) and configuration for all hosts which are mapped to the host group.  At least one host group must be specified.
    • name : The name of the host group.  Mandatory field which is referred to in the cluster creation body when mapping physical hosts to host groups.
    • components : A list of components which will run on all hosts that are mapped to the host group.  At least one component must be specified for each host group.
    • cardinality : This field is optional and intended to provide a hint to the deployer as to how many instances of a particular host_group can be instantiated; it has no bearing on how the cluster is deployed. When a blueprint is exported for an existing cluster, this field will indicate the number of hosts that correspond the the host group in that cluster.
  • Blueprints : Blueprint and stack information
    • stack_name : The name of the stack.  All
  • configurations : A list of configuration maps keyed by configuration type. An example of a configuration type is "core-site".  When specified at the top level, configurations are applied at cluster scope and override default values for the cluster.  When specified within a "host_groups" element, configurations are applied at the host level for all hosts mapped to the host group.  Host scoped configurations override cluster scoped configuration for all hosts mapped to the host group.  The configurations element is optional at both levels.
  • host_groups : A list of host groups which define topology (components) and configuration for all hosts which are mapped to the host group.  At least one host group must be specified.
    • name : The name of the host group.  Mandatory field which is referred to in the cluster creation body when mapping physical hosts to host groups.
    • components : A list of components which will run on all hosts that are mapped to the host group.  At least one component must be specified for each host group.
    • cardinality : This field is optional and intended to provide a hint to the deployer as to how many instances of a particular host_group can be instantiated; it has no bearing on how the cluster is deployed. When a blueprint is exported for an existing cluster, this field will indicate the number of hosts that correspond the the host group in that cluster.
  • Blueprints : Blueprint and stack information
    • stack_name : The name of the stack.  All stacks currently shipped with Ambari have the name "HDP".  This is a required field.
    • stack_version : The version of the stack.  For example: "1.3.2" or "2.1".  This is a required field.  When deploying a cluster using a blueprint, the stack definition identified in the blueprint must be available to the Ambari instance in the new cluster.
    • blueprint_name : Optional field which specifies that name of the blueprint.  Typically the name of the blueprint is specified in the URL of the REST invocation.  The only reason to specify the name in the blueprint is when creating multiple blueprints via a single REST invocation.
Cluster Creation Template Structure

A Cluster Creation Template is in JSON format and has the following structure:

    • security : Optional block to specify security settings. Supported security types are NONE and KERBEROS. In case of KERBEROS, users have the option to embed a valid kerberos descriptor in field kerberos_descriptor or as an alternative they may reference a previously saved kerberos descriptor using kerberos_descriptor_reference field. 
Cluster Creation Template Structure

A Cluster Creation Template is in JSON format and has the following structure:

Code Block
{
  "blueprint" : "blueprint-name",
  "default_password" : "super-secret-password",
  "configurations" : [
    {
      "configuration-type" : {
        "property-name" : "property-value"
      }
    }
    ...
  ],     
  "host_groups" :[
    { 
      "name" : "host-group-name",  
    
Code Block
{
  "blueprint" : "blueprint-name",
  "default_password" : "super-secret-password",
  "configurations" : [
        {
          "configuration-type" : {
            "property-name" : "property-value"
          }
        }
    ...
  ],     
      "host_groupshosts" : [          
        { 
          "namefqdn" : "host-group-name",  .domain.com"
      "configurations" : [},
        { 
          "configuration-typefqdn" : {"host2.domain.com"
        }
    "property-name" : "property-value"    ...
      ]
    }
    ...
  ],
  "credentials" : }[
      ],{
     
   "alias" :  "hosts" : [kdc.admin.credential",
        "principal" : "{PRINCIPAL}",
  
      "key" : "{ KEY}",
          "fqdntype" : "host.domain.com(TEMPORARY | PERSISTENT)"
        },
  ], 
  "security" :  { 
          "fqdntype" : "host2.domain.com"(NONE | KERBEROS)",
        } "kerberos_descriptor" : {
             ...
      ]
    }
    ...}
  ]}
}
Info

Starting in Ambari version 2.1.0, it is possible to specify a host count and a host predicate in the cluster creation template host group section instead of a host name.

Code Block
{
  "name" : "group-using-host-count",
  "host_count" : 5,
  "host_predicate" : "Hosts/os_type=centos6&Hosts/cpu_count=2"
} 

...

  • blueprint : Name of the blueprint that defines the cluster to be deployed.  Blueprint must already exist.  Required field.
  • default_password : Optional field which specifies a default password for all required passwords which are not specified in the blueprint or cluster creation template configurations.
  • configurations : A list of configuration maps keyed by configuration type. An example of a configuration type is "core-site".  When specified at the top level, configurations are applied at cluster scope and override default values for the cluster.  When specified within a "host_groups" element, configurations are applied at the host level for all hosts mapped to the host group.  Host scoped configurations override cluster scoped configuration for all hosts mapped to the host group.  All cluster scoped and host group scoped configurations specified here override configurations specified in the corresponding blueprint.  The configurations element is optional at both levels. 
  • config_recommendation_strategy : Optional field which specifies strategy for how configuration recommendations may be applied to a cluster’s configuration. Recommended configurations gathered by the response of the stack advisor. Available from Ambari 2.1.3. 
    • NEVER_APPLY :  Configuration recommendations are ignored with this option. (This is the default)
    • ONLY_STACK_DEFAULTS_APPLY : Applies only on the default configurations for all included services.
    • ALWAYS_APPLY : Applies on all configuration properties.
  • host_groups : A list of host groups being deployed to the cluster.  At least one host group must be specified.
    • name : Required field which must correspond to a name of a host group in the associated blueprint.
    • hosts : List of host mapping information
      • fqdn : Fully qualified domain name for each host that is being mapped to the host group.  At least one host must be specified
    • host_count : The number of hosts that should be mapped to this host group. This can be specified instead of concrete host names.  If no host_predicate is specified, any host that isn't explicitly mapped to another host group is available to be mapped to this host group.  Available as of Ambari 2.1.0. 
    • host_predicate : Optional field which is used together with host_count to control which hosts are mapped to the host group.  This is useful in supporting host 'flavors' where different host groups require different host types.  The default predicate matches all hosts which aren't explicitly mapped to another host group.  The syntax of the predicate is the standard Ambari API query syntax applied against the "api/v1/hosts" endpoint.  Available as of Ambari 2.1.0.
  • credentials : Optional block to add kdc.admin credentials. which is required in case of KERBEROS.
  • security : Optional block to specify security settings. Supported security types are NONE and KERBEROS. In case of KERBEROS, users have the option to embed a valid kerberos descriptor in field kerberos_descriptor or as an alternative they may reference a previously saved kerberos descriptor using kerberos_descriptor_reference field. 
Configurations
Default Values and Overrides

...