we want to automate the "ambari-server setup"
in order to set "ambari-server setup" in bash script
all questions should be answered as no ( default )
any suggestion how we can do that ? ( by expect or other solution like silent mode )
[root@master02 install_zone]# ambari-server setup Using python /usr/bin/python Setup ambari-server Checking SELinux... SELinux status is 'disabled' Ambari-server daemon is configured to run under user 'ambari'. Change this setting [y/n] (n)? Adjusting ambari-server permissions and ownership... Checking firewall status... Checking JDK... Do you want to change Oracle JDK [y/n] (n)? Checking GPL software agreement... GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? Completing setup... Configuring database... Enter advanced database configuration [y/n] (n)? Configuring database... Default properties detected. Using built-in database. Configuring ambari database... Checking PostgreSQL... Configuring local database... Configuring PostgreSQL... Backup for pg_hba found, reconfiguration not required Creating schema and user... done. Creating tables... done. Extracting system views... ............ Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully.
You can use the silent option for ambari server. It will take all the default options
ambari-server setup -s
Refer link for more info : https://docs.hortonworks.com/HDPDocuments/Ambari-126.96.36.199/bk_ambari-installation/content/setup_option...
but when we run the ambari-server setup we got the following :
ambari-server setup -s Using python /usr/bin/python Setup ambari-server Nothing was done. Ambari Setup already performed and cannot re-run setup in silent mode. Use "ambari-server setup" command without -s option to change Ambari setup.
I think you can not re-run the ambari setup everytime you do a change but rather just restart the ambari server after changing the server.properties that should pick up the new chnages and work fine.