@@ -7,75 +7,6 @@ log_info() {
77 printf " \n\e[0;35m $1 \e[0m\n\n"
88}
99
10- ARCHTYPE=` uname -m`
11- DEX_VERSION=${DEX_VERSION:- 2.31.1}
12- DEX_PATCH_VERSION=${DEX_PATCH_VERSION:- 703e26bc109e86d00be22ef1803bdb96b2dc09e2}
13-
14- log_info " Installing required packages for Ondemand ${ARCHTYPE} .."
15-
16- if [[ " ${ARCHTYPE} " = " x86_64" ]]; then
17- dnf install -y https://yum.osc.edu/ondemand/2.0/ondemand-release-web-2.0-1.noarch.rpm
18- dnf install -y \
19- netcat \
20- ondemand \
21- ondemand-dex
22- elif [[ " ${ARCHTYPE} " = " aarch64" ]]; then
23- # TODO: flesh out arm64 builds?
24- dnf install -y golang-bin
25- log_info " Install dex ${DEX_VERSION} ..."
26- wget -O /tmp/dex-${DEX_VERSION} .tar.gz https://github.com/dexidp/dex/archive/v${DEX_VERSION} .tar.gz
27- wget -O /tmp/dex-ood.patch https://github.com/OSC/dex/commit/${DEX_PATCH_VERSION} .patch
28- pushd /tmp
29- tar xvf dex-${DEX_VERSION} .tar.gz
30- pushd dex-${DEX_VERSION}
31- make build
32- mv bin/dex bin/dex-orig
33- patch -p1 < ../dex-ood.patch
34- make build
35- mv bin/dex /usr/sbin/ondemand-dex-session
36- mv bin/dex-orig /usr/sbin/ondemand-dex
37- popd
38- rm -rf /tmp/dex*
39- mkdir -p /usr/share/ondemand-dex/
40- git clone https://github.com/OSC/ondemand-dex.git
41- pushd ondemand-dex
42- mv web /usr/share/ondemand-dex/
43- popd
44- rm -Rf ondemand-dex
45- groupadd -r ondemand-dex
46- useradd -r -d /var/lib/ondemand-dex -g ondemand-dex -s /sbin/nologin -c " OnDemand Dex" ondemand-dex
47- mkdir -p /etc/ood/dex
48- tee /etc/ood/dex/config.yaml << EOF
49- ---
50- issuer: http://eb8307ff82be:5556
51- storage:
52- type: sqlite3
53- config:
54- file: "/etc/ood/dex/dex.db"
55- web:
56- http: 0.0.0.0:5556
57- telemetry:
58- http: 0.0.0.0:5558
59- staticClients:
60- - id: eb8307ff82be
61- redirectURIs:
62- - http://eb8307ff82be/oidc
63- name: OnDemand
64- secret: 7c6c2f51-2f97-4866-886e-2fcf5b974224
65- oauth2:
66- skipApprovalScreen: true
67- enablePasswordDB: true
68- staticPasswords:
69- - email: ood@localhost
70- hash: "$2 a$1 0$2 b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W"
71- username: ood
72- userID: '08a8684b-db88-4b73-90a9-3cd1661f5466'
73- frontend:
74- dir: "/usr/share/ondemand-dex/web"
75- theme: hpc-coop
76- EOF
77- fi
78-
7910log_info " Setting up Ondemand"
8011mkdir -p /etc/ood/config/clusters.d
8112mkdir -p /etc/ood/config/apps/shell
@@ -141,13 +72,11 @@ dex:
14172 theme: ondemand
14273EOF
14374
144- if [[ ${ARCHTYPE} = " x86_64" ]]; then
145- log_info " Generating new httpd24 and dex configs.."
146- /opt/ood/ood-portal-generator/sbin/update_ood_portal
75+ log_info " Generating new httpd24 and dex configs.."
76+ /opt/ood/ood-portal-generator/sbin/update_ood_portal
14777
148- log_info " Adding new theme to dex"
149- sed -i " s/theme: ondemand/theme: hpc-coop/g" /etc/ood/dex/config.yaml
150- fi
78+ log_info " Adding new theme to dex"
79+ sed -i " s/theme: ondemand/theme: hpc-coop/g" /etc/ood/dex/config.yaml
15180
15281dnf clean all
15382rm -rf /var/cache/dnf
0 commit comments