PanDA monitor installation

In this topic we'll discuss the process of installing and configuring the PanDA monitor to use with MySQL database. Up to date monitor on github is Oracle-oriented, so we'll use an old version from subversion (core and lsst are needed):

http://svnweb.cern.ch/world/wsvn/panda/panda-bigmon/trunk/

This instruction is based on BigPanDAmonitoringEnvProd, with some clarifications.

Preparation

We need pip and virtualenv:

# yum install python-pip
# pip install virtualenv
Also we have to install packages required by monitor:
# yum install gcc
# yum install python-devel
# yum install libcurl-devel
# yum install mysql-devel

Virtualenv

Create a virtualenv project:

# virtualenv pandamon

Activate it:

# cd pandamon
# . bin/activate

Inside the project install the following packages: requirements.txt

 # pip install -r requirements.txt

And several others:

# pip install django-cors-headers
# pip install psutil

Directories

Several directories should be created inside the virtual env project:

.../pandamon/lsst
.../pandamon/lsst/logs
.../pandamon/pythonpath
lsst directory holds the code: put lsst from panda-bigpandamon-lsst and core from panda-bigpandamon-core in here.
pythonpath directory will be used for import, add it into PYTHONPATH environment variable and create two symbolic links here:
# cd .../pandamon/pythonpath
# ln -s .../pandamon/lsst/lsst lsst
# ln -s .../pandamon/lsst/core core

Configuration

Open .../pandamon/lsst/core/common/settings and copy(or rename) local.py-example-template to local.py. It has a typo, which can prevent the monitor from working:

# 'default.MySQL' = {

should be

# 'default.MySQL': {

Open .../pandamon/lsst/lsst/common/settings and copy(or rename) local.py-example-template to local.py. Specify your MySQL connection parameters and secret key in local.py.
In config.py, specify virtualenv path:

# VIRTUALENV_PATH = '.../pandamon'

Log path:

# LOG_ROOT = '.../pandamon/lsst/logs'

And secret key.

Launch

Before launching monitor for the first time, we have to collect static:

# cd .../pandamon/lsst/lsst
# python manage.py collectstatic
Then we can launch the monitor on localhost:8000:
# python manage.py runserver

Or run it on specific address and port:

# python manage.py runserver 192.168.0.1:8080

When monitor is working we can see a list of jobs on our site:

http://127.0.0.1:8000/jobjobs/?computingsite=OUR_SITE_NAME

(site name can be seen at http://127.0.0.1:8000/resource/)

-- RuslanMashinistov - 2015-06-19

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2015-06-19 - RuslanMashinistov
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    PanDA All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback