Skip to content

Commit

Permalink
Bootstrap OnDemand 4.0 dependencies (#3945)
Browse files Browse the repository at this point in the history
* Bootstrap OnDemand 4.0 dependencies

* Set VERSION variable when not a tag commit

* Fix e2e test setup

* Ubuntu and Debian use NodeJS 20 from nodesource
Not more ppc64le for Ubuntu or Debian builds

* NodeJS 20 for Amazon 2023

* Add ubuntu-24.04 and amzn2023 aarch64 builds back to matrix

* Still times out building amazon 2023 for aarch64
  • Loading branch information
treydock authored Nov 13, 2024
1 parent ed5e4db commit c91323f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 29 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ jobs:
- os: ubuntu-latest
ruby: "3.0.2"
bundler: "2.3.5"
# Test versions from RHEL8 & RHEL9
# Test versions from Debian 12
- os: ubuntu-latest
ruby: "3.1.2"
bundler: "2.3.7"
# Test versions from Amazon Linux 2023 and Ubuntu 24.04
- os: ubuntu-latest
ruby: "3.2.2"
bundler: "2.4.10"
# Test versions from RHEL8 & RHEL9
- os: ubuntu-latest
ruby: "3.3.5"
bundler: "2.5.16"
runs-on: ${{ matrix.os }}
name: Unit tests

Expand Down Expand Up @@ -129,20 +133,23 @@ jobs:
- x86_64
- aarch64
- ppc64le
version: ["3.1"]
version: ["4.0"]
exclude:
# Amazon 2023 on aarch64 is very slow and will time out
- dist: amzn2023
arch: aarch64
# Amazon 2023 doesn't have ppc64le containers
- dist: amzn2023
arch: ppc64le
# Ubuntu doesn't have way to get NodeJS 14+ on ppc64le
# Ubuntu and Debian doesn't have way to get NodeJS 20+ on ppc64le
- dist: ubuntu-20.04
arch: ppc64le
# Ubuntu doesn't have way to get NodeJS 14+ on ppc64le
- dist: ubuntu-22.04
arch: ppc64le
- dist: ubuntu-24.04
arch: ppc64le
- dist: debian-12
arch: ppc64le
runs-on: ${{ matrix.os }}
name: E2E test ${{ matrix.dist }}-${{ matrix.arch }}

Expand Down
21 changes: 9 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ stages:
- deploy

variables:
OOD_BUILD_REPO: '4.0'
GIT_STRATEGY: clone
GIT_DEPTH: 0
OOD_PACKAGING_DEBUG: 'true'
Expand All @@ -26,14 +27,11 @@ build-nightly:
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, debian-12]
- OOD_PACKAGING_DIST: [el9]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
# Ubuntu doesn't have way to get NodeJS 14+ on ppc64le
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04]
# Ubuntu and Debian don't have way to get NodeJS 20+ on ppc64le
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, debian-12]
OOD_PACKAGING_ARCH: [x86_64, aarch64]
# Ubuntu 24.04 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [ubuntu-24.04]
OOD_PACKAGING_ARCH: [x86_64, ppc64le]
# Amazon 2023 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [amzn2023]
OOD_PACKAGING_ARCH: [x86_64]
Expand All @@ -50,21 +48,20 @@ build:
# Re-enable once Gitlab instance using plugin to integrate with Github
# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"'
- if: '$CI_COMMIT_BRANCH !~ /^(master|release_[0-9]\.[0-9])$/ && $CI_COMMIT_TAG == null'
variables:
VERSION: '$OOD_BUILD_REPO.0'
script:
- bundle exec rake package:build[$OOD_PACKAGING_DIST,$OOD_PACKAGING_ARCH]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, debian-12]
- OOD_PACKAGING_DIST: [el9]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
# Ubuntu doesn't have way to get NodeJS 14+ on ppc64le
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04]
# Ubuntu and Debian don't have way to get NodeJS 20+ on ppc64le
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, debian-12]
OOD_PACKAGING_ARCH: [x86_64, aarch64]
# Ubuntu 24.04 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [ubuntu-24.04]
OOD_PACKAGING_ARCH: [x86_64, ppc64le]
# Amazon 2023 on aarch64 is slow and will time out
- OOD_PACKAGING_DIST: [amzn2023]
OOD_PACKAGING_ARCH: [x86_64]
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'rake'
gem 'dotenv', '~> 2.1'

group :package do
gem 'ood_packaging', '~> 0.15.2'
gem 'ood_packaging', '~> 0.16.1'
end

group :test do
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ GEM
oga (3.3)
ast
ruby-ll (~> 2.1)
ood_packaging (0.15.2)
ood_packaging (0.16.1)
rake (~> 13.0.1)
open_uri_redirections (0.2.1)
parallel (1.21.0)
Expand Down Expand Up @@ -177,7 +177,7 @@ DEPENDENCIES
beaker-docker (~> 1.4.0)
beaker-rspec
dotenv (~> 2.1)
ood_packaging (~> 0.15.2)
ood_packaging (~> 0.16.1)
rake
rspec
rubocop
Expand Down
6 changes: 3 additions & 3 deletions packaging/deb/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Maintainer: Ohio Supercomputer Center <[email protected]>
Build-Depends: debhelper (>=11~), curl, build-essential,
tzdata, libxml2-dev, libxslt-dev, pkg-config, zlib1g-dev, liblzma-dev,
ruby, ruby-dev,
nodejs (>= 18.0), nodejs (<< 19.0),
nodejs (>= 20.0), nodejs (<< 21.0),
sqlite3, libsqlite3-dev, python3@EXTRA_DEPENDS@
Standards-Version: 4.1.4
Homepage: https://openondemand.org
Expand All @@ -15,8 +15,8 @@ Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends},
ruby, apache2, sudo, lsof, lua-posix, tzdata, file,
nodejs (>= 18.0), nodejs (<< 19.0),
ondemand-nginx (= 1.24.0.p6.0.20.ood3.1), ondemand-passenger (= 6.0.20.ood3.1)
nodejs (>= 20.0), nodejs (<< 21.0),
ondemand-nginx (= 1.26.1.p6.0.23.ood4.0), ondemand-passenger (= 6.0.23.ood4.0)
Recommends: rclone
Description: Open OnDemand is an open source release of the Ohio SuperComputer Center's
OnDemand platform to provide HPC access via a web browser, supporting web based file
Expand Down
6 changes: 3 additions & 3 deletions packaging/rpm/ondemand.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%define git_tag_minus_v %(echo %{git_tag} | sed -r 's/^v//')
%define major_version %(echo %{git_tag_minus_v} | cut -d. -f1)
%define minor_version %(echo %{git_tag_minus_v} | cut -d. -f2)
%define runtime_version %{major_version}.%{minor_version}.6
%define runtime_version %{major_version}.%{minor_version}.1
%define runtime_release 1
%define runtime_version_full %{runtime_version}-%{runtime_release}%{?dist}
%define selinux_policy_ver %(rpm --qf "%%{version}" -q selinux-policy)
Expand Down Expand Up @@ -74,8 +74,8 @@ Requires: python3
Requires: rclone
%endif
Requires: ondemand-apache = %{runtime_version_full}
Requires: ondemand-nginx = 1.24.0-1.p6.0.20.ood%{runtime_version}%{?dist}
Requires: ondemand-passenger = 6.0.20-1.ood%{runtime_version}%{?dist}
Requires: ondemand-nginx = 1.26.1-1.p6.0.23.ood%{runtime_version}%{?dist}
Requires: ondemand-passenger = 6.0.23-1.ood%{runtime_version}%{?dist}
Requires: ondemand-ruby = %{runtime_version_full}
Requires: ondemand-nodejs = %{runtime_version_full}
Requires: ondemand-runtime = %{runtime_version_full}
Expand Down
12 changes: 8 additions & 4 deletions spec/e2e/e2e_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def bootstrap_repos
case host_inventory['platform']
when 'redhat'
repos << 'epel-release'
on hosts, 'dnf -y module enable ruby:3.1'
on hosts, 'dnf -y module enable nodejs:18'
on hosts, 'dnf -y module enable ruby:3.3'
on hosts, 'dnf -y module enable nodejs:20'
when 'ubuntu', 'debian'
on hosts, 'apt-get update'
end
Expand Down Expand Up @@ -163,7 +163,7 @@ def ondemand_repo
end

def build_repo_version
ENV['OOD_BUILD_REPO'] || '3.1'
ENV['OOD_BUILD_REPO'] || '4.0'
end

def install_ondemand
Expand All @@ -176,13 +176,17 @@ def install_ondemand
install_packages(['ondemand', 'ondemand-dex', 'ondemand-selinux'])
elsif apt?
install_packages(['wget'])
on hosts, "wget -O /tmp/ondemand-release.deb https://yum.osc.edu/ondemand/latest/ondemand-release-web_#{build_repo_version}.2-#{codename}_all.deb"
on hosts, "wget -O /tmp/ondemand-release.deb https://yum.osc.edu/ondemand/latest/ondemand-release-web_#{build_repo_version}.0-#{codename}_all.deb"
install_packages(['/tmp/ondemand-release.deb'])
on hosts,
"sed -i 's|ondemand/#{build_repo_version}/web|ondemand/build/#{build_repo_version}/web|g' /etc/apt/sources.list.d/ondemand-web.list"
on hosts, 'apt-get update'
install_packages(['ondemand', 'ondemand-dex'])
end
if host_inventory['platform'] == 'amazon'
on hosts, 'alternatives --install /usr/bin/node node /usr/bin/node-20 1'
on hosts, 'alternatives --install /usr/bin/npm npm /usr/bin/npm-20 1'
end
# Avoid 'update_ood_portal --rpm' so that --insecure can be used
on hosts, "sed -i 's|--rpm|--rpm --insecure|g' /etc/systemd/system/#{apache_service}.service.d/ood-portal.conf"
on hosts, 'systemctl daemon-reload'
Expand Down

0 comments on commit c91323f

Please sign in to comment.