You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Zhao Wei ZW Shen <sh...@cn.ibm.com> on 2015/12/23 03:40:25 UTC

Add service component question


Hi Expects,

Does Ambari support to add a new component definition with Rest API?
I wanna  add and update a service component with Rest.


Regards,
Micle

Re: Add service component question

Posted by Jaimin Jetly <ja...@hortonworks.com>.
>> I think my requset is to update the service metainfo.xml. It seems Ambari cannot support to update the component definition with Rest.?


Thats correct. Updating service's metainfo.xml is not API driven. It has to be done manually as of now


-- Thanks

    Jaimin

________________________________
From: Zhao Wei ZW Shen <sh...@cn.ibm.com>
Sent: Tuesday, December 22, 2015 8:48 PM
To: user@ambari.apache.org
Subject: Re: Add service component question


Hi Jaimin,

Thanks for your quick response.

My request is to add a new component that didn't exist in the service metainfo.xml. So I wanna add a component definition with Rest.
In your reply, that is used to add an defined component (APP_TIMELINE_SERVER? is defined in Yarn).

I think my requset is to update the service metainfo.xml. It seems Ambari cannot support to update the component definition with Rest.


Regards,
Zhaowei Shen

[Inactive hide details for Jaimin Jetly ---2015-12-23 ?? 11:11:21---Hi, Please find below REST API calls to create a service]Jaimin Jetly ---2015-12-23 ?? 11:11:21---Hi, Please find below REST API calls to create a service component, associate a host with the create

From: Jaimin Jetly <ja...@hortonworks.com>
To: "user@ambari.apache.org" <us...@ambari.apache.org>
Date: 2015-12-23 ?? 11:11
Subject: Re: Add service component question

________________________________



Hi,

Please find below REST API calls to create a service component, associate a host with the created service component and install the service component.?

Below APIs uses c1 as the cluster name, YARN as a service, APP_TIMELINE_SERVER? as service component, c6401.ambari.apache.org? as the host component and admin:admin as admin user credentials to cluster.

1) Create Service Component:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST http://`hostname -f`:8080/api/v1/clusters/c1/services/YARN/components/APP_TIMELINE_SERVER?

2) Create Service Host Component:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST http://`hostname -f`:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/APP_TIMELINE_SERVER

3) Install Service Host Component:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X PUT -d '{"HostRoles": {"state": "INSTALLED"}}' http://`hostname -f`:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/APP_TIMELINE_SERVER


-- Thanks
Jaimin

________________________________

From: Zhao Wei ZW Shen <sh...@cn.ibm.com>
Sent: Tuesday, December 22, 2015 6:40 PM
To: user@ambari.apache.org
Subject: Add service component question

Hi Expects,

Does Ambari support to add a new component definition with Rest API?
I wanna add and update a service component with Rest.


Regards,
Micle



Re: Add service component question

Posted by Zhao Wei ZW Shen <sh...@cn.ibm.com>.
Hi Jaimin,

Thanks for your quick response.

My request is to add a new component that didn't exist in the service
metainfo.xml. So I wanna add a component definition with Rest.
In your reply, that is used to add an defined component (
APP_TIMELINE_SERVER​ is defined in Yarn).

I think my requset is to update the service metainfo.xml. It seems Ambari
cannot support to update the component definition with Rest.


Regards,
Zhaowei Shen



From:	Jaimin Jetly <ja...@hortonworks.com>
To:	"user@ambari.apache.org" <us...@ambari.apache.org>
Date:	2015-12-23 上午 11:11
Subject:	Re: Add service component question



Hi,

Please find below REST API calls to create a service component, associate a
host with the created service component and install the service component.​

Below APIs uses c1 as the cluster name, YARN as a service,
APP_TIMELINE_SERVER​ as service component, c6401.ambari.apache.org​ as the
host component and admin:admin as admin user credentials to cluster.

1) Create Service Component:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST
http://`hostname
-f`:8080/api/v1/clusters/c1/services/YARN/components/APP_TIMELINE_SERVER​

2) Create Service Host Component:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST
http://`hostname
-f`:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/APP_TIMELINE_SERVER

3) Install Service Host Component:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X PUT -d
'{"HostRoles": {"state": "INSTALLED"}}' http://`hostname
-f`:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/APP_TIMELINE_SERVER


-- Thanks
    Jaimin



From: Zhao Wei ZW Shen <sh...@cn.ibm.com>
Sent: Tuesday, December 22, 2015 6:40 PM
To: user@ambari.apache.org
Subject: Add service component question

Hi Expects,

Does Ambari support to add a new component definition with Rest API?
I wanna  add and update a service component with Rest.


Regards,
Micle


Re: Add service component question

Posted by Jaimin Jetly <ja...@hortonworks.com>.
Hi,


Please find below REST API calls to create a service component, associate a host with the created service component and install the service component.?


Below APIs uses c1 as the cluster name, YARN as a service, APP_TIMELINE_SERVER? as service component, c6401.ambari.apache.org? as the host component and admin:admin as admin user credentials to cluster.


1) Create Service Component:

curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST http://`hostname -f`:8080/api/v1/clusters/c1/services/YARN/components/APP_TIMELINE_SERVER?


2) Create Service Host Component:

curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST http://`hostname -f`:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/APP_TIMELINE_SERVER


3) Install Service Host Component:

curl --user admin:admin -H "X-Requested-By: ambari" -i -X PUT -d '{"HostRoles": {"state": "INSTALLED"}}' http://`hostname -f`:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/APP_TIMELINE_SERVER



-- Thanks

    Jaimin

________________________________
From: Zhao Wei ZW Shen <sh...@cn.ibm.com>
Sent: Tuesday, December 22, 2015 6:40 PM
To: user@ambari.apache.org
Subject: Add service component question


Hi Expects,

Does Ambari support to add a new component definition with Rest API?
I wanna  add and update a service component with Rest.


Regards,
Micle