Closed MCatherine1994 closed 3 years ago
Installation Requirements:
Todo: discuss the location of config files, whether install them directly to the proper location or install them at one location and let the user copy them to the proper place
remove sysconfig file (and references in init//service files) Change init//service file user to shoal. Post install script to: -First thing stop agent (service shoal-agent stop) -create shoal user/grp -create/change owner of log file -conditionally copy config file -copy all data files to proper locations (currently using setup.py's data_files) start service
python2 will install shoal-agent-installation command to /usr/bin/shoal-agent-installation python3 will install shoal-agent-installation command to /usr/local/bin/shoal-agent-installation, and to run this command, need to use "sudo su -"
also found that in setup.py file, data_file option we set the destination to be "share/shoal-agent", this is different in python2 and python3 when using pip install. For python2, our config files will be placed at "/usr/share/shoal-agent/", but for python3, they will be at "/usr/local/share/shoal-agent/". (As run "setup.py install" won't do anything about the data_file option, I didn't notice this at the beginning)
It should be possible to force a specific install dir for both version of python by using the "--prefix" option of pip, e.g. "--prefix=/usr" should install in /usr/bin/ "--prefix=/usr/local" should install in /usr/local/bin/
config file path
how to run the shoal-agent-installation
data file locations
Summary of changes on shoal-agent: