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 <[email protected]> To: "[email protected]" <[email protected]> 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 <[email protected]> Sent: Tuesday, December 22, 2015 6:40 PM To: [email protected] 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
