Support Questions

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

How do I enable the experimental FreeIPA support via the Ambari REST API

avatar
Rising Star

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?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Nik Lam

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

.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Nik Lam

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

.

avatar
Rising Star

Thank you Jay. This worked.

avatar
New Contributor

hi @Jay Kumar SenSharma,

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

avatar
Explorer

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.