...
Ambari Blueprints are a declarative definition of a cluster. With a Blueprint, you specify a Stack, the Component layout and the Configurations to materialize a Hadoop cluster instance (via a REST API) without having to use the Ambari Cluster Install Wizard.
toc
Notable JIRAs
JIRA | Description |
---|---|
AMBARI-4467 | Blueprints REST resource. |
AMBARI-5077 | Provision cluster with blueprint. |
AMBARI-4786 | Export blueprints from running/existing cluster. |
AMBARI-5114 | Configurations with blueprints. |
...
Table of Contents |
---|
API Resources and Syntax
The following table lists the basic Blueprints API resources.
Resource | Description |
---|---|
GET /blueprints | Returns the available blueprints. |
POST /blueprints/:name | Creates a blueprint. |
POST /clusters/:name | Creates a cluster. |
GET /clusters/:name?format=blueprint | Export the current cluster layout as a blueprint. |
Info |
---|
The API calls on this wiki page include the HTTP Method (for example:
|
Blueprint Usage Overview
Step 0: Prepare Ambari Server and Agents
...
Using the /requests
URL returned in Step 4, monitor the progress of the tasks associated with cluster creation.
Blueprint Details
Prepare Ambari Server and Agents
...
- 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 Example: Single-Node HDP 2.0 Cluster
- Single-node cluster (c6401.ambari.apache.org)
- HDP 2.0 Stack
- Install Core Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper) + Ganglia (metrics) and Nagios (alerts)
...
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
- Multi-node cluster (three hosts)
- Host Groups: “master”, “slaves” (one master host, two slave hosts)
- Use HDP 2.0 Stack
- Install Core Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper) + Ganglia (metrics) and Nagios (alerts)
...
Code Block |
---|
POST /api/v1/clusters/MyThreeNodeCluster ... [ 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" } } |