hep-gc / shoal

A squid cache publishing and advertising tool designed to work in fast changing environments
Apache License 2.0
4 stars 8 forks source link

Merge: merge agent-python3 to master for version 1.0.0 #159

Closed MCatherine1994 closed 3 years ago

MCatherine1994 commented 3 years ago

Summary of changes on shoal-agent:

MCatherine1994 commented 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

colsond commented 3 years ago

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

MCatherine1994 commented 3 years ago

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)

MarcusEbert commented 3 years ago

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/

MCatherine1994 commented 3 years ago

config file path

how to run the shoal-agent-installation

data file locations