Versions Compared

Key

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

...

Code Block
POST /api/v1/blueprints/single-node-hdfs-yarn

201 - Created
Step 3: Map hosts to blueprint + host groups for the cluster instance

...

Code Block
{
  "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

...

Code Block
POST /api/v1/cluster/MySingleNodeCluster


202 - Accepted
{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/requests/1",
  "Requests" : {
    "id" : 1,
    "status" : "InProgress"
  }
}

Example: Multi-Node Cluster

...

Code Block
{
  "host_groups" : [
    {
      "name" : "mastersmaster",
      "components" : [
      {
        "name" : "NAMENODE"
      },
      {
        "name" : "SECONDARY_NAMENODE"
      },        
      {
        "name" : "RESOURCEMANAGER"
      },
      {
        "name" : "HISTORYSERVER"
      },
      {
        "name" : "NAGIOS_SERVER"
      },
      {
        "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" : "2"
    }
  ],
  "Blueprints" : {
    "blueprint_name" : "multi-node-hdfs-yarn",
    "stack_name" : "HDP",
    "stack_version" : "2.0"
  }
}

...

Code Block
POST /api/v1/blueprints/multi-node-hdfs-yarn

201 - Created
Step 3: Map hosts to blueprint + host groups for the cluster instance

...

Code Block
{
  "blueprint" : "twomulti-node-hdfs-yarn-test",
  "host-groups" :[
    { 
      "name" : "mastersmaster",  
      "hosts" : [          
        { 
          "fqdn" : "c6401.ambari.apache.org", 
          "ip" : "192.168.100.0" 
        }
      ]
    },
    { 
      "name" : "slaves",  
      "hosts" : [
        { 
          "fqdn" : "c6402.ambari.apache.org", 
          "ip" : "192.168.100.0" 
        },
        { 
          "fqdn" : "c6403.ambari.apache.org", 
          "ip" : "192.168.100.0" 
        }
      ]
    }
  ]
}
Step 4: Create cluster instance with blueprint

...

Code Block
POST /api/v1/cluster/MyThreeNodeCluster

202 - Accepted
{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/requests/1",
  "Requests" : {
    "id" : 1,
    "status" : "InProgress"
  }
}