ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaimin Jetly <jai...@hortonworks.com>
Subject Re: Add service component question
Date Wed, 23 Dec 2015 03:09:59 GMT
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 <shenzwei@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

Mime
View raw message