Skip to content
Snippets Groups Projects
Commit dcdd89cf authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

Merge remote-tracking branch 'origin/srun_test' into ubuntu

Former-commit-id: e6226d77
parents a110a51d f1baff33
No related branches found
No related tags found
No related merge requests found
......@@ -147,6 +147,7 @@ tests:
- bash -e ./tests/run_tests.sh ManagementNodes "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh NFSNodes "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh SQLNodes "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh slurm "files/inventory.$STACKNAME" "../gc_key.pem"
extended:
stage: extended
......
#!/bin/bash
function usage {
echo $"Usage: $0 {all, ComputeNodes, LoginNodes, ManagementNodes, NFSNodes, sql}" INVENTORY_FILE KEY
echo $"Usage: $0 {all, ComputeNodes, LoginNodes, ManagementNodes, NFSNodes, sql, slurm}" INVENTORY_FILE KEY
exit 1
}
......@@ -23,22 +23,4 @@ function run_them ()
done
}
# I think I am just checking the if $1 is one of the listes strings (see usage) not proud of this at all but works
case "$1" in
all)
;;
ComputeNodes)
;;
ManagementNodes)
;;
NFSNodes)
;;
SQLNodes)
;;
LoginNodes)
;;
*)
usage
esac
run_them $1 $2 $3
\ No newline at end of file
---
- hosts: ManagementNodes,LoginNodes,ComputeNodes
gather_facts: false
tasks:
- name: add user hpctest
user:
name: hpctest
shell: /bin/bash
become: true
- hosts: ManagementNodes
gather_facts: false
tasks:
- name: Create a parent account
command: ./sacctmgr -i add account parentAccount cluster=m3 Description="Test parent account" Organization="Monash"
args:
chdir: '/opt/slurm-latest/bin'
become: true
register: result
failed_when: result.rc != 0 and result.stdout != " Nothing new added."
- name: Create a project associated with a given parent
command: ./sacctmgr -i add account testProject parent=parentAccount cluster=m3 Organization="Monash"
args:
chdir: '/opt/slurm-latest/bin'
become: true
register: result
failed_when: result.rc != 0 and result.stdout != " Nothing new added."
- name: Create a user and associate them with a project
command: ./sacctmgr -i create user hpctest cluster=m3 account=testProject partition=batch
args:
chdir: '/opt/slurm-latest/bin'
become: true
register: result
failed_when: result.rc != 0 and result.stdout != " Nothing new added."
#sudo `which sacctmgr` modify user where name=hpctest set maxjobs=200
## 18 sudo `which sacctmgr` update account hpctest set qos=normal
# 22 sudo `which sacctmgr` update account testProject set qos=normal
- hosts: LoginNodes
gather_facts: false
tasks:
- name: make sure munge is running
service:
name: munge
state: started
become: true
- name: simple srun test
command: ./srun --ntasks=1 --partition=batch hostname
args:
chdir: '/opt/slurm-latest/bin'
become: true
become_user: hpctest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment