ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Sposetti <j...@hortonworks.com>
Subject Re: Questions about ambari REST API
Date Tue, 03 Jun 2014 03:51:04 GMT
Hi,

How did you create your cluster? Did you use the Ambari Blueprints API (and
are using the Ambari 1.6.0 release)?

https://cwiki.apache.org/confluence/display/AMBARI/Blueprints

J

On Mon, Jun 2, 2014 at 8:46 PM, Qing Chi 79624 <chiq@vmware.com> wrote:

>  Hello guys,
>
>  I'm working on provisioning cluster through Ambari now using REST API.
> And I have some questions about ambari REST API.
>  Questions,:
>
>    1. Can only manage a cluster in Ambari?
>    2. How to install packages of service using ambari REST API?
>    3. Why the cluster which created by REST API would disappear after
>    create another cluster using ambari Web UI? Steps:
>
>  a)  Create a cluster named "apache" using REST API and add hosts,
> services, components and configurations to the cluster.
>  b)  Create another cluster named "test" using ambari Web UI, and
>  persist it.
>  c)  open this URL http://10.111.88.146:8080/api/v1/clusters on browser.
> Following is result:
>  {
>  "href" : "http://10.111.88.146:8080/api/v1/clusters",
>  "items" : [
>  {
>  "href" : "http://10.111.88.146:8080/api/v1/clusters/test",
>  "Clusters" : {
>  "cluster_name" : "test",
>  "version" : "HDP-2.1"
>  }
>  }
>  ]
>  }
>  I am confused where is the cluster named "apache". But I rerun the
> command to create a cluster named "apache". It will give me the
> message("Attempted to create a Cluster which already exists,
> clusterName=apache").
>  Command:
>  curl -H "X-Requested-By: ambari" -X POST -d "@cluster" --user
> "admin:admin" -i http://10.141.73.168:8080/api/v1/clusters/apache
>  {
>  "Clusters":
>   {
>  "cluster_name": "apache",
>   "version":"HDP-2.0"
>   }
>  }
>  Response:
>  HTTP/1.1 409 Conflict
>  Set-Cookie: AMBARISESSIONID=1kcj0ocdogqm9ggvn4m2ekbng;Path=/
>  Expires: Thu, 01 Jan 1970 00:00:00 GMT
>  Content-Type: text/plain
>  Content-Length: 108
>  Server: Jetty(7.6.7.v20120910)
>  {
>  "status" : 409,
>  "message" : "Attempted to create a Cluster which already exists,
> clusterName=apache"
>  }
>
>  Can you give me some helps for these questions?
>
>  Thanks,
>
>  -qing
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Mime
View raw message