ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yusaku Sako <yus...@hortonworks.com>
Subject Re: Questions about ambari REST API
Date Tue, 03 Jun 2014 05:15:28 GMT
Ambari currently supports single clusters only, though the REST API
resource tree was designed with multiple cluster in mind.
If you use the Ambari Web UI, there's actually code to delete any
existing cluster when deploying a new cluster.
This delete logic is there to get around partial failure to re-try
installation from a clean slate.
That's why you are seeing the existing cluster installed with the API disappear.

Yusaku

On Mon, Jun 2, 2014 at 8:56 PM, Qing Chi 79624 <chiq@vmware.com> wrote:
> Hi,
>
> I did not use Ambari Blueprints API. I will use it to create cluster.
> Thanks for your help.
>
> -qing
>
> From: Jeff Sposetti <jeff@hortonworks.com>
> Reply-To: <user@ambari.apache.org>
> Date: Mon, 2 Jun 2014 20:51:04 -0700
> To: <user@ambari.apache.org>
> Cc: Emma Lin <line@vmware.com>, Xiaoding Bian <xiaodingbian@vmware.com>
> Subject: Re: Questions about ambari REST API
>
> 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,:
>>
>> Can only manage a cluster in Ambari?
>> How to install packages of service using ambari REST API?
>> 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.

-- 
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