Installation for the DB machine

For centos7
Setup the DB machine environment.

Connect to the DB machine via ssh

Please run following command on your shell to connect DB machine via ssh.
We launched a virtual server and tell you the server name.
Change the server name accordingly (e.g.:parrot@localdbserver99)

$ ssh parrot@localdbserverXX
Password: 
Last login: ... 2020 from monkeyisland.dyndns.cern.ch

ssh connection

yum packages

  • g++ version 7.0 or higher
sudo yum install -y centos-release-scl
sudo yum install -y devtoolset-7
source /opt/rh/devtoolset-7/enable
  • cmake3
sudo yum install -y epel-release
sudo yum install -y cmake3

Python packages

  • python3 version 3.6 or higher
$ python3 --version
Python 3.6.8
  • python pip packages
sudo python3 -m pip install arguments coloredlogs Flask Flask-PyMongo Flask-HTTPAuth Flask-Mail pdf2image Pillow prettytable pymongo python-dateutil PyYAML pytz plotly matplotlib numpy requests tzlocal itkdb influxdb pandas

LocalDB tools

Tools to operate LocalDB

cd ~/
mkdir work && cd work
git clone https://gitlab.cern.ch/YARR/localdb-tools.git

Mongo DB

MongoDB version 4.2 or higher for Local DB
This is the database to store the QC results
There might be some error masages but please ignore them and proceed.

cd ~/work/localdb-tools/scripts/shell
./upgrade_mongoDB_centos.sh
[sudo] password for dbuser: XXXXXXX
OK!

----------------------------------------------
[WARNING] MongoDB version 4.2 or greater is required
----------------------------------------------

Install MongoDB version 4.2? [y/n]
y

< Installing packages with many texts >
...

Start mongodb

sudo systemctl start mongod.service

influxDB

This is the database to store the DCS data
Run the following the bellow command at once including the last EOF.

cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL \$releasever
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF

Install and start influxDB

sudo yum install -y influxdb
sudo systemctl start influxdb
influx
...
> create database "dcsDB"
> exit

Grafana

This is a web application to see the contents of influxdb.
Run the following command at once.

cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF

Install and start grafana

sudo yum install -y grafana
sudo systemctl start grafana-server

Root

Root SW have already installed in this machine. Skip this installation
Root SW installation
Link(https://root.cern.ch/downloading-root)
You need to run only the following command.

source /opt/root/bin/thisroot.sh

Go to next step.
Setting for MongoDB