Skip to content

Commit d5ff8fa

Browse files
authored
Merge pull request #262 from OSC/develop
Update to 4.0. This has a few things in it in addition to updating to 4.0. * It removes support for EL7 as that's been dropped since OOD version 3.1 * Adds functionality for flexible ondemand.d configurations (support for generic support for ondemand.d files #257)
2 parents 3fddba1 + 09ef4ca commit d5ff8fa

26 files changed

+217
-1520
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,8 @@ jobs:
4848
run: |
4949
python3 -m pip install -r molecule/requirements.txt
5050
ansible-galaxy collection install community.general
51-
sudo apt update && sudo apt install -y podman
51+
sudo apt update && sudo apt upgrade -y && sudo apt install -y podman
5252
53-
# we have to patch crun here because Ubuntu fails with the errors similar to the
54-
# github issue below.
55-
# https://github.com/containers/crun/issues/1308
56-
- name: patch crun
57-
run: |
58-
export CRUN_VER='1.14.3'
59-
mkdir -p "${HOME}/.local/bin"
60-
curl -L "https://github.com/containers/crun/releases/download/${CRUN_VER}/crun-${CRUN_VER}-linux-amd64" -o "${HOME}/.local/bin/crun"
61-
chmod +x "${HOME}/.local/bin/crun"
62-
63-
mkdir -p "${HOME}/.config/containers"
64-
cat << EOF > "${HOME}/.config/containers/containers.conf"
65-
[engine.runtimes]
66-
crun = [
67-
"${HOME}/.local/bin/crun",
68-
"/usr/bin/crun"
69-
]
70-
EOF
7153
- name: run tests
7254
run: molecule test --scenario-name=${{ matrix.scenario }}
7355
env:

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This ansible role installs and configures [Open OnDemand](https://openondemand.o
1515
- [ood_apps](#ood_apps)
1616
- [Open ID Connect](#open-id-connect)
1717
- [Install Dex](#install-dex)
18+
- [OnDemand.d Configurations](#ondemandd-configurations)
1819
- [Contributing](#contributing)
1920

2021
## Version compatibility
@@ -294,6 +295,51 @@ See [auth\_openidc](https://github.com/zmartzone/mod_auth_openidc) for more info
294295

295296
To install dex for OIDC use set the flag `install_ondemand_dex` to true and it will install the package.
296297

298+
### OnDemand.d Configurations
299+
300+
In the 4.0 release of this role, configurations for `ondemand.d` files was changed.
301+
While this role will continue to support the old way of specifing each
302+
variable and writing them all out to a single `ondemand.d/ondemand.yml` file,
303+
users should begin to migrate to the new way to write these files.
304+
305+
4.0 introduced `ood_ondemand_d_configs` which will in turn write out as many files
306+
as you've provided.
307+
308+
Each configuration at a minimum needs `content` which will be the content of
309+
the file that's begin written. It can additionally accept ``group`` and ``mode``
310+
to set the file's group ownership and file access mode. These files are always
311+
owned by the ``root`` user.
312+
313+
In this example, we're writing out two files, ``motd.yml`` and ``globus.yml``.
314+
These filenames are given by the top level keys under ``ood_ondemand_d_configs``.
315+
316+
``content`` specifies the content of the file that's going to be written out.
317+
This should be in YAML and will be written out in YAML.
318+
319+
In this configuration ``motd.yml`` will be written out with ``644 root:root``
320+
permissions. ``globus.yml`` on the other hand will be written out with
321+
``640 root:specialusers`` permissions so it'll only be available for certain
322+
users.
323+
324+
```yaml
325+
ood_ondemand_d_configs:
326+
motd:
327+
content:
328+
motd_render_html: true
329+
globus:
330+
content:
331+
globus_endpoints:
332+
- path: "<%= CurrentUser.home %>"
333+
endpoint: "716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
334+
endpoint_path: "/"
335+
336+
- path: "/project"
337+
endpoint: "9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
338+
endpoint_path: "/"
339+
group: specialusers
340+
mode: 640
341+
```
342+
297343
## Contributing
298344

299345
If you run into an issue or have a feature request or fixed some issue, let us know! PRs welcome! Even if you

defaults/main/install.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ apache_etc_dir: "/etc/{{ apache_service_name }}"
1717
apache_conf_dir: "{{ apache_etc_dir }}/conf.d"
1818
apache_log_dir: "/var/log/{{ apache_service_name }}"
1919

20-
rpm_repo_url: "https://yum.osc.edu/ondemand/3.1/ondemand-release-web-3.1-1.{{ el_distro }}.noarch.rpm"
21-
apt_repo_url: "https://apt.osc.edu/ondemand/3.1/ondemand-release-web_3.1.1-{{ deb_distro }}_all.deb"
20+
rpm_repo_url: "https://yum.osc.edu/ondemand/4.0/ondemand-release-web-4.0-1.{{ el_distro }}.noarch.rpm"
21+
apt_repo_url: "https://apt.osc.edu/ondemand/4.0/ondemand-release-web_4.0.0-{{ deb_distro }}_all.deb"
2222

2323
rpm_repo_key: "https://yum.osc.edu/ondemand/RPM-GPG-KEY-ondemand"
2424
deb_repo_key: "https://apt.osc.edu/ondemand/DEB-GPG-KEY-ondemand"
@@ -42,7 +42,7 @@ ondemand_dex_package: ondemand-dex # behaviour as for ondemand_package
4242

4343
# needed for testing. no reason to change these in production.
4444
disable_htcacheclean: false
45-
nodejs_version: 18
46-
ruby_version: 3.1
45+
nodejs_version: 20
46+
ruby_version: 3.3
4747

4848
ood_base_apache_dir: "/var/www/ood"

defaults/main/ondemand.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ hide_app_version: false
9393
# google_analytics_tag_id: null
9494

9595
motd_render_html: false
96+
97+
# ood_ondemand_d_configs: {}

defaults/main/ood_portal.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# - 443
1616

1717
httpd_use_rewrites: true
18+
ood_http_redirect_host: '%{HTTP_HOST}'
1819
maintenance_ip_allowlist: []
1920
use_maintenance: true
2021
# security_csp_frame_ancestors:
@@ -118,6 +119,7 @@ oidc_settings_samefile: false
118119
# oidc_state_max_number_of_cookies: "10 true"
119120
# oidc_cookie_same_site: "On"
120121
# oidc_settings: {}
122+
# ood_oidc_crypto_passphrase: changeme
121123
# dex_uri: null
122124
# dex_settings: |
123125
# dex:

molecule/default/fixtures/config/ood_portal.yml.custom.apache2

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ logformat: '"%O %h \"%{Referer}i\" \"%r\" %v \"%{User-Agent}i\" %{SSL_PROTOCOL}e
8282
# Default: true
8383
use_rewrites: true
8484

85+
# Specify the host to redirect to when redirecting from port 80
86+
# Example:
87+
# http_redirect_host: my.proxy.host
88+
# Default: '%{HTTP_HOST}'
89+
http_redirect_host: '%{HTTP_HOST}'
90+
8591
# Should Maintenance Rewrite rules be added
8692
# Example:
8793
# use_maintenance: false
@@ -386,6 +392,12 @@ oidc_uri: /custom-oidc-path
386392
# Default: "openid profile email"
387393
#oidc_scope: "openid profile email"
388394

395+
# OIDC crypto passphrase
396+
# Example:
397+
# oidc_crypto_passphrase: "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
398+
# Default: SHA1 sum of servername
399+
#oidc_crypto_passphrase: ~
400+
389401
# OIDC session inactivity timeout
390402
# Example:
391403
# oidc_session_inactivity_timeout: 28800

molecule/default/fixtures/config/ood_portal.yml.custom.httpd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ logformat: '"%O %h \"%{Referer}i\" \"%r\" %v \"%{User-Agent}i\" %{SSL_PROTOCOL}e
8282
# Default: true
8383
use_rewrites: true
8484

85+
# Specify the host to redirect to when redirecting from port 80
86+
# Example:
87+
# http_redirect_host: my.proxy.host
88+
# Default: '%{HTTP_HOST}'
89+
http_redirect_host: '%{HTTP_HOST}'
90+
8591
# Should Maintenance Rewrite rules be added
8692
# Example:
8793
# use_maintenance: false
@@ -386,6 +392,12 @@ oidc_uri: /custom-oidc-path
386392
# Default: "openid profile email"
387393
#oidc_scope: "openid profile email"
388394

395+
# OIDC crypto passphrase
396+
# Example:
397+
# oidc_crypto_passphrase: "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
398+
# Default: SHA1 sum of servername
399+
#oidc_crypto_passphrase: ~
400+
389401
# OIDC session inactivity timeout
390402
# Example:
391403
# oidc_session_inactivity_timeout: 28800

0 commit comments

Comments
 (0)