Support Questions

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

where to locate maintenance scripts in ambari cluster machines

avatar

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

avatar

@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

avatar

@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

avatar

so what are the other places that I can use ?

Michael-Bronson

avatar

@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

avatar

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

Michael-Bronson

avatar

@Michael Bronson yes that is correct.

avatar

@Michael Bronson

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