You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Ambari Blueprints are a declarative definition of a cluster. With a Blueprint, you specify a Stack and a Component layout to materialize a Hadoop cluster instance without having to use the Ambari Cluster Install Wizard.

Key JIRAs

JIRADescription
AMBARI-4467Blueprints REST resource.
AMBARI-5077Provision cluster with blueprint.
AMBARI-4786Export blueprints from running/existing cluster.
AMBARI-5114Configurations with blueprints.

Basic API Resources

ResourceDescription
GET /blueprintsReturns the available blueprints.
POST /blueprints/:nameCreates a blueprint.
POST /clusters/:nameCreates a cluster.
GET /clusters/:name?format=blueprintExport the current cluster layout as a blueprint.

Example: Single-Node Cluster

  • Single-node cluster (c6401.ambari.apache.org)
  • HDP 2.0 Stack
  • Install Core Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper)
Step 0: Prepare Ambari Server and Ambari Agent

Install the Ambari Server, run setup and start. Install the Ambari Agent and perform manual registration.

Step 1: Define your blueprint

The blueprint ("single-node-hdfs-yarn") below defines with one host group ("host_group_1") which hosts all the components (masters, slaves and clients).

{
  "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"
      }
      ],
      "cardinality" : "1"
    }
  ],
  "Blueprints" : {
    "blueprint_name" : "single-node-hdfs-yarn",
    "stack_name" : "HDP",
    "stack_version" : "2.0"
  }
}
Step 2: Create blueprint in Ambari Server

Post the blueprint to the "single-node-hdfs-yarn" resource to the Ambari Server.

POST /api/v1/blueprints/single-node-hdfs-yarn
Step 3: Map hosts to blueprint + host groups for the cluster instance

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.

{
  "blueprint" : "single-node-hdfs-yarn",
  "host-groups" :[
    { 
      "name" : "host_group_1",  
      "hosts" : [          
        { 
          "fqdn" : "c6401.ambari.apache.org", 
          "ip" : "192.168.100.0" 
        }
      ]
    }
  ]
}
Step 4: Create cluster instance with blueprint

Post the cluster to the Ambari Server to provision the cluster.

POST /api/v1/cluster/MyCluster

Example: Three-Node Cluster

  • Three-node cluster
  • Host Groups: “master”, “slaves”
  • Use HDP 2.0 Stack
  • Install Core Hadoop Services (HDFS, YARN, MapReduce2, ZooKeeper)

TBD

  • No labels