Skip to content

Basic Operations

FaHui Lin edited this page Jul 7, 2021 · 1 revision

Installation

Make sure python3 (3.6 or higher) is installed. If not, try yum install python3

Python venv

python3 -m venv /opt/HGCS
/opt/HGCS/bin/pip install --upgrade pip setuptools

Install with pip

/opt/HGCS/bin/pip install --upgrade git+https://github.com/PanDAWMS/HGCS.git

Configuration

Configuration file

cp /opt/HGCS/etc/hgcs/hgcs.cfg.template /opt/hgcs.cfg
vim /opt/hgcs.cfg

Modify it if necessary.

Service file

cp /opt/HGCS/etc/systemd/system/hgcs.service.template /etc/systemd/system/hgcs.service
vim /etc/systemd/system/hgcs.service

Modify it to be consistent with the path of venv directory, configuration file, log file.

Log rotatation (optional)

cp /opt/HGCS/etc/logrotate.d/logrotate-hgcs /etc/logrotate.d/hgcs
vim /etc/logrotate.d/hgcs

Fill the policy required. Path of log file need to be consistent with that in hgcs.cfg

Example:

nocompress

/var/log/hgcs/hgcs.log {
    rotate 5
    weekly
    missingok
    notifempty
    sharedscripts
    prerotate
        /usr/bin/systemctl stop hgcs
    postrotate
        /usr/bin/systemctl restart hgcs
    endscript
}

Note

On atlas production condor schedd nodes, all the configurations above are managed by puppet

Run service

Start, stop, restart, status

systemctl start hgcs
systemctl stop hgcs
systemctl restart hgcs
systemctl status -l hgcs

Check hgcs log file and/or /var/log/messages for more information.

Clone this wiki locally