Hi ambari team:
My ambari version is 2.7.3. Now, I want to install service using rest api,
my command is:
curl -u admin:admin -i -H 'X-Requested-By:ambari' -X PUT
http://localhost:8080/api/v1/clusters/test/services/SOLR -d '{"RequestInfo": {
"context": "Install SOLR"},"Body": { "ServiceInfo": { "state": "INSTALLED"} }}'
When kerberos was not enabled, it is OK. But after I enabled Kerberos, I will
get the error message as below:
{ "status" : 400,
"message" : "java.lang.IllegalArgumentException: Invalid KDC administrator
credentials.\nThe KDC administrator credentials must be set as a persisted or
temporary credential resource.This may be done by issuing a POST (or PUT for
updating) to the /api/v1/clusters/:clusterName/credentials/kdc.admin.credential
API entry point with the following payload:\n{\n \"Credential\" : {\n
\"principal\" : \"(PRINCIPAL)\", \"key\" : \"(PASSWORD)\", \"type\" :
\"(persisted|temporary)\"}\n }\n}"
I refered the doc
https://developer.ibm.com/hadoop/2016/06/07/ambari-rest-calls-for-kerberos-enabled-clusters/
to resolve my problem, but maybe its version is old, it doesn't work for me.
So, what is the easies way to invoke this API? Any suggestions are appreciated
!
Thanks!