Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

What is the correct way to add a Service to Ambari via REST API?

Highlighted

What is the correct way to add a Service to Ambari via REST API?

Rising Star

So I'm currently trying to install the Zeppelin service from here: https://github.com/hortonworks-gallery/ambari-zeppelin-service

I've gotten to the point where I get the files copied and Ambari is restarted. Zeppelin gets registered as a service that I can add.

However then I do a curl like the below

curl -sS -u admin:admin -X POST -i -H "X-Requested-By: ambari" http://localhost:8080/api/v1/clusters/Sandbox/services/ZEPPELIN

I get a '201 Created', but none of the configs are present.

The service is present in Ambari but everything else seems 'empty' just a bunch of blank configs. When I deploy the service via the UI everything gets set up correctly.

I feel that I need to add some kind of JSON payload to the request but I couldn't find anything in the docs. Any tips are appreciated :)

2 REPLIES 2
Highlighted

Re: What is the correct way to add a Service to Ambari via REST API?

High level steps outlined on Ambari wiki here: https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster

@Sean Roberts or @glupu may have sample scripts to do this for Zeppelin already

Highlighted

Re: What is the correct way to add a Service to Ambari via REST API?

Rising Star

@Ali Bajwa @zblanco sadly our old install scripts are not working anymore because they have since been moved to blueprints. But as a rough reference, use any javascript debugger ( i.e firebug ) to catch all the POST and PUT API calls that are done during the GUI install then input them manually to install.

Don't have an account?
Coming from Hortonworks? Activate your account here