Skip to content

Deployment on OpenStack

Dimitris Papagiannis edited this page Jun 27, 2024 · 41 revisions

These instructions are a combination of the official CERN docs, here (which will probably be more up-to-date), augmented with instructions for DQMGUI. Make sure you check the official CERN OpenStack documentation as well.

If you already have a Cloud Infrastructure subscription for your CERN account, skip to Step 3.

1. Enable your Cloud Infrastructure subscription.

Click here and enable the Cloud Infrastructure service:

image

2. Create an SSH key-pair and upload it to OpenStack

Instructions here.

3. Create an OpenStack Virtual Machine

Go to CERN's OpenStack.

Make sure you're under your personal project:

image

Go to Project->Compute->Instances:

image

Click on Launch Instance:

image

image

image

image

image

Create the instance: image

4. Wait for the machine to be accessible

It takes some time for the machine to start up and be accessible through ssh.

5. Connect via ssh into the machine.

ssh root@<your VM name>.cern.ch

Tip

You will need to either be inside CERN network, or to tunnel through lxtunnel.cern.ch with ssh's -J flag. For example, from outside CERN:

ssh -J <cern-username>@lxtunnel.cern.ch root@<your VM name>.cern.ch

Replace <your VM name> with the name of the Virtual Machine that you created, e.g. dev-vm.

6. Install the required packages.

Run:

sudo yum install -y $(curl -L https://raw.githubusercontent.com/cms-DQM/dqmgui_prod_deployment/main/os_packages.txt)
sudo alternatives --set python3 /usr/bin/python3.8

7. Create the necessary directories, users and permissions

adduser dqm
sudo mkdir -p /data/srv
sudo chown -R dqm /data/srv
sudo su dqm

If deploying an online flavor, create the following directories as well:

# Data directory
sudo mkdir -p /dqmdata/dqm
sudo chown -R dqm /dqmdata

8. Get an installation package

Download the installation package you would like to deploy from here.

Tip

It's preferable to get the latest release for python3.8

For example, for version python_3.8_deployment_HG2402b_dqmgui_10.0.1_root_v6-28-10:

curl -L https://github.com/cms-DQM/dqmgui_prod_deployment/releases/download/python_3.8_deployment_HG2402b_dqmgui_10.0.1_root_v6-28-10/dqmgui_python_3.8_deployment_HG2402b_dqmgui_10.0.1_root_v6-28-10.tar.gz --output /tmp/dqmgui_installation_package.tar.gz

Note

For advanced users, you can build your own custom package by following the instructions here

9. Start the deployment (dev flavor)

cd ~
mkdir -p dqmgui_deployment
tar -xf /tmp/dqmgui_installation_package.tar.gz -C dqmgui_deployment

# Start the deployment script, it will take some time to finish
bash /home/dqm/dqmgui_deployment/deploy_dqmgui.sh do_preliminary_checks=0

# Start all the services
/data/srv/current/config/dqmgui/manage -f dev start "I did read documentation"

Tip

You can specify a different flavor of the DQMGUI if needed, e.g. online.

Tip

The deployment will take a long time, the first time you run it, due to having to build ROOT. For 2 CPU cores and 4GB RAM, it might take up to 1.5 hours.

10. Open the VM's firewall ports

As the root user, run:

firewall-cmd --list-all-zones
firewall-cmd --zone=public --add-port=8060/tcp # For the dev flavor
firewall-cmd --zone=public --add-port=8070/tcp # For the online-dev flavor
firewall-cmd --zone=public --add-port=8080/tcp # For the offline flavor
firewall-cmd --zone=public --add-port=8081/tcp # For the relval flavor

11. Access the DQMGUI

The DQMGUI should now be available at http://<your VM name>.cern.ch:8060/dqm/dev.

Tip

If you started the online flavor, use port 8070 instead.

Tip

If you are outside of CERN's network, you will need to forward the VM's port to your computer. This can be done either:

  • By using ssh: ssh -L 8060:root@<your VM name>.cern.ch:8060 -J <cern-username>@lxtunnel.cern.ch root@<your VM name>.cern.ch, or
  • From within your browser, look for "Proxy" in the settings.