Skip to content

Commit 0a77aed

Browse files
committed
Making it work offline
1 parent ad07ab0 commit 0a77aed

File tree

6 files changed

+425
-200
lines changed

6 files changed

+425
-200
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build DQMGUI Installation Package
2+
3+
on: [push]
4+
5+
jobs:
6+
build_and_upload:
7+
runs-on: ubuntu-20.04
8+
permissions:
9+
contents: write
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
- name: Download and compress dependencies
14+
run: |
15+
sudo apt update && sudo apt install -y libcurl4-gnutls-dev
16+
$(which python3) --version
17+
bash download_dependencies.sh
18+
rm -rf .git
19+
mkdir -p /tmp/dqmgui
20+
tar -cf /tmp/dqmgui/dqmgui_installation_package.tar.gz . -I "gzip --best"
21+
- name: Archive package artifact
22+
uses: actions/upload-artifact@v3
23+
with:
24+
name: dqmgui-installation-package
25+
path: |
26+
/tmp/dqmgui/dqmgui_installation_package.tar.gz
27+
# Create a dummy release, so that the artifact is downloadable
28+
# without a GitHub account
29+
# This will automatically update the artifacts of the "latest" release,
30+
# even though the "latest" tag does match with the actually latest commit.
31+
- name: Release
32+
uses: ncipollo/release-action@v1
33+
with:
34+
artifacts: "/tmp/dqmgui/dqmgui_installation_package.tar.gz"
35+
body:
36+
"Automatically generated dummy release for making the installation
37+
package publicly available. The `latest` tag is
38+
put on a random commit, and does not reflect the current state of the release,
39+
while the artifact of this release is updated with the actually latest files,
40+
on each push."
41+
tag: "latest"
42+
allowUpdates: "true"

README.md

Lines changed: 66 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# [Legacy] DQMGUI Deployment
22

3-
This repository contains all the requirements for deploying the [Legacy] [DQMGUI](https://github.com/cms-DQM/dqmgui_prod) on a Red Hat Enterprise Linux 8 machine, with Python3.6 for the needs of moving DQM production to new machines.
3+
[![Build DQMGUI Installation Package](https://github.com/cms-DQM/dqmgui_prod_deployment/actions/workflows/build_installation_package.yaml/badge.svg)](https://github.com/cms-DQM/dqmgui_prod_deployment/actions/workflows/build_installation_package.yaml)
44

5-
It aims to replace the existing one (`Deploy`), found in [`dmwm/deployment`](https://github.com/dmwm/deployment/tree/master/Deploy), which only targets OS up to SLC7. The main difference is that the `Deploy` script relies on pre-built libraries and executables, found on `cmsrep.cern.ch`, while this script downloads and builds all requirements from source (hence takes longer to deploy).
5+
This repository contains all the requirements for deploying the [Legacy] [DQMGUI](https://github.com/cms-DQM/dqmgui_prod) on a Red Hat Enterprise Linux 8 machine, with Python3.8 for the needs of moving DQM production to new machines.
6+
7+
It aims to replace the existing one (`Deploy`), found in [`dmwm/deployment`](https://github.com/dmwm/deployment/tree/master/Deploy), which only targets OS up to SLC7. The main difference is that the `Deploy` script relies on pre-built libraries and executables, found on `cmsrep.cern.ch`, while the method we implement in this repository depends on two steps:
8+
9+
1. Download all the external resources needed (e.g. python packages from PyPI, github repositories) and compress them. This is done automatically with GitHub actions, and you can download a package ready to install [here](https://github.com/cms-DQM/dqmgui_prod_deployment/actions/workflows/build_installation_package.yaml).
10+
2. Copy the archives to the P5 machine and extract, then build from source (hence takes longer to deploy).
611

712
> **Warning**
813
> This deployment script should *not* be run as a sudo user.
@@ -12,15 +17,13 @@ It aims to replace the existing one (`Deploy`), found in [`dmwm/deployment`](htt
1217
- RHEL8 (Tested with version 8.8)
1318
- `sudo` permissions:
1419
- To install the system-wide packages (listed below).
15-
<!-- - To create a soft link in `/usr/lib64`. -->
16-
- Python 3.6
20+
- Python 3.8
1721
- Git
18-
- Access to PyPI for downloading python packages.
19-
- Access to GitHub for cloning several external dependencies.
2022
- Several system packages, installed via `yum`:
2123
<details>
22-
<summary>Package list</summary>
24+
<summary>Package list</summary>
2325

26+
- unzip
2427
- bzip2
2528
- libglvnd-opengl
2629
- libX11-devel
@@ -42,12 +45,10 @@ It aims to replace the existing one (`Deploy`), found in [`dmwm/deployment`](htt
4245
- perl-Digest-MD5
4346
- tcsh
4447
- zsh
45-
- root
46-
- python3-root
4748
- epel-release
48-
- python3-pip
4949
- libcurl-devel
50-
- python36-devel
50+
- python38
51+
- python38-devel
5152
- boost-python3-devel
5253
- protobuf-devel
5354
- jemalloc-devel
@@ -56,60 +57,77 @@ It aims to replace the existing one (`Deploy`), found in [`dmwm/deployment`](htt
5657
- lzo-devel
5758
- cmake
5859
- xz-devel
59-
- python3-sphinx
6060
- openssl-devel
6161
- libjpeg-turbo-devel
6262
- libpng-devel
63+
- gcc-c++
64+
- gcc
65+
- binutils
66+
- gcc-gfortran
67+
- mesa-libGL-devel
68+
- mesa-libGLU-devel
69+
- glew-devel
70+
- ftgl-devel
71+
- fftw-devel
72+
- cfitsio-devel
73+
- graphviz-devel
74+
- libuuid-devel
75+
- avahi-compat-libdns_sd-devel
76+
- openldap-devel
77+
- python3-numpy
78+
- libxml2-devel
79+
- gsl-devel
80+
- readline-devel
81+
- R-devel
82+
- R-Rcpp-devel
83+
- R-RInside-devel
84+
- xrootd-client
6385
</details>
6486

6587
## Deploying [Legacy] DQMGUI
6688

67-
This procedure has been tested on a RHEL8 Openstack VM.
89+
This procedure has been tested on a RHEL8 Openstack VM. Instructions below are primarily for a personal VM.
6890

69-
1. Install the system packages:
91+
0. Download the latest build artifact and copy it to the machine you want to install it to:
7092

7193
```bash
72-
sudo yum install -y tmux git bzip2 libglvnd-opengl libX11-devel libXext-devel libXft-devel libXpm-devel mesa-libGLU mesa-libGLU-devel perl-Env perl-Switch perl-Thread-Queue glibc-headers libidn libXcursor libXi libXinerama libXrandr perl perl-Digest-MD5 tcsh zsh root python3-root epel-release python3-pip libcurl-devel python36-devel boost-python3-devel protobuf-devel jemalloc-devel pcre-devel boost-devel lzo-devel cmake xz-devel python3-sphinx openssl-devel libpng-devel libjpeg-turbo-devel
73-
```
74-
<!--
75-
2. Create a link to `libDQMGUI.so` which we will be compiling shortly:
76-
77-
```bash
78-
ln -s /data/srv/<DMWM tag>/sw/el8_amd64_gcc11/cms/dqmgui/<DQMGUI tag>/128/lib/libDQMGUI.so /usr/lib64/libDQMGUI.so
94+
curl -L https://github.com/cms-DQM/dqmgui_prod_deployment/releases/download/latest/dqmgui_installation_package.tar.gz --output dqmgui_installation_package.tar.gz
95+
scp dqmgui_installation_package.tar.gz root@<VM machine>:/tmp/
7996
```
8097

81-
Replace:
82-
83-
- `<DMQM tag>` with the [`dmwm/deployment`](https://github.com/dmwm/deployment/tags) tag you want to use (contains the layouts).
84-
- `<DQMGUI tag>` with the [DQMGUI](https://github.com/cms-DQM/dqmgui_prod/tags) tag you want to use (contains the underlying GUI code).
85-
86-
e.g.:
98+
1. Connect to the VM and install the system packages:
8799

88100
```bash
89-
ln -s /data/srv/HG2903c/sw/el8_amd64_gcc11/cms/dqmgui/10.0.0/128/lib/libDQMGUI.so /usr/lib64/libDQMGUI.so
101+
sudo yum install -y unzip bzip2 libglvnd-opengl libX11-devel libXext-devel libXft-devel libXpm-devel mesa-libGLU mesa-libGLU-devel perl-Env perl-Switch perl-Thread-Queue glibc-headers libidn libXcursor libXi libXinerama libXrandr perl perl-Digest-MD5 tcsh zsh epel-release libcurl-devel python38 python38-devel boost-python3-devel protobuf-devel jemalloc-devel pcre-devel boost-devel lzo-devel cmake xz-devel openssl-devel libjpeg-turbo-devel libpng-devel gcc-c++ gcc binutils gcc-gfortran mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel fftw-devel cfitsio-devel graphviz-devel libuuid-devel avahi-compat-libdns_sd-devel openldap-devel python3-numpy libxml2-devel gsl-devel readline-devel R-devel R-Rcpp-devel R-RInside-devel xrootd-client
90102
```
91-
-->
92103

93104
2. Add a non-privileged user, create and give access to necessary directories and switch to it:
94-
105+
95106
```bash
96107
adduser dqm
108+
109+
# Installation directory
97110
sudo mkdir -p /data/srv
98111
sudo chown -R dqm /data/srv
112+
113+
# Data directory
99114
sudo mkdir -p /dqmdata/dqm
100115
sudo chown -R dqm /dqmdata
116+
117+
# Installation package
118+
sudo chown dqm /tmp/dqmgui_installation_package.tar.gz
119+
101120
sudo su dqm
102121
```
103122

104123
3. Start the deployment (`dev` flavor):
105-
124+
106125
```bash
107126
cd ~
108-
# Clone this script and all necessary files, like patches
109-
git clone https://github.com/cms-DQM/dqmgui_prod_deployment
110-
127+
tar -xf dqmgui_installation_package.tar.gz -C dqmgui_deployment
128+
111129
# Start the deployment script, it will take some time to finish
112-
bash /home/dqm/dqmgui_prod_deployment/deploy_dqmgui.sh
130+
bash /home/dqm/dqmgui_deployment/deploy_dqmgui.sh
113131

114132
# Start all the services
115133
/data/srv/current/config/dqmgui/manage -f dev start "I did read documentation"
@@ -126,7 +144,7 @@ This procedure has been tested on a RHEL8 Openstack VM.
126144
firewall-cmd --zone=public --add-port=8081/tcp # relval
127145
```
128146

129-
## Command-line arguments
147+
## Deployment command-line arguments
130148

131149
This script uses some internal variables to specify options such as the main installation directory, or the git tags/refs to use when cloning repositories. It's not recommended that you edit those, as most of them are hand-picked so that the project compiles (we're mostly referring to the git refs).
132150

@@ -137,12 +155,10 @@ Below is a list of the values that you will most probably need to change to cust
137155
| Variable name | Description |Default value |
138156
|---------------|-------------|--------------|
139157
| `INSTALLATION_DIR` | The directory to install the GUI into. It should be writable by the user running the script | `/data/srv` |
140-
| `DMWM_GIT_TAG` | The git tag/ref to checkout `dmwm/deployment` to. See [here](https://github.com/dmwm/deployment/tags) for a list. | `HG2903c` |
141-
| `DQMGUI_GIT_TAG` | The git tag/ref to checkout `cms-DQM/dqmgui_prod` to. See [here](https://github.com/cms-DQM/dqmgui_prod) for a list. | `9.8.0` |
142158

143-
## [Debug] Selectively run parts of the installation script
159+
### [Debug] Selectively run parts of the installation script
144160

145-
The script is split into steps (see: `installation_steps`), which can all be toggled off or on by arguments when running the script.
161+
The script is split into steps (see the `installation_steps` array declared in the `deploy_dqmgui.sh` script), which can all be toggled off or on by arguments when running the script.
146162

147163
The flags are named by concatenating `do_` with the name of the step, so, for example, `do_check_dependencies` or `do_install_rotoglup`.
148164

@@ -152,8 +168,16 @@ The are all set to `1` by default, and you can override them when running the sc
152168
bash deploy_dqmgui.sh do_preliminary_checks=0 do_check_dependencies=0
153169
```
154170

155-
A useful combination that can be used when you've already downloaded all external dependencies once, and you want just to re-compile the DQMGUI part for testing:
171+
A useful combination that can be used when you've already installed and built all steps once, but you only want to re-compile the DQMGUI part for testing:
156172

157173
```bash
158-
bash deploy_dqmgui.sh do_preliminary_checks=0 do_check_dependencies=0 do_preliminary_checks=0 do_check_dependencies=0 do_create_directories=1 do_install_boost_gil=0 do_install_gil_numeric=0 do_install_rotoglup=0 do_install_classlib=0 do_compile_classlib=0 do_install_dmwm=0 do_install_dqmgui=0 do_compile_dqmgui=1 do_install_yui=0 do_install_extjs=0 do_install_d3=0 do_install_jsroot=0
174+
bash deploy_dqmgui.sh do_preliminary_checks=0 do_check_dependencies=0 do_create_directories=1 do_install_boost_gil=0 do_install_gil_numeric=0 do_install_rotoglup=0 do_install_classlib=0 do_compile_classlib=0 do_install_dmwm=0 do_install_root=0 do_compile_root=0 do_install_dqmgui=0 do_compile_dqmgui=1 do_install_yui=0 do_install_extjs=0 do_install_d3=0 do_install_jsroot=0
159175
```
176+
177+
## Download script
178+
179+
The installation package is created by running `download_dependencies.sh`. This is done automatically by github actions (see `.github/workflows/build_installation_package` in this repository). The versions of the packages downloaded are specified in `config.sh`.
180+
181+
## Notes
182+
183+
- We're not using the RHEL8 `root` package, due to the fact that they are built for python3.6, hence we need to build it with python3.8.

config.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
# Configuration file, which is sourced by both download_dependencies.sh and deploy_dqmgui.sh
4+
# Here we specify both the URLs and tags/branches/refs of the repositories that DQMGUI
5+
# depends on.
6+
7+
# Tag to use for getting the layouts and manage/deploy scripts
8+
# See: https://github.com/dmwm/deployment/tags
9+
#DMWM_GIT_URL=https://github.com/dmwm/deployment
10+
DMWM_GIT_TAG=debug
11+
DMWM_GIT_URL=https://github.com/nothingface0/cms_dmwm_deployment
12+
13+
# DQMGUI tag to use, see https://github.com/cms-DQM/dqmgui_prod/tags
14+
#DQMGUI_GIT_TAG=9.8.0
15+
DQMGUI_GIT_TAG=python3_backup
16+
DQMGUI_GIT_URL=https://github.com/cms-DQM/dqmgui_prod
17+
18+
# Boost.GIL. At most version 1.67!! The API changed radically after that.
19+
BOOST_GIL_GIT_URL=https://github.com/boostorg/gil
20+
BOOST_GIL_GIT_TAG=boost-1.66.0
21+
22+
# OLD rotoglup code. Commit was found with lots of pain, so that the patch
23+
# applies: https://github.com/cms-sw/cmsdist/blob/comp_gcc630/dqmgui-rtgu.patch
24+
ROTOGLUP_GIT_TAG=d8ce23aecd0b1fb7d45c9bedb615abdab27a5494
25+
ROTOGLUP_GIT_URL=https://github.com/rotoglup/rotoglup-scratchpad
26+
27+
# Yahoo!(TM) UI
28+
YUI_GIT_URL=https://github.com/yui/yui2
29+
YUI_GIT_TAG=master
30+
31+
# Extjs
32+
EXTJS_GIT_URL=https://github.com/probonogeek/extjs
33+
EXTJS_GIT_TAG=3.1.1
34+
35+
# D3
36+
D3_GIT_URL=https://github.com/d3/d3
37+
D3_GIT_TAG=v2.7.4
38+
39+
# JSROOT
40+
JSROOT_GIT_URL=https://github.com/root-project/jsroot
41+
JSROOT_GIT_TAG=5.1.0
42+
43+
# ROOT
44+
ROOT_GIT_URL=https://github.com/root-project/root/
45+
ROOT_GIT_TAG=v6-28-08

0 commit comments

Comments
 (0)