You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Jeff Sposetti (JIRA)" <ji...@apache.org> on 2015/05/17 17:45:59 UTC
[jira] [Commented] (AMBARI-8458) Add support for "add hosts"
specifying host name, blueprint name and host group name
[ https://issues.apache.org/jira/browse/AMBARI-8458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14547207#comment-14547207 ]
Jeff Sposetti commented on AMBARI-8458:
---------------------------------------
1) Created a simple blueprint that includes a master host group and worker host group, using HDP 2.2 Stack:
{code}
POST http://c6401.ambari.apache.org:8080/api/v1/blueprints/single-node-hdfs-yarn
{
"host_groups" : [
{
"name" : "master",
"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" : "APP_TIMELINE_SERVER"
},
{
"name" : "ZOOKEEPER_CLIENT"
}
],
"cardinality" : "1"
},
{
"name" : "worker",
"components" : [
{
"name" : "DATANODE"
},
{
"name" : "HDFS_CLIENT"
},
{
"name" : "NODEMANAGER"
},
{
"name" : "YARN_CLIENT"
}
],
"cardinality" : "1+"
}
],
"Blueprints" : {
"blueprint_name" : "single-node-hdfs-yarn",
"stack_name" : "HDP",
"stack_version" : "2.2"
}
}
{code}
2) Manually registered Ambari Agent host c6403.ambari.apache.org to Ambari Server:
3) Add that host to the cluster:
{code}
POST http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/hosts/c6403.ambari.apache.org
{
"blueprint" : "single-node-hdfs-yarn",
"host_group" : "worker"
}
{code}
4) Alternatively, if you want to add > 1 host at a single time, you can use this syntax (be sure all hosts are already registered manually with Ambari Server):
{code}
POST http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/hosts
[
{
"blueprint" : "single-node-hdfs-yarn",
"host_group" : "worker",
"host_name" : "c6403.ambari.apache.org"
},
{
"blueprint" : "single-node-hdfs-yarn",
"host_group" : "worker",
"host_name" : "c6404.ambari.apache.org"
}
]
{code}
> Add support for "add hosts" specifying host name, blueprint name and host group name
> -------------------------------------------------------------------------------------
>
> Key: AMBARI-8458
> URL: https://issues.apache.org/jira/browse/AMBARI-8458
> Project: Ambari
> Issue Type: Improvement
> Reporter: John Speidel
> Assignee: John Speidel
> Fix For: 2.0.0
>
>
> Provide a higher level api for host provisioning.
> This api will accept a host name, blueprint name and host group.
> The result of this api call will be fully operational hosts added to the existing cluster with configuration and components which are defined in the specified blueprint/host_group. All components on the added hosts will be installed and started.
> All hosts must be reachable via ambari server and have the ambari agent running and registered with the ambari server prior to using this api.
> This is an asynchronous api so it will return the standard asynchronous response.
> {code}
> 202 - Accepted
> {
> "href" : "http://AMBARI_HOST:8080/api/v1/clusters/c1/requests/2",
> "Requests" : {
> "id" : 2,
> "status" : "InProgress"
> }
> }
> {code}
> This api will support adding a single host or multiple hosts.
> h4. Single Host:
> {code}
> POST http://AMBARI_HOST:8080/api/v1/clusters/c1/hosts/newHostName.domain
> {
> "blueprint" : "my_blueprint",
> "host_group" : "slave"
> }
> {code}
> h4. Multiple Hosts
> {code}
> POST http://AMBARI_HOST:8080/api/v1/clusters/c1/hosts
> [
> {
> "blueprint" : "my_blueprint"
> "host_group" : "slave",
> "host_name" : "host2.domain"
> },
> {
> "blueprint" : "my_blueprint",
> "host_group" : "slave",
> "host_name" : "host5.domain"
> }
> ]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)