Created 03-09-2017 09:50 AM
curl --user shicheng:123456 -H "X-Requested-By: ambari" -X GET http://localhost:8080/api/v1/clusters/ChorusCluster/services/RANGER
Result:
{ "href" : "http://localhost:8080/api/v1/clusters/ChorusCluster/services/RANGER", "ServiceInfo" : { "cluster_name" : "ChorusCluster", "maintenance_state" : "OFF", "service_name" : "RANGER", "state" : "UNKNOWN" }, "alerts_summary" : { "CRITICAL" : 0, "MAINTENANCE" : 0, "OK" : 0, "UNKNOWN" : 0, "WARNING" : 0 }, "alerts" : [ ], "components" : [ ], "artifacts" : [ ] }How to install ranger admin and ranger usersync host_components to host
Created 03-09-2017 09:58 AM
You need to follow the steps mentioned in the below link to add any service to the cluster. It is a generic solution to add service.
https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster
Created 03-09-2017 10:06 AM
[root@bj-rc-dptd-ambari-sr-1-v-test-1 RANGER]# curl --user shicheng:123456 -H "X-Requested-By: ambari" -i -X POST http://localhost:8080/api/v1/clusters/ChorusCluster/RANGER/components/RANGER_ADMIN
HTTP/1.1 404 Not Found X-Frame-Options: DENY X-XSS-Protection: 1; mode=block Set-Cookie: AMBARISESSIONID=1camyzu7n4lbd1doojg46yzk6p;Path=/;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT User: shicheng Content-Length: 0 Server: Jetty(8.1.19.v20160209
Created 03-10-2017 01:51 AM
i'am don't install ranger-admin and ranger-syncuser service to host
Created 03-15-2017 06:55 AM
As @sbhat pointed out, your url is incorrect to add component. correct one is below.
curl -u <username>:<password> -i -X POST http://<ambari-server-host>:8080/api/v1/clusters/<cluster-name>/services/<service-name>/components/<...; Example: curl -u <username>:<password> -i -X POST http://<ambari-server-host>:8080/api/v1/clusters/c1/services/RANGER/components/RANGER_ADMIN
You need to follow the exact steps mentioned in the above link.
Created 03-10-2017 05:56 AM
Follow this link, it will help you to install and configure ranger on your cluster,
And i do not think other rest api will help you in installing, as the installtion require many thing , including mysql integration with Ranger.
Created 03-15-2017 06:47 AM
@shi cheng : I see your older post where you mentioned you used the following url to install the component :
[root@bj-rc-dptd-ambari-sr-1-v-test-1 RANGER]# curl --user shicheng:123456 -H "X-Requested-By: ambari" -i -X POST http://localhost:8080/api/v1/clusters/ChorusCluster/RANGER/components/RANGER_ADMIN
I see you are missing /services in your url. The url should be :
[root@bj-rc-dptd-ambari-sr-1-v-test-1 RANGER]# curl --user shicheng:123456 -H "X-Requested-By: ambari" -i -X POST http://localhost:8080/api/v1/clusters/ChorusCluster/services/RANGER/components/RANGER_ADMIN
Hope this helps!