diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a274256..52ff929 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: max-parallel: 4 matrix: image: - - 'centos:8' + - 'centos/centos:stream8' - 'rockylinux:8' - 'rockylinux:9' - 'almalinux:8' @@ -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 diff --git a/defaults/main/install.yml b/defaults/main/install.yml index b6bc3c6..e03a861 100644 --- a/defaults/main/install.yml +++ b/defaults/main/install.yml @@ -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" @@ -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 diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 0d5c3cd..6ecc764 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -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 diff --git a/molecule/upgrade/molecule.yml b/molecule/upgrade/molecule.yml index e735121..f5d0f2a 100644 --- a/molecule/upgrade/molecule.yml +++ b/molecule/upgrade/molecule.yml @@ -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 diff --git a/molecule/upgrade/prepare.yml b/molecule/upgrade/prepare.yml index bd43cac..e95d10c 100644 --- a/molecule/upgrade/prepare.yml +++ b/molecule/upgrade/prepare.yml @@ -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: diff --git a/molecule/upgrade/vars/prepare.yml b/molecule/upgrade/vars/prepare.yml index 7c66ab3..1de872b 100644 --- a/molecule/upgrade/vars/prepare.yml +++ b/molecule/upgrade/vars/prepare.yml @@ -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" diff --git a/molecule/upgrade/verify.yml b/molecule/upgrade/verify.yml index 4115d08..678db80 100644 --- a/molecule/upgrade/verify.yml +++ b/molecule/upgrade/verify.yml @@ -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 \ No newline at end of file diff --git a/tasks/install-package.yml b/tasks/install-package.yml index dd1a56c..52a3692 100644 --- a/tasks/install-package.yml +++ b/tasks/install-package.yml @@ -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 diff --git a/vars/AlmaLinux/9.yml b/vars/AlmaLinux/9.yml index 62624aa..7e4b683 100644 --- a/vars/AlmaLinux/9.yml +++ b/vars/AlmaLinux/9.yml @@ -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 diff --git a/vars/CentOS/8.yml b/vars/CentOS/8.yml index 7891d1c..acc272b 100644 --- a/vars/CentOS/8.yml +++ b/vars/CentOS/8.yml @@ -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" diff --git a/vars/RedHat/9.yml b/vars/RedHat/9.yml index 4ba9c5c..88365f4 100644 --- a/vars/RedHat/9.yml +++ b/vars/RedHat/9.yml @@ -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 \ No newline at end of file diff --git a/vars/Rocky/9.yml b/vars/Rocky/9.yml index 62624aa..7e4b683 100644 --- a/vars/Rocky/9.yml +++ b/vars/Rocky/9.yml @@ -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