Created 10-09-2017 03:01 AM
I'd like to automate a cluster build using FreeIPA as the identity/authentication infrastructure and I'm looking for a way to set the enableIpa flag in Ambari's experimental feature set via the REST API. Is this possible?
Created 10-09-2017 04:12 AM
You can try using the following API call to set "enableIpa" to "true"
curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d '{"user-pref-admin-supports":"{\"disableHostCheckOnAddHostWizard\":false,\"preUpgradeCheck\":true,\"displayOlderVersions\":false,\"autoRollbackHA\":false,\"alwaysEnableManagedMySQLForHive\":false,\"preKerberizeCheck\":false,\"customizeAgentUserAccount\":false,\"installGanglia\":false,\"opsDuringRollingUpgrade\":false,\"customizedWidgetLayout\":false,\"showPageLoadTime\":false,\"skipComponentStartAfterInstall\":false,\"preInstallChecks\":false,\"serviceAutoStart\":true,\"logSearch\":true,\"redhatSatellite\":false,\"enableIpa\":true,\"addingNewRepository\":false,\"kerberosStackAdvisor\":true,\"logCountVizualization\":false,\"enabledWizardForHostOrderedUpgrade\":true,\"manageJournalNode\":true}"}' http://amb25101.example.com:8080/api/v1/persist
.
Please replace the "amb25101.example.com" with your Ambari Server Host.
If everything is OK then , the output of the Above Curl HTTP Response should be 202 as following:
HTTP/1.1 202 Accepted X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Cache-Control: no-store Pragma: no-cache Set-Cookie: AMBARISESSIONID=1o05iiupqulu6o52uwtl9cmhz;Path=/;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT User: admin Content-Type: text/plain Content-Length: 0
.
Created 10-09-2017 04:12 AM
You can try using the following API call to set "enableIpa" to "true"
curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d '{"user-pref-admin-supports":"{\"disableHostCheckOnAddHostWizard\":false,\"preUpgradeCheck\":true,\"displayOlderVersions\":false,\"autoRollbackHA\":false,\"alwaysEnableManagedMySQLForHive\":false,\"preKerberizeCheck\":false,\"customizeAgentUserAccount\":false,\"installGanglia\":false,\"opsDuringRollingUpgrade\":false,\"customizedWidgetLayout\":false,\"showPageLoadTime\":false,\"skipComponentStartAfterInstall\":false,\"preInstallChecks\":false,\"serviceAutoStart\":true,\"logSearch\":true,\"redhatSatellite\":false,\"enableIpa\":true,\"addingNewRepository\":false,\"kerberosStackAdvisor\":true,\"logCountVizualization\":false,\"enabledWizardForHostOrderedUpgrade\":true,\"manageJournalNode\":true}"}' http://amb25101.example.com:8080/api/v1/persist
.
Please replace the "amb25101.example.com" with your Ambari Server Host.
If everything is OK then , the output of the Above Curl HTTP Response should be 202 as following:
HTTP/1.1 202 Accepted X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Cache-Control: no-store Pragma: no-cache Set-Cookie: AMBARISESSIONID=1o05iiupqulu6o52uwtl9cmhz;Path=/;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT User: admin Content-Type: text/plain Content-Length: 0
.
Created 10-10-2017 02:24 AM
Thank you Jay. This worked.
Created 11-07-2017 12:42 AM
I Could not see option for FreeIPA even after executing above command successfully.
I am Running Sanbox 2.6
,=====================
[root@sandbox-host ~]# curl -u raj_ops:raj_ops -i -H 'X-Requested-By: ambari' -X POST -d '{"user-pref-admin-supports":"{\"disableHostCheckOnAddHostWizard\":false,\"preUpgradeCheck\":true,\"displayOlderVersions\":false,\"autoRollbackHA\":false,\"alwaysEnableManagedMySQLForHive\":false,\"preKerberizeCheck\":false,\"customizeAgentUserAccount\":false,\"installGanglia\":false,\"opsDuringRollingUpgrade\":false,\"customizedWidgetLayout\":false,\"showPageLoadTime\":false,\"skipComponentStartAfterInstall\":false,\"preInstallChecks\":false,\"serviceAutoStart\":true,\"logSearch\":true,\"redhatSatellite\":false,\"enableIpa\":true,\"addingNewRepository\":false,\"kerberosStackAdvisor\":true,\"logCountVizualization\":false,\"enabledWizardForHostOrderedUpgrade\":true,\"manageJournalNode\":true}"}' http://192.168.1.13:8080/api/v1/persist
HTTP/1.1 202 Accepted
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-store
Pragma: no-cache
Set-Cookie: AMBARISESSIONID=19wiow0d4gtiqzmk5vz5n5nx;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
User: raj_ops
Content-Type: text/plain
Content-Length: 0
=======================
What is missing ?
Thanks
Created 07-10-2018 10:46 PM
you are not missing anything, the option is not visible in the UI, because the call was not done by the wizard, and the wizard did not refresh its status. If you wait or restart the UI you should see the option listed- at least i did.