Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to automate the "ambari-server setup"

Highlighted

how to automate the "ambari-server setup"

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.
Michael-Bronson
6 REPLIES 6

Re: how to automate the "ambari-server setup"

@Michael Bronson,

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-2.6.0.0/bk_ambari-installation/content/setup_option...

Thanks,

Aditya

Re: how to automate the "ambari-server setup"

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.
Michael-Bronson

Re: how to automate the "ambari-server setup"

@Michael Bronson,

Looks like ambari server setup was already run. You can use this option in the fresh cluster where ambari server setup was not run

Re: how to automate the "ambari-server setup"

yes , but we must run it again because some changes in ambari.properties details in - https://community.hortonworks.com/questions/174301/missing-folders-under-varrunambari-server.html

Michael-Bronson

Re: how to automate the "ambari-server setup"

@Michael Bronson,

Since you are changing the configuration which is not default config, you have to run it without silent mode. Silent mode will take all the default values.

Re: how to automate the "ambari-server setup"

Mentor

@Michael Bronson

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.

Don't have an account?
Coming from Hortonworks? Activate your account here