本家様 https://open.xdmod.org/10.0/

要件.
https://open.xdmod.org/10.0/software-requirements.htmlを見ると
データベースが必要で MySQL 5.5.x 系列が必要みたい. でMySQL 8.0はコンパチブルではないとある.
そうなるとRocky Linux 9 で提供されている mariadb 10.5.16は無理.

幸いgitを見てみるとhttps://github.com/ubccr/xdmod RockyLinux8に対応したpre-releaseがある
こちらを使ってみることにした

DBは RockyLinux8 の mariadb 10.3.35 で既に slurmdbd 向けとして使っている.
既存のインスタンスにXDMoD 向けデータベースを用意するのではなく、別のインスタンスを作ることにした.

参照MariaDB/mysqld_multi

ではXDMoD の構築

追加パッケージら

[root@slurmdbd ~]# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)
[root@slurmdbd ~]# getenforce
Disabled
 
[root@slurmdbd ~]# dnf install epel-release -y
[root@slurmdbd ~]# dnf  install httpd php php-cli php-mysqlnd php-gd php-pdo php-xml \
              libreoffice-writer \
              cronie logrotate \
              perl-Image-ExifTool php-mbstring php-pecl-apcu jq \
              chromium-headless librsvg2-tools
[root@slurmdbd ~]# vi /etc/php.ini
 :
date.timezone = Asia/Toky
 :
[root@slurmdbd ~]#

オリジナルにはあと「mariadb-server」「mariadb」の追加があるが既に入っているので. でも 「mariadb-server」があるのでローカルにDBがある前提みたい

データベースの準備

MariaDBMariaDB/mysqld_multi にて複数インスタンスが上がっている. このうち「/var/lib/mysql.XDMoD」(port:13306)を
XDMoD向けとしている

[root@slurmdbd ~]# systemctl enable  mariadb@2 --now
[root@slurmdbd ~]# firewall-cmd --add-port=13306/tcp --zone=public --permanent
[root@slurmdbd ~]# firewall-cmd --reload

本体XDMoDの準備

ここから rockylinux8対応のパッケージを取得します
https://github.com/ubccr/xdmod/releases
取得したファイルは「xdmod-10.0.0-1.5.beta5.el8.noarch.rpm」です

[root@slurmdbd ~]# dnf module list nodejs
[root@slurmdbd ~]# dnf module reset nodejs
[root@slurmdbd ~]# dnf module install nodejs:20
 
[root@slurmdbd ~]# dnf localinstall ./xdmod-10.0.0-1.5.beta5.el8.noarch.rpm
[root@slurmdbd ~]# xdmod-setup

暫くするとCUIで下記の表記になる

========================================================================
Open XDMoD Setup
========================================================================
 
1) General Settings
2) Database Settings
3) Organization
4) Resources
5) Create Admin User
6) Hierarchy
7) Data Warehouse Batch Export
8) Automatically Check for Updates
q) Quit
 
Select an option (1, 2, 3, 4, 5, 6, 7, 8, q):

[1]を入力して下記画面になります

========================================================================
General Setup
========================================================================
 
The template Apache configuration file uses a virtual host
listening on HTTPS port 443. The Site Address specified
here should match the settings in the Apache configuration.
 
Site Address: [https://localhost/] https://slurmdbd/            
 
The email address you specify will be used as the destination for any
messages sent via the portal contact page as well as account requests.  In
addition, any log messages configured for delivery via e-mail will be sent to
this address.
 
Email Address:       <-- そのままリターン
 
Chromium is required by the report generator for constructing reports.  Setup
will attempt to detect the presence of chromium on your system.
 
Chromium Path: [/usr/lib64/chromium-browser/headless_shell]       <-- そのままリターン
 
You have the ability to specify a logo which will appear on the upper-right
hand region of the portal.  It is advised that the height of the logo be at
most 32 pixels.
 
The logo is referenced by its absolute path on the file system and must
be readable by the user/group your web server is running as.
 
Center Logo Path:       <-- そのままリターン
 
This release of XDMoD features an optional replacement for the summary
tab that is intended to provide easier access to XDMoD's many features.
Detailed information is available at https://open.xdmod.org/dashboard.html
 
Enable Dashboard Tab (on, off)? [off]       <-- そのままリターン
 
Overwrite config file '/etc/xdmod/portal_settings.ini' (yes, no)? [yes]       <-- そのままリターン
Writing configuration to '/etc/xdmod/portal_settings.ini'
 
Settings saved.
 
Press ENTER to continue.   <-- ここでリターンキーを押下すすると元の選択肢画面になります

次に[2]を押下して「Database Settings」に入ります

========================================================================
Database Setup
========================================================================
 
Please provide the information required to connect to your MySQL database
server.  A user will be created using the username and password you provide.
 
NOTE: The database password cannot include single quote characters (') or
double quote characters (").
 
DB Hostname or IP: [localhost] 127.0.0.1      <-- localhostのままだとsoket通信になるみたい. なのでipを指定してます.
DB Port: [3306] 13306
DB Username: [xdmod]                <-- 事前にデータベースアカウントは作ってないです.
DB Password:
(confirm) DB Password:
 
Please provide the password for the administrative account that will be
used to create the MySQL user and databases.
 
DB Admin Username: [root]        <--- データベースインスタンス「XDMoD」の管理者権限を指定します
DB Admin Password:
(confirm) DB Admin Password:
Creating User xdmod
 
Creating database `mod_shredder`.
Granting privileges on database `mod_shredder`.
Initializing database `mod_shredder`.
 
Creating database `mod_hpcdb`.
Granting privileges on database `mod_hpcdb`.
Initializing database `mod_hpcdb`.
 
Creating database `moddb`.
Granting privileges on database `moddb`.
Initializing database `moddb`.
 
Creating database `modw`.
Granting privileges on database `modw`.
Initializing database `modw`.
 
Creating database `modw_aggregates`.
Granting privileges on database `modw_aggregates`.
Initializing database `modw_aggregates`.
 
Creating database `modw_filters`.
Granting privileges on database `modw_filters`.
Initializing database `modw_filters`.
 
Creating database `mod_logger`.
Granting privileges on database `mod_logger`.
Initializing database `mod_logger`.
 
Overwrite config file '/etc/xdmod/portal_settings.ini' (yes, no)? [yes]
Writing configuration to '/etc/xdmod/portal_settings.ini'
 
Settings saved.
 
Press ENTER to continue.

ちょいと確認

[root@slurmdbd ~]# mysql -h 127.0.0.1 -P 13306 -u root -p
Enter password:
MariaDB [(none)]> show databases;
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mod_hpcdb          |
| mod_logger         |
| mod_shredder       |
| moddb              |
| modw               |
| modw_aggregates    |
| modw_filters       |
| mysql              |
| performance_schema |
+--------------------+
MariaDB [(none)]>

あれぇ?インスタンスの中でいろいろデータベースを作ったみたい.
次[3]

========================================================================
Organization Setup
========================================================================
 
Organization Name: chaperone
Organization Abbreviation: chaperone
 
Overwrite config file '/etc/xdmod/organization.json' (yes, no)? [yes]
Writing configuration to '/etc/xdmod/organization.json'
 
Settings saved.
 
Press ENTER to continue.

略称ってないので.
次[4]

========================================================================
Resources Setup
========================================================================
 
1) Add a new resource
2) List entered resources
s) Save (and return to main menu)
 
Select an option (1, 2, s):

ここで計算リソースを定義する. いくつノードがあってトータルいくつのcoreがあるのか指定するみたい.
[1]を押下すると登録が開始される. 削除はないみたい.

========================================================================
Add A New Resource
========================================================================
 
The resource name you enter should match the name used by your resource
manager.  This is the resource name that you will need to specify during
the shredding process.  If you are using Slurm this must match the
cluster name used by Slurm.
 
Available resource types are:
HPC        - High-performance computing
HTC        - High-throughput computing
DIC        - Data-intensive computing
Grid       - Grid of resources
Cloud      - Cloud resource
Vis        - Visualization system
VM         - Virtual Machine system
Tape       - Tape storage resource
Disk       - Disk storage resource
StGrid     - Storage grid
US         - User Support
Gateway    - Web-based access to CI resources
 
 
Resource Name: cluster                              <--- 「/opt/slurm/etc/slurm.conf」の「ClusterName=」の値
Formal Name: cryoem cluster
Resource Type (hpc, htc, dic, grid, cloud, vis, vm, tape, disk, stgrid, us, gateway): [hpc] hpc
 
The number of nodes and processors are used to determine resource
utilization.
 
If this is a storage resource you may enter 0 for the number of nodes
and processors.
 
How many nodes does this resource have? 5
How many total processors (cpu cores) does this resource have? 20
========================================================================
Resources Setup
========================================================================
 
1) Add a new resource
2) List entered resources
s) Save (and return to main menu)
 
Select an option (1, 2, s): s
 
Overwrite config file '/etc/xdmod/resources.json' (yes, no)? [yes]
Writing configuration to '/etc/xdmod/resources.json'
 
Settings saved.
 
Press ENTER to continue.
 
Overwrite config file '/etc/xdmod/resource_specs.json' (yes, no)? [yes]
Writing configuration to '/etc/xdmod/resource_specs.json'
 
Settings saved.
 
Press ENTER to continue.

登録した値の修正は「/etc/xdmod/resources.json」で行える.
次に[5]
XDMoDのアカウント管理で、管理者を用意します. systemのrootではないです

========================================================================
Create Admin User
========================================================================
 
Username: administrator
Password:
(confirm) Password:
First name: admin
Last name: cluster
Email address:
 
Admin user created.
 
Press ENTER to continue.

次[6]....計算リソースのアクセスに階層を設けて見えるユーザ、見させないユーザを定めるそうな....いらね

========================================================================
Hierarchy Setup
========================================================================
 
Specify the levels (top, middle, and bottom) in your organization which would
be analogous to the following structure:
 
Top Level: Decanal Unit
Middle Level: Department
Bottom Level: PI Group
 
Top Level Name: [Hierarchy Top Level]
Top Level Description:
Middle Level Name: [Hierarchy Middle Level]
Middle Level Description:
Bottom Level Name: [Hierarchy Bottom Level]
Bottom Level Description:
 
Overwrite config file '/etc/xdmod/hierarchy.json' (yes, no)? [yes]
Writing configuration to '/etc/xdmod/hierarchy.json'
 
Settings saved.
 
Press ENTER to continue.

apache

パッケージにapache用のテンプレートがある. それをコピーします

[root@slurmdbd ~]# cp /usr/share/xdmod/templates/apache.conf /etc/httpd/conf.d/xdmod.conf
[root@slurmdbd ~]# systemctl enable httpd --now
[root@slurmdbd ~]# firewall-cmd --add-service=http --add-service=https --zone=public --permanent
[root@slurmdbd ~]# firewall-cmd --reload

「/etc/httpd/conf.d/ssl.conf」を無効にして xdmod.conf に「Listen 443」を付ければいい感じかな

そのままではhttps通信を要求するので独自ドメインなら自己証明書が必要かな.
SSOが可能なのでLDAP/ADと組み合わせての運用もいいのかもしれない.
SSOがある. これって自アカウントの情報のみ閲覧可とかなるのかは不明. 試していない

データの流れ

一旦「Shredder」機構でデータベースにデータを取り込む。その際 slurm向け、openPBS向けとか道具が用意されている
その後「Ingestor」機構で可視化向けのデータを作っているみたい。
「Shredder」と「Ingestor」は一枚のcronで行われ、先に「Shredder」を行うのが必須.
cronは「/etc/cron.d/xdmod」に置かれるが、初期値は「Shredder」も「Ingestor」もコメントが付けられて無効化されている.
適時必要な「Shredder」のコメントを外して、「Ingestor」を有効にします

[root@slurmdbd ~]# cat /etc/cron.d/xdmod
# Every morning at 3:00 AM -- run the report scheduler
0 3 * * * xdmod /usr/bin/php /usr/lib64/xdmod/report_schedule_manager.php >/dev/null
 
# Process data warehouse batch export requests.
0 4 * * * xdmod /usr/lib64/xdmod/batch_export_manager.php -q
 
# Check for updates (monthly).
0 1 1 * * xdmod /usr/lib64/xdmod/update_check.php >/dev/null
 
# Shredder examples:
# 0 1 * * * xdmod /usr/bin/xdmod-shredder --quiet -r resource-name -f pbs -d /var/spool/pbs/server_priv/accounting
# 0 1 * * * xdmod /usr/bin/xdmod-shredder --quiet -r resource-name -f sge -i /var/lib/gridengine/default/common/accounting
# 0 1 * * * xdmod /usr/bin/xdmod-slurm-helper --quiet -r resource-name
#
# NOTE: Don't run multiple shredders in parallel.
 
# Ingestor example:
# 1 1 * * * xdmod /usr/bin/xdmod-ingestor --quiet
#
# NOTE: Since the ingestor must be run after the shredder you should
#       combine both commands in a single cron job.
 
[root@slurmdbd ~]#

slurm メモ

XDMoDを運用するサイト(そこでDBも稼働)でslurmの「sacct」コマンドが必要です. 「sacct」が「/usr/bin」とかになければ「portal_settings.ini」で補正します

[root@slurmdbd ~]# vi /etc/xdmod/portal_settings.ini
 :
[slurm]
sacct = "/opt/slurm/bin/sacct"
 :
[root@slurmdbd ~]#

slurm向けの「Shredder」は特別に用意されたコマンドがあってそれが「xdmod-slurm-helper」です.
まずは
「/opt/slurm/bin/sacct --clusters cluster --allusers」でデータが引けることを確認して
「xdmod-slurm-helper -r cluster」で「Shredder」を行ってください. それが成功すれば
「xdmod-ingestor」で可視化が可能になります

openPBS メモ

openPBSの管理ノードには「/var/lib/pbs/server_priv/accounting」とかに課金情報が入っている. それをそのまま吸い上げるのが「/usr/bin/xdmod-shredder」コマンド.

画面

ほとんど実行していないので意味があまりないけど
2023y01m01d_083028684.png

最新の60件
2024-04-19 2024-04-18 2024-04-17 2024-04-16 2024-04-15 2024-04-11 2024-04-06 2024-04-05 2024-03-30 2024-03-29 2024-03-19 2024-03-17 2024-03-15 2024-03-06 2024-03-05 2024-03-03 2024-02-23 2024-02-22 2024-02-21 2024-02-20 2024-02-19 2024-02-18 2024-02-17 2024-02-13 2024-02-12 2024-02-09 2024-02-04 2024-02-03 2024-01-31 2024-01-30 2024-01-29 2024-01-28 2024-01-22 2024-01-16 2024-01-13 2024-01-09 2024-01-08 2024-01-07 2024-01-03 2023-12-22 2023-12-17

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-01-01 (日) 21:28:25