Support Questions
Find answers, ask questions, and share your expertise

where to locate maintenance scripts in ambari cluster machines

hi all,

we developed recently couple of shell scripts for cluster maintenance ( as clean logs , collect info , API script etc )

and script must be located in every Linux machine as ( worker machine , data node machine , name node machine )

my question is - were to locate these scripts on each machine? , so it will be safe in case of HDP upgrade or to avoid conflict

for example , we check and we found that each machine have the following empty folder

/var/lib/ambari-agent/lib/
and we are thinking to put all our scripts under /var/lib/ambari-agent/lib

what hortonworks opinion about this , or where is the best location for our scripts that should be located ?

Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions

Re: where to locate maintenance scripts in ambari cluster machines

@Michael Bronson

Don't think /var/lib/ambari-agent/lib is good place to keep - As of now it seems Agent upgrade is not removing the files under that path but in future that may/not change - i would recommend to use any custom path outside of ambari-agent

View solution in original post

6 REPLIES 6

Re: where to locate maintenance scripts in ambari cluster machines

@Michael Bronson

Don't think /var/lib/ambari-agent/lib is good place to keep - As of now it seems Agent upgrade is not removing the files under that path but in future that may/not change - i would recommend to use any custom path outside of ambari-agent

View solution in original post

Re: where to locate maintenance scripts in ambari cluster machines

so what are the other places that I can use ?

Michael-Bronson

Re: where to locate maintenance scripts in ambari cluster machines

@Michael Bronson

Ambari agent has below folders

/etc/ambari-agent, /usr/lib/ambari-agent, /usr/sbin/ambari-agent, /var/lib/ambari-agent, /var/lib/ambari-agent/bin/ambari-agent /var/log/ambari-agent, /var/run/ambari-agent

It is better to use some other custom path like /var/lib/ambari-scripts or /var/lib/ambari-custom-scripts

Re: where to locate maintenance scripts in ambari cluster machines

in other words you recommended to create new folder on each machine

Michael-Bronson

Re: where to locate maintenance scripts in ambari cluster machines

@Michael Bronson yes that is correct.

Re: where to locate maintenance scripts in ambari cluster machines

@Michael Bronson

Can you please mark correct answer if you are satisfied with my answer?