Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How do I ensure that service is installed on a particular node via ambari REST API?

avatar

I want to install 'Zeppelin' service via ambari REST API and have Zeppelin server running on one particular node. How do I do it?

1 ACCEPTED SOLUTION

avatar
Rising Star

Could you please try :

/api/v1/clusters/clusterName/hosts/hostName/host_components/componentName;

adding service and hostname in the request body

{"{SERVICE}", serviceName, "{HOST}", hostName}

This article has sample calls that would walk you through the process: https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster

Hope this helps.

View solution in original post

2 REPLIES 2

avatar
Rising Star

Could you please try :

/api/v1/clusters/clusterName/hosts/hostName/host_components/componentName;

adding service and hostname in the request body

{"{SERVICE}", serviceName, "{HOST}", hostName}

This article has sample calls that would walk you through the process: https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster

Hope this helps.

avatar

Thanks @dbalasundaran for pointing to the article. This works for me

There is one caveat in this though,

If your cluster is kerberos enabled, then there is one more step required before installing the service in last step:

Send a POST request to "/credentials/kdc.admin.credential" with data as '{ "Credential" : { "principal" : "user@EXAMPLE.COM", "key" : "password", "type" : "temporary" } }'