...
- Not all configuration properties have valid defaults
- Required properties must be specified by the Blueprint user
- Come in two categories, passwords and non passwords
- Non password required properties are validated at Blueprint creation time
- Required password properties are validated at cluster creation time
- For required password properties, they may be explicitly set in either the Blueprint or Cluster Creation Template configurations or a default password may be specified in the Cluster Creation Template which will be applied to all passwords which have not been explicitly set
- "default_password" : "super-secret-password"
- If required configuration validation fails, a 400 response is returned indicating which properties must be specified
Blueprint Examples
Blueprint Example: Single-Node HDP 2.
...
4 Cluster
- Single-node cluster (c6401.ambari.apache.org)
- HDP 2.0 4 Stack
- Install Core Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper) + Ganglia (metrics) and Nagios (alerts)
Example Blueprint
Code Block |
---|
{ "configurations" : [ { "nagios-env" : { "nagios_contact": "me@my-awesome-domain.example" } } ], "host_groups" : [ { "name" : "host_group_1", "components" : [ { "name" : "NAMENODE" }, { "name" : "SECONDARY_NAMENODE" }, { "name" : "DATANODE" }, { "name" : "HDFS_CLIENT" }, { "name" : "RESOURCEMANAGER" }, { "name" : "NODEMANAGER" }, { "name" : "YARN_CLIENT" }, { "name" : "HISTORYSERVER" }, { "name" : "MAPREDUCE2_CLIENT" }, { "name" : "ZOOKEEPER_SERVER" }, { "name" : "ZOOKEEPER_CLIENT" }, {], "name" "cardinality" : "GANGLIA_SERVER1" }, { "name], "Blueprints" : "NAGIOS_SERVER" { } ], "cardinality"blueprint_name" : "1" } ], "Blueprints" : {single-node-hdfs-yarn", "stack_name" : "HDP", "stack_version" : "2.04" } } |
Note | ||
---|---|---|
In Ambari version 1.6.1 and prior versions, the nagios configuration was specified in a global config and therefore the above blueprint nagios block should change as follows:
|
Register blueprint with Ambari Server
Post the blueprint to the "single-node-hdfs-yarn" resource to the Ambari Server.
Code Block |
---|
POST /api/v1/blueprints/single-node-hdfs-yarn
...
[ Request Body is the example blueprint defined above ]
...
201 - Created |
Example Cluster Creation Template
We are performing a single-node install and the blueprint above has one host group. Therefore, for our cluster instance, we define one host in host_group_1 and reference the single-node-hdfs-yarn blueprint.
Explicit Host Name Example
Code Block |
---|
{
"blueprint" : "single-node-hdfs-yarn",
"default_password" : "my-super-secret-password",
"host_groups" :[
{
"name" : "host_group_1",
"hosts" : [
{
"fqdn" : "c6401.ambari.apache.org"
}
]
}
]
} |
Create Cluster Instance
Post the cluster to the Ambari Server to provision the cluster.
Code Block |
---|
POST /api/v1/clusters/MySingleNodeCluster
...
[ Request Body is above Cluster Creation Template ]
...
202 - Accepted
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/requests/1",
"Requests" : {
"id" : 1,
"status" : "InProgress"
}
} |
Blueprint Example: Multi-Node HDP 2.0 Cluster
Register blueprint with Ambari Server
Post the blueprint to the "single-node-hdfs-yarn" resource to the Ambari Server.
Code Block |
---|
POST /api/v1/blueprints/single-node-hdfs-yarn
...
[ Request Body is the example blueprint defined above ]
...
201 - Created |
Example Cluster Creation Template
We are performing a single-node install and the blueprint above has one host group. Therefore, for our cluster instance, we define one host in host_group_1 and reference the single-node-hdfs-yarn blueprint.
Explicit Host Name Example
Code Block |
---|
{
"blueprint" : "single-node-hdfs-yarn",
"host_groups" :[
{
"name" : "host_group_1",
"hosts" : [
{
"fqdn" : "c6401.ambari.apache.org"
}
]
}
]
} |
Create Cluster Instance
Post the cluster to the Ambari Server to provision the cluster.
Code Block |
---|
POST /api/v1/clusters/MySingleNodeCluster
...
[ Request Body is above Cluster Creation Template ]
...
202 - Accepted
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/requests/1",
"Requests" : {
"id" : 1,
"status" : "InProgress"
}
} |
Blueprint Example: Multi-Node HDP 2.4 Cluster
- Multi-node cluster (three hosts)
- Multi-node cluster (three hosts)
- Host Groups: “master”, “slaves” (one master host, two slave hosts)
- Use HDP 2.0 4 Stack
- Install Core Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper) + Ganglia (metrics) and Nagios (alerts)
Example Blueprint
The blueprint ("multi-node-hdfs-yarn") below defines with two host groups (a "master" and the "slaves") which hosts the various Service components (masters, slaves and clients).
- Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper)
Example Blueprint
The blueprint ("multi-node-hdfs-yarn") below defines with two host groups (a "master" and the "slaves") which hosts the various Service components (masters, slaves and clients).
Code Block |
---|
{
"host_groups |
Code Block |
{ "host_groups" : [ { "name" : "master", "configurations" : [ { "nagios-env" : { "nagios_contact": "me@my-awesome-domain.example" } } ], "components" : [ { "name" : "NAMENODEmaster", "components" : },[ { "name" : "SECONDARY_NAMENODE" }, { "name" : "RESOURCEMANAGERSECONDARY_NAMENODE" }, { "name" : "HISTORYSERVER" }, { "name" : "NAGIOS_SERVERRESOURCEMANAGER" }, { "name" : "GANGLIA_SERVERHISTORYSERVER" }, { "name" : "ZOOKEEPER_SERVER" } ], "cardinality" : "1" }, { "name" : "slaves", "components" : [ { "name" : "DATANODE" }, { "name" : "HDFS_CLIENT" }, { "name" : "NODEMANAGER" }, { "name" : "YARN_CLIENT" }, { "name" : "MAPREDUCE2_CLIENT" }, { "name" : "ZOOKEEPER_CLIENT" } ], "cardinality" : "1+" } ], "Blueprints" : { "blueprint_name" : "multi-node-hdfs-yarn", "stack_name" : "HDP", "stack_version" : "2.04" } } |
Register blueprint with Ambari Server
...