From e86de6341ae207094f7a103101ca713171ad6f9f Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Wed, 9 Oct 2024 14:48:36 -0400 Subject: [PATCH] Add Cardinal support (#16) * use auto_accounts * use auto_modules * support el 9 on cardinal * rm el7 support --- .gitlab-ci.yml | 2 +- form.yml.erb => form.yml | 26 +++++--------------------- submit.yml.erb | 1 - template/script.sh.erb | 29 ++++++++++++++++++----------- 4 files changed, 24 insertions(+), 34 deletions(-) rename form.yml.erb => form.yml (66%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4cda477..cc2bffa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ rpm-build: - ./tmp/ondemand-packaging/bin/ood_packaging -w $CI_PROJECT_DIR/tmp/work -o $CI_PROJECT_DIR/tmp/output -V $CI_COMMIT_TAG -T $CI_PROJECT_DIR parallel: matrix: - - OOD_PACKAGING_DIST: [el7, el8] + - OOD_PACKAGING_DIST: [el8] artifacts: paths: - tmp/output diff --git a/form.yml.erb b/form.yml similarity index 66% rename from form.yml.erb rename to form.yml index a140f14..c7c9721 100644 --- a/form.yml.erb +++ b/form.yml @@ -1,14 +1,10 @@ -<%- - groups = OodSupport::User.new.groups.sort_by(&:id).tap { |groups| - groups.unshift(groups.delete(OodSupport::Process.group)) - }.map(&:name).grep(/^P./) --%> --- cluster: - "owens" +- "cardinal" form: - - version - - account + - auto_modules_stata + - auto_accounts - bc_num_hours - bc_num_slots - num_cores @@ -29,13 +25,6 @@ attributes: bc_num_slots: "1" bc_vnc_resolution: required: true - account: - label: "Project" - widget: select - options: - <%- groups.each do |group| %> - - "<%= group %>" - <%- end %> node_type: widget: select label: "Node type" @@ -49,16 +38,11 @@ attributes: - [ "any", "any", data-max-num-cores: 28, + data-min-num-cores: 1, ] - [ "hugemem", "hugemem", data-min-num-cores: 4, data-max-num-cores: 48, + data-option-for-cluster-cardinal: false, ] - version: - widget: select - label: "Stata version" - help: "This defines the version of Stata you want to load." - options: - - [ "15", "stata/15" ] - - [ "17", "stata/17" ] diff --git a/submit.yml.erb b/submit.yml.erb index 9c97fa6..ab2240e 100644 --- a/submit.yml.erb +++ b/submit.yml.erb @@ -14,7 +14,6 @@ batch_connect: template: vnc script: - accounting_id: "<%= account %>" native: <%- slurm_args.each do |arg| %> - "<%= arg %>" diff --git a/template/script.sh.erb b/template/script.sh.erb index 7ce46c3..f4cd48c 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -9,28 +9,35 @@ cd "${HOME}" # # Launch Xfce Window Manager and Panel # +export SEND_256_COLORS_TO_REMOTE=1 +export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>" +export XDG_DATA_HOME="<%= session.staged_root.join("share") %>" +export XDG_CACHE_HOME="$(mktemp -d)" +export $(dbus-launch) -( - export SEND_256_COLORS_TO_REMOTE=1 - export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>" - export XDG_DATA_HOME="<%= session.staged_root.join("share") %>" - export XDG_CACHE_HOME="$(mktemp -d)" - export $(dbus-launch) +module restore +set -x - module restore - set -x +source /etc/os-release + +if [[ "$VERSION_ID" < "9" ]]; then xfwm4 --compositor=off --daemon --sm-client-disable xsetroot -solid "#D3D3D3" xfsettingsd --sm-client-disable - xfce4-panel --sm-client-disable -) & + xfce4-panel --sm-client-disable & +else + xfwm4 --compositor=off --sm-client-disable & + xsetroot -solid "#D3D3D3" + xfsettingsd --sm-client-disable & + xfce4-panel --sm-client-disable & +fi # # Start Stata # # Load the required enviornment -module load <%= context.version %> +module load <%= context.auto_modules_stata %> # For reference: # # whatis("loads stata")