Skip to content

Commit 1b6b14b

Browse files
authored
Merge pull request #127 from ryanrath/pearc2022-xdmod-fixes
Pearc2022 xdmod fixes
2 parents 2930c92 + 3734817 commit 1b6b14b

6 files changed

Lines changed: 86 additions & 6 deletions

File tree

database/xdmod.cnf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mysqld]
2+
sql_mode =

xdmod/entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,15 @@ then
7575
export TERM=linux
7676
/srv/xdmod/scripts/supremm.py
7777

78+
echo "---> XDMoD Open OnDemand module setup"
79+
expect /srv/xdmod/scripts/xdmod-setup-ondemand.tcl | col -b
80+
7881
echo "---> Make sure we have a place to keep our backups"
7982
mkdir -p /srv/xdmod/backups
8083
fi
84+
echo "---> Staring php-fpm"
85+
mkdir -p /run/php-fpm
86+
php-fpm
8187

8288
echo "---> Starting HTTPD on xdmod..."
8389
# Sometimes on shutdown pid still exists, so delete it

xdmod/install.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ ARCHTYPE=`uname -m`
2121

2222
dnf install -y \
2323
expect \
24-
python2-pip
24+
python2-pip \
25+
php-pear \
26+
php-devel
2527

2628
pip2 install pexpect==4.4.0
2729

@@ -37,7 +39,10 @@ pip2 install pexpect==4.4.0
3739
# be installed in the same container. In a production deployment they may be installed
3840
# on separate hosts.
3941
#------------------------
40-
dnf install -y https://github.com/ubccr/xdmod/releases/download/v10.0.0/xdmod-10.0.0-1.0.beta1.el8.noarch.rpm
42+
dnf install -y https://github.com/ubccr/xdmod/releases/download/v10.0.0-beta4-el8/xdmod-10.0.0-1.4.beta4.el8.noarch.rpm \
43+
https://github.com/ubccr/xdmod-ondemand/releases/download/v10.0.0/xdmod-ondemand-10.0.0-1.0.beta1.el8.noarch.rpm \
44+
https://github.com/ubccr/xdmod/releases/download/v10.0.0-beta4-el8/xdmod-supremm-10.0.0-1.4.beta4.el8.noarch.rpm \
45+
https://github.com/ubccr/supremm/releases/download/2.0.0-beta3/supremm-2.0.0-1.0_beta3.el8.x86_64.rpm
4146

4247
#------------------------
4348
# The Job Performance software uses MongoDB to store the job-level performance
@@ -49,7 +54,15 @@ dnf install -y https://github.com/ubccr/xdmod/releases/download/v10.0.0/xdmod-10
4954
dnf install -y \
5055
https://repo.mongodb.org/yum/redhat/8/mongodb-org/5.0/${ARCHTYPE}/RPMS/mongodb-org-shell-5.0.9-1.el8.${ARCHTYPE}.rpm
5156

52-
pip3 install pymongo --upgrade
57+
58+
59+
#------------------------
60+
#
61+
#------------------------
62+
pecl install mongodb
63+
echo "extension=mongodb.so" >> /etc/php.d/40-mongodb.ini
64+
65+
pip3 install pymongo==3.7.0 --upgrade
5366
pip2 install pymongo --upgrade
5467

5568
#------------------------
@@ -74,6 +87,14 @@ sed -i 's/.*date.timezone[[:space:]]*=.*/date.timezone = UTC/' /etc/php.ini
7487
#------------------------
7588
rm -f /etc/httpd/conf.d/ssl.conf
7689

90+
#------------------------
91+
# We need to make sure that we have access to this file so that SSO works.
92+
#------------------------
93+
if [[ -f /etc/pki/tls/private/localhost.key ]]; then
94+
chown root:apache /etc/pki/tls/private/localhost.key
95+
chmod 750 /etc/pki/tls/private/localhost.key
96+
fi
97+
7798
#------------------------
7899
# These commands remove cached files to reduce the overall image size.
79100
#------------------------

xdmod/scripts/supremm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
import pexpect
33
import sys
44

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env expect
2+
# Expect script that run s xdmod-setup to configure a freshly installed
3+
# XDMoD instance. This script will fail if run against an already installed
4+
# XDMoD.
5+
6+
#-------------------------------------------------------------------------------
7+
# Configuration settings for the XDMoD resources
8+
9+
#-------------------------------------------------------------------------------
10+
11+
# Load helper functions from helper-functions.tcl
12+
source [file join [file dirname [info script]] helper-functions.tcl]
13+
14+
#-------------------------------------------------------------------------------
15+
# main body - note there are some hardcoded addresses, usernames and passwords here
16+
# they should typically not be changed as they need to match up with the
17+
# settings in the docker container
18+
19+
set timeout 240
20+
spawn "xdmod-setup"
21+
22+
# Add an OnDemand resource
23+
selectMenuOption 4
24+
25+
selectMenuOption 1
26+
provideInput {Resource Name:} ondemand
27+
provideInput {Formal Name:} {Open OnDemand Instance}
28+
provideInput {Resource Type*} Gateway
29+
provideInput {How many nodes does this resource have?} 0
30+
provideInput {How many total processors (cpu cores) does this resource have?} 0
31+
32+
selectMenuOption s
33+
confirmFileWrite yes
34+
enterToContinue
35+
confirmFileWrite yes
36+
enterToContinue
37+
38+
# Setup the OnDemand database
39+
selectMenuOption 10
40+
41+
selectMenuOption d
42+
43+
answerQuestion {DB Admin Username} root
44+
providePassword {DB Admin Password:} {}
45+
confirmDropDb yes
46+
provideInput {Do you want to see the output*} {no}
47+
48+
selectMenuOption q
49+
50+
selectMenuOption q
51+
52+
lassign [wait] pid spawnid os_error_flag value
53+
exit $value

xdmod/scripts/xdmod-setup-start.tcl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ spawn "xdmod-setup"
1717
selectMenuOption 1
1818
answerQuestion {Site Address} https://localhost:4443/
1919
provideInput {Email Address:} ccr-xdmod-help@buffalo.edu
20-
provideInput {Java Path:} /usr/bin/java
21-
provideInput {Javac Path:} /usr/bin/javac
2220
provideInput {Chromium Path:} /usr/lib64/chromium-browser/headless_shell
2321
provideInput {Center Logo Path:} /srv/xdmod/small-logo.png
2422
provideInput {Center Logo Width:} 354

0 commit comments

Comments
 (0)