Skip to content

Commit

Permalink
update to 3.1 (#228)
Browse files Browse the repository at this point in the history
This does a couple things:

* primarily it upgrades to 3.1, installing the newer package. A lot of small updates have been made to accommodate this. Mostly testing updates, but most EL distros now specifies the node and ruby version in their var files.
* This fixes the test suite as GH actions seems to have updated.
  • Loading branch information
johrstrom authored Feb 28, 2024
1 parent 75a91fe commit c694272
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 40 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
max-parallel: 4
matrix:
image:
- 'centos:8'
- 'centos/centos:stream8'
- 'rockylinux:8'
- 'rockylinux:9'
- 'almalinux:8'
Expand All @@ -36,16 +36,6 @@ jobs:
scenario:
- 'default'
- 'upgrade'
exclude:
# 2.0 did not support el:9 and ubuntu:22
- scenario: upgrade
image: 'rockylinux:9'
- scenario: upgrade
image: 'ubuntu:22.04'
- scenario: upgrade
image: 'almalinux:8'
- scenario: upgrade
image: 'almalinux:9'

steps:
- name: checkout
Expand Down
8 changes: 4 additions & 4 deletions defaults/main/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ apache_etc_dir: "/etc/{{ apache_service_name }}"
apache_conf_dir: "{{ apache_etc_dir }}/conf.d"
apache_log_dir: "/var/log/{{ apache_service_name }}"

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

rpm_repo_key: "https://yum.osc.edu/ondemand/RPM-GPG-KEY-ondemand"
deb_repo_key: "https://apt.osc.edu/ondemand/DEB-GPG-KEY-ondemand"
Expand All @@ -40,5 +40,5 @@ ondemand_dex_package: ondemand-dex # behaviour as for ondemand_package

# needed for testing. no reason to change these in production.
disable_htcacheclean: false
nodejs_version: 14
ruby_version: 3.0
nodejs_version: 18
ruby_version: 3.1
18 changes: 9 additions & 9 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ lint: |
platforms:
- name: default
image: ${IMAGE:-"centos:7"}
image: ${IMAGE:-"rockylinux:8"}
command: /sbin/init
tmpfs:
- /run
- /tmp
"/run": "rw"
"/tmp": "rw"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: custom
image: ${IMAGE:-"centos:7"}
image: ${IMAGE:-"rockylinux:8"}
command: /sbin/init
tmpfs:
- /run
- /tmp
"/run": "rw"
"/tmp": "rw"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: oidc
image: ${IMAGE:-"centos:7"}
image: ${IMAGE:-"rockylinux:8"}
command: /sbin/init
tmpfs:
- /run
- /tmp
"/run": "rw"
"/tmp": "rw"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

Expand Down
6 changes: 3 additions & 3 deletions molecule/upgrade/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ lint: |
platforms:
- name: default
image: ${IMAGE:-"centos:7"}
image: ${IMAGE:-"rockylinux:8"}
command: /sbin/init
tmpfs:
- /run
- /tmp
"/run": "rw"
"/tmp": "rw"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

Expand Down
14 changes: 14 additions & 0 deletions molecule/upgrade/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@

- name: Install previous version
hosts: all

pre_tasks:
- name: Set dependency versions on el8
set_fact:
ruby_version: 3.0
nodejs_version: 14
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == '8'

- name: Use default versions on el8
set_fact:
additional_rpm_installs:
- lua-posix
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == '9'

roles:
- role: ood-ansible
vars_files:
Expand Down
8 changes: 3 additions & 5 deletions molecule/upgrade/vars/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ondemand_package: "ondemand{% if ansible_os_family == 'RedHat' %}-{% else %}={% endif %}2.0.28"
ondemand_package: "ondemand{% if ansible_os_family == 'RedHat' %}-{% else %}={% endif %}3.0.3"
disable_htcacheclean: true
nodejs_version: 12
ruby_version: 2.7
apt_repo_url: "https://apt.osc.edu/ondemand/2.0/ondemand-release-web_2.0.0_all.deb"
rpm_repo_url: "https://yum.osc.edu/ondemand/2.0/ondemand-release-web-2.0-1.noarch.rpm"
apt_repo_url: "https://apt.osc.edu/ondemand/3.0/ondemand-release-web_3.0.0_all.deb"
rpm_repo_url: "https://yum.osc.edu/ondemand/3.0/ondemand-release-web-3.0-1.noarch.rpm"
9 changes: 3 additions & 6 deletions molecule/upgrade/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@
- name: Include verity default tasks
ansible.builtin.include_tasks: tasks/verify_default.yml
when: inventory_hostname == "default"
- name: Verify node version

- name: Verify OOD version
ansible.builtin.shell: |
set -o pipefail
if [ -f /opt/ood/ondemand/enable ]; then
source /opt/ood/ondemand/enable
fi
node --version | grep v14
grep -P '3.1.(\d)*' /opt/ood/VERSION
args:
executable: /bin/bash
changed_when: false
10 changes: 10 additions & 0 deletions tasks/install-package.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
- name: Set el_distro when OS is RHEL
set_fact:
el_distro: "el{{ ansible_distribution_major_version }}"
when: ansible_os_family == "RedHat"

- name: Set deb_distro when OS is Debian
set_fact:
deb_distro: "{{ ansible_distribution_release }}"
when: ansible_os_family == "Debian"

- name: Install the rpm repo's key
ansible.builtin.rpm_key:
state: present
Expand Down
2 changes: 2 additions & 0 deletions vars/AlmaLinux/9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ locations_ini: "/opt/ood/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passen

additional_rpm_installs:
- lua-posix
- '@nodejs:{{ nodejs_version }}'
- '@ruby:{{ ruby_version }}'

rpm_repo_key: https://yum.osc.edu/ondemand/RPM-GPG-KEY-ondemand-SHA512
4 changes: 2 additions & 2 deletions vars/CentOS/8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ locations_ini: "/opt/ood/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passen

additional_rpm_installs:
- lua-posix
- "@ruby:{{ ruby_version }}"
- "@nodejs:{{ nodejs_version }}"
- "@ruby:{{ ruby_version }}/common"
- "@nodejs:{{ nodejs_version }}/common"
2 changes: 2 additions & 0 deletions vars/RedHat/9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ locations_ini: "/opt/ood/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passen

additional_rpm_installs:
- lua-posix
- @nodejs:{{ nodejs_version }}
- @ruby:{{ ruby_version }}

rpm_repo_key: https://yum.osc.edu/ondemand/RPM-GPG-KEY-ondemand-SHA512
2 changes: 2 additions & 0 deletions vars/Rocky/9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ locations_ini: "/opt/ood/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passen

additional_rpm_installs:
- lua-posix
- '@nodejs:{{ nodejs_version }}'
- '@ruby:{{ ruby_version }}'

rpm_repo_key: https://yum.osc.edu/ondemand/RPM-GPG-KEY-ondemand-SHA512

0 comments on commit c694272

Please sign in to comment.