-
Notifications
You must be signed in to change notification settings - Fork 0
/
submit.yml.erb
64 lines (60 loc) · 1.73 KB
/
submit.yml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<%
user = OodSupport::User.new
services_node = Resolv.getaddress("servicesnode")
%>
---
batch_connect:
template: "basic"
conn_params:
- csrf_token
script:
wall_time: "<%= wall_time.to_i * 3600 %>"
native:
container:
name: "rstudio"
image: "ghcr.io/nesi/training-environment-rstudio-app:v0.3.0"
command: ["/bin/bash","-l","<%= staged_root %>/job_script_content.sh"]
restart_policy: 'OnFailure'
env:
TZ: "Pacific/Auckland"
port: "8080"
cpu: "<%= cpu %>"
memory: "<%= memory %>Gi"
mounts:
- type: nfs
name: home
host: <%= services_node %>
path: /srv/homes
destination_path: /home/shared
- type: host
name: nslcd-socket
host_type: Socket
path: /var/run/nslcd/socket
destination_path: /var/run/nslcd/socket
- type: host
name: nsswitch-conf
host_type: File
path: /etc/nsswitch.conf
destination_path: /etc/nsswitch.conf
configmap:
files:
- filename: "logging.conf"
data: |
[*]
log-level=debug
logger-type=file
log-dir=<%= staged_root %>/logs
mount_path: '/etc/rstudio'
- filename: "database.conf"
data: |
directory=/tmp/lib/rstudio-server
mount_path: '/etc/rstudio/database'
- filename: 'k8_helper'
data: |
#!/usr/bin/env bash
set -x
KEY=$1
VALUE=$(echo -n $2 | base64)
CFG="$(hostname)-secret"
kubectl get secret ${CFG} -o json | jq --arg key $KEY --arg value $VALUE '.data[$key] = $value' | kubectl apply -f -
mount_path: '/opt/open_ondemand/helpers'