Skip to content

Commit

Permalink
Scheduler runimport app locally using custom destination picker
Browse files Browse the repository at this point in the history
Should work after i-VRESSE/bartender#90 is merged
  • Loading branch information
sverhoeven committed Mar 2, 2024
1 parent 7de09cb commit be328c8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
7 changes: 6 additions & 1 deletion deploy/containerslurm/bartender-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ destinations:
username: xenon
password: javagat
entry: /home/xenon
local:
scheduler:
type: memory
filesystem:
type: local
job_root_dir: /jobs
destination_picker: bartender.picker:pick_first
destination_picker: /opt/bartender/mypicker.py:mypicker
applications:
haddock3:
command_template: haddock3 workflow.cfg
Expand Down
7 changes: 6 additions & 1 deletion deploy/remoteslurm/bartender-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ destinations:
username: <Username to connect with>
password: <Password to connect with. If absent uses default ssh keys.>
entry: <root directory where files of jobs should reside>
local:
scheduler:
type: memory
filesystem:
type: local
job_root_dir: /jobs
destination_picker: bartender.picker:pick_first
destination_picker: /opt/bartender/mypicker.py:mypicker
applications:
haddock3:
command_template: haddock3 workflow.cfg
Expand Down
3 changes: 3 additions & 0 deletions deploy/remoteslurm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ services:
- type: bind
source: ./bartender-config.yaml
target: /opt/bartender/config.yaml
- type: bind
source: ./mypicker.py
target: /opt/bartender/mypicker.py
- bartender-certs:/certs:ro
- bartender-job-data:/jobs
# To use a local private ssh key to login to the remote slurm machine
Expand Down
4 changes: 4 additions & 0 deletions deploy/remoteslurm/mypicker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def mypicker(job_dir, application_name, submitter, context):
if application_name == 'runimport':
return 'local'
return 'slurm'

0 comments on commit be328c8

Please sign in to comment.