Skip to content

Commit 90d5060

Browse files
committed
feat(ondemand): gh #824 added OnDemand 2.1 RPM + Sid and FASRC profiles
1 parent e18c79c commit 90d5060

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2422
-0
lines changed

ondemand/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/data
2+
3+
VERSION

ondemand/Makefile

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# default build target
2+
all::
3+
4+
all:: dev
5+
.PHONY: dev remote-dev remote-fasse test release down up clean clean-remote-dev clean-remote-fasse version next-version docker-build docker-build-slurm docker-build-ood docker-push
6+
7+
OOD_UID := $(shell id -u)
8+
OOD_GID := $(shell id -g)
9+
OOD_TAG := 2.1.0-0.rc8.el7
10+
SLURM_TAG := slurm-21-08-6-1
11+
REMOTE_USERNAME := $(if $(SSH_USERNAME),$(SSH_USERNAME),$(USER))
12+
SID_SLURM_IMAGE := hmdc/sid-slurm:$(SLURM_TAG)
13+
SID_ONDEMAND_IMAGE := hmdc/sid-ood:$(SLURM_TAG)-ood-$(OOD_TAG)
14+
15+
ENV := env SLURM_TAG=$(SLURM_TAG) SID_SLURM_IMAGE=$(SID_SLURM_IMAGE) SID_ONDEMAND_IMAGE=$(SID_ONDEMAND_IMAGE) OOD_UID=$(OOD_UID) OOD_GID=$(OOD_GID)
16+
17+
DETACHED_MODE := $(if $(DETACHED),-d,)
18+
19+
NODE_VERSION :=`cat ../.node-version`
20+
PWD := $(shell pwd)
21+
22+
ifneq ($(shell git branch --show-current),stable)
23+
NPM_RUN_VERSION_ARGS := --config='.release-it-dev.json'
24+
endif
25+
26+
TEMPLATE_LOCATION := ./application/lib/ood_core/batch_connect/templates
27+
TURBOVNC_TEMPLATE := turbovnc.rb
28+
KVM_TEMPLATE := kvm.rb
29+
30+
remote-dev clean-remote-dev: LOGIN_HOST := login.rc.fas.harvard.edu
31+
remote-dev clean-remote-dev: APP_FOLDER := ./fasrc/dev/dashboard
32+
remote-dev: TEMPLATE_URL := https://iqss-sid.rc.fas.harvard.edu/pun/sys/dashboard/files/fs/var/www/ood/apps/sys/sid/lib/ood_core/batch_connect/templates
33+
remote-dev: CHECK_TEMPLATE_VERSION := "check_version"
34+
35+
remote-fasse clean-remote-fasse: LOGIN_HOST := fasselogin.rc.fas.harvard.edu
36+
remote-fasse clean-remote-fasse: APP_FOLDER := ./.fasseood/dev/dashboard
37+
remote-fasse: TEMPLATE_URL := https://fasse-iqss-ood.rc.fas.harvard.edu/pun/sys/dashboard/files/fs/var/www/ood/apps/sys/sid/lib/ood_core/batch_connect/templates
38+
remote-fasse: HTTP_PROXY := http://rcproxy.rc.fas.harvard.edu:3128
39+
remote-fasse: HTTPS_PROXY := http://rcproxy.rc.fas.harvard.edu:3128
40+
remote-fasse: CHECK_TEMPLATE_VERSION := ""
41+
42+
dev: down up
43+
44+
remote-dev remote-fasse: version
45+
$(ENV) http_proxy=$(HTTP_PROXY) https_proxy=$(HTTPS_PROXY) docker-compose build
46+
@echo "You need to be connected to the VPN"
47+
ssh $(REMOTE_USERNAME)@$(LOGIN_HOST) mkdir -p $(APP_FOLDER)
48+
$(ENV) docker-compose run --no-deps --entrypoint="" ood su - ood bash -c "export PATH=/home/ood/bin:/home/ood/ondemand/dev/dashboard/node_modules/.bin:$$PATH; cd /home/ood/ondemand/dev/dashboard; scl enable rh-ruby27 rh-nodejs14 'gem install --user-install bundler -v 2.1.4 && bundle config --local path 'vendor/bundle' && bundle install && npm install yarn --save && bundle exec rake assets:precompile'"
49+
@echo "You need to be connected to the VPN"
50+
@./download_and_check.sh $(REMOTE_USERNAME) $(TEMPLATE_URL)/$(TURBOVNC_TEMPLATE) $(TEMPLATE_LOCATION)/$(TURBOVNC_TEMPLATE) $(CHECK_TEMPLATE_VERSION)
51+
@./download_and_check.sh $(REMOTE_USERNAME) $(TEMPLATE_URL)/$(KVM_TEMPLATE) $(TEMPLATE_LOCATION)/$(KVM_TEMPLATE) $(CHECK_TEMPLATE_VERSION)
52+
rsync -avz --delete --exclude-from='rsync-exclude.conf' ./application/ -e ssh $(REMOTE_USERNAME)@$(LOGIN_HOST):$(APP_FOLDER)
53+
54+
test:
55+
$(ENV) docker-compose run --no-deps --entrypoint="" ood su - ood bash -c "export PATH=/home/ood/bin:/home/ood/ondemand/dev/dashboard/node_modules/.bin:$$PATH; cd /home/ood/ondemand/dev/dashboard; scl enable rh-ruby27 rh-nodejs14 'gem install --user-install bundler -v 2.1.4 && bundle config --local path 'vendor/bundle' && bundle install && npm install yarn --save && bundle exec rake test'"
56+
57+
release: next-version
58+
$(ENV) docker-compose run --no-deps --entrypoint="" ood su - ood bash -c "export PATH=/home/ood/bin:/home/ood/ondemand/dev/dashboard/node_modules/.bin:$$PATH; export RAILS_ENV=production; cd /home/ood/ondemand/dev/dashboard; scl enable rh-ruby27 rh-nodejs14 'gem install --user-install bundler -v 2.1.4 && bundle config --local path 'vendor/bundle' && bundle install && npm install yarn --save && bundle exec rake assets:precompile'"
59+
mkdir -p ./target
60+
tar -czvf ./target/sid2-dashboard.tar.gz ./application
61+
62+
down:
63+
$(ENV) docker-compose down -v || :
64+
65+
up:
66+
$(ENV) docker-compose up --build $(DETACHED_MODE)
67+
68+
clean:
69+
rm -rf application/.bundle application/VERSION application/log application/node_modules application/public/assets application/tmp application/vendor/bundle data/*
70+
$(ENV) docker-compose down --rmi all --volumes
71+
72+
clean-remote-dev clean-remote-fasse:
73+
echo "For FASSE, you need to be connected to the VPN"
74+
ssh $(REMOTE_USERNAME)@$(LOGIN_HOST) rm -rfv $(APP_FOLDER) || :
75+
76+
next-version:
77+
docker run --rm -v $(PWD)/..:/usr/app -w /usr/app node:$(NODE_VERSION) /bin/bash -c "npm install && npm run version -- $(NPM_RUN_VERSION_ARGS) | tail -n 1 > dashboard/application/VERSION"
78+
79+
docker-build: docker-build-slurm docker-build-ood
80+
81+
docker-push:
82+
docker push $(SID_SLURM_IMAGE)
83+
docker push $(SID_ONDEMAND_IMAGE)
84+
85+
docker-build-slurm:
86+
docker build --build-arg SLURM_TAG=$(SLURM_TAG) -t $(SID_SLURM_IMAGE) -f docker/Dockerfile.slurm .
87+
88+
docker-build-ood:
89+
docker build --build-arg OOD_TAG=$(OOD_TAG) --build-arg SLURM_TAG=$(SLURM_TAG) -t $(SID_ONDEMAND_IMAGE) -f docker/Dockerfile.ondemand .
90+
91+
docker-push-ood:
92+
docker push $(SID_ONDEMAND_IMAGE)

ondemand/announcements.d/status.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div style='text-decoration;none;border: 1px solid #000;background-color:#53a065;padding: 6px 10px 6px 6px;'><a class='wpfront-button' href='https://status.rc.fas.harvard.edu'>STATUS PAGE</a> <span><font color='#fff' style='text-decoration:none;padding:4px;'>No known issues. </font> </span></div>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDLjCCAhYCCQCtMM3TbnCVsTANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJV
3+
UzEWMBQGA1UECAwNTWFzc2FjaHVzZXR0czEPMA0GA1UEBwwGQm9zdG9uMQ0wCwYD
4+
VQQKDARJUVNTMRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcNMjIwMTEyMTYzMzM4WhcN
5+
NDkwNTMwMTYzMzM4WjBZMQswCQYDVQQGEwJVUzEWMBQGA1UECAwNTWFzc2FjaHVz
6+
ZXR0czEPMA0GA1UEBwwGQm9zdG9uMQ0wCwYDVQQKDARJUVNTMRIwEAYDVQQDDAls
7+
b2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDclKu05+65
8+
0yRV1yU/NmGLWCGqyeM7N1MIDlgHewtFiL20YEUy392wyOzo663yKxHrBoJormP6
9+
hbb/nW2/LLx4gJ0JZ+N7/Vo40trJV6sTdOsiL7Xzp1MURZPcBEuF/pS16MDVvtoF
10+
CdQrvG8dzX/Znbtmu8jVP+WOADcguvECp/tOpkYBMBwxXvmpAch15WEzuSyPXg4e
11+
cCufJE34c77tGcEbns+vikWrW1Evy6vVjmJPDk915p+HkPfXoXiN+4DnAttLUHNL
12+
sAwcuRWYSCsD/tiMtjHQIzHHiU/AmmKz84rcUlYkcSu2T78rG8TaYIK20oXHfJHA
13+
Hfcjfll8g/AHAgMBAAEwDQYJKoZIhvcNAQELBQADggEBANbwpF7T+Bs+o192f6E+
14+
JO5CfyMMCrzyED5PJmGSt/CtkG9KINd4/psoLKNocfDQaFE26BqpLAjUxNrxuHuY
15+
XcGPOR+CYTqRm6RK2BpEJwxa6/mu5BLT9L+3AKDK1Z2VsSe120vhNEIIoqsrHGoS
16+
tHXCu6HglR1XlknTsG0Yp9pHgNmS+t/J0jSZHz95UBUNuJzT2mKspW5xEFbhYIaW
17+
6pBgp5a/shA4fQy4ypQne6q9vp4uSHm5TtEJOQhHPOVRuS4qvGhgpsuravwq39Nv
18+
dqW8/n2IrNxPJ5P9JswQL9HbrtpHpbhbPDawm0wZ7C9QFxl1AZ/oLfpYtwTk4UhP
19+
Jlw=
20+
-----END CERTIFICATE-----
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDclKu05+650yRV
3+
1yU/NmGLWCGqyeM7N1MIDlgHewtFiL20YEUy392wyOzo663yKxHrBoJormP6hbb/
4+
nW2/LLx4gJ0JZ+N7/Vo40trJV6sTdOsiL7Xzp1MURZPcBEuF/pS16MDVvtoFCdQr
5+
vG8dzX/Znbtmu8jVP+WOADcguvECp/tOpkYBMBwxXvmpAch15WEzuSyPXg4ecCuf
6+
JE34c77tGcEbns+vikWrW1Evy6vVjmJPDk915p+HkPfXoXiN+4Dn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VHEmFh22h9Be8hR4we940CWSLgB5Xdem
23+
3OJYm4ZsO0qNj/+jL4BtRcs7kdv32AyEioIDl/KHh9InCW7rw2a3yWNVjR6ZeNN6
24+
t44iWm8X3/mAL1Gz1RSIM50a9vtKmMWMIpX6s4J9AoGAUm3wf+Ce/OLlKgmshh6v
25+
oJtNoekUDrKrhL7+aLlqReAr5ooaF+Sr4TqT5nZgaNEDX1fBrXiyXsWPT7sChviU
26+
xzTuCE9BTeeUu7cjBC0cZRSziTBMEUdNJzg3QzkP8vquMzH3YapqjbsxUQzRkPxC
27+
IQ2FrwBk15FurU2redQNxpc=
28+
-----END PRIVATE KEY-----
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2016-2018 Ohio Supercomputer Center
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ondemand/apps/OdysseyRD/README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Batch Connect - Desktop
2+
3+
![GitHub Release](https://img.shields.io/github/release/osc/bc_desktop.svg)
4+
[![GitHub License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
5+
6+
A Batch Connect app designed to launch a GUI desktop withing a batch job.
7+
8+
## Prerequisites
9+
10+
This Batch Connect app requires the following software be installed on the
11+
**compute nodes** that the batch job is intended to run on (**NOT** the
12+
OnDemand node).
13+
14+
One of the following desktops:
15+
16+
- [Xfce Desktop] 4+
17+
- [Mate Desktop] 1+ (*default*)
18+
- [Gnome Desktop] 2 (currently we do not support Gnome 3)
19+
20+
For VNC server support:
21+
22+
- [TurboVNC] 2.1+
23+
- [websockify] 0.8.0+
24+
25+
For hardware rendering support:
26+
27+
- [X server]
28+
- [VirtualGL] 2.3+
29+
30+
[Xfce Desktop]: https://xfce.org/
31+
[Mate Desktop]: https://mate-desktop.org/
32+
[Gnome Desktop]: https://www.gnome.org/
33+
[TurboVNC]: http://www.turbovnc.org/
34+
[websockify]: https://github.com/novnc/websockify
35+
[X server]: https://www.x.org/
36+
[VirtualGL]: http://www.virtualgl.org/
37+
38+
## Install
39+
40+
Use git to clone this app and checkout the desired branch/version you want to
41+
use:
42+
43+
```sh
44+
scl enable git19 -- git clone <repo>
45+
cd <dir>
46+
scl enable git19 -- git checkout <tag/branch>
47+
```
48+
49+
You will not need to do anything beyond this as all necessary assets are
50+
installed. You will also not need to restart this app as it isn't a Passenger
51+
app.
52+
53+
To update the app you would:
54+
55+
```sh
56+
cd <dir>
57+
scl enable git19 -- git fetch
58+
scl enable git19 -- git checkout <tag/branch>
59+
```
60+
61+
Again, you do not need to restart the app as it isn't a Passenger app.
62+
63+
## Configuration
64+
65+
Please see the [Install Desktops] section in the [Open OnDemand Documentation]
66+
to learn more about setting up and configuring a desktop at your HPC center.
67+
68+
[Install Desktops]: https://osc.github.io/ood-documentation/master/enable-desktops.html
69+
[Open OnDemand Documentation]: https://osc.github.io/ood-documentation/master/index.html
70+
71+
## Contributing
72+
73+
1. Fork it ( https://github.com/OSC/bc_desktop/fork )
74+
2. Create your feature branch (`git checkout -b my-new-feature`)
75+
3. Commit your changes (`git commit -am 'Add some feature'`)
76+
4. Push to the branch (`git push origin my-new-feature`)
77+
5. Create a new Pull Request

ondemand/apps/OdysseyRD/form.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
cluster: "dev-cluster"
3+
attributes:
4+
desktop: "mate"
5+
bc_vnc_idle: 0
6+
bc_vnc_resolution:
7+
required: true
8+
node_type: null
9+
10+
form:
11+
- bc_vnc_idle
12+
- desktop
13+
- bc_account
14+
- bc_num_hours
15+
- bc_num_slots
16+
- node_type
17+
- bc_queue
18+
- bc_vnc_resolution
19+
- bc_email_on_started
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
cluster: "dev-cluster"
3+
title: "FAS-RC Remote Desktop"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
cluster: "dev-cluster"
3+
title: "FAS-RC Remote Desktop"
4+
tile:
5+
title: "Run FAS-RC Remote Desktop"
6+
icon: "/public/images/desktop_logo.svg"
7+
sub_caption: |
8+
2 CPU cores and 4GB RAM
9+
8 hours job run time
10+
Cannon cluster
11+
attributes:
12+
bc_account: ""
13+
bc_num_slots: "1"
14+
bc_num_hours: "1"
15+
bc_queue: ""
16+
bc_email_on_started: "0"
17+
bc_vnc_resolution: "1024x768"

0 commit comments

Comments
 (0)