Skip to content

Commit

Permalink
chore: setup slurm via ansible (#1719)
Browse files Browse the repository at this point in the history
* chore: setup slurm via ansible

* move to top for testing

* fix repo definition

* try using inventory file

* try defining role path

* fix path

* try using ansible-galaxy and ansible-playbook commands

* try localhost

* be root and verbose

* fix

* show error log

* try setting StorageType

* skip dbd

* minor

* add quick test

* remove verbose

* fix test script

* run squeue

* simplify test

* polishing
  • Loading branch information
johanneskoester committed Jun 15, 2022
1 parent cc6c998 commit d482120
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/main.yml
Expand Up @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # we need tags for versioneer to work

- name: Setup Snakemake environment
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
Expand Down Expand Up @@ -92,6 +92,35 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

###### slurm setup #####

- name: Download slurm ansible roles
run: |
ansible-galaxy install galaxyproject.slurm
- name: Define slurm playbook
uses: 1arp/create-a-file-action@0.2
with:
file: slurm-playbook.yml
content: |
- name: Slurm all in One
hosts: localhost
vars:
slurm_roles: ['controller', 'exec']
roles:
- role: galaxyproject.slurm
become: true
- name: Setup slurm
run: |
ansible-playbook slurm-playbook.yml || (journalctl -xe && exit 1)
- name: Test slurm submission
run: |
srun echo "hello world"
###### finalized slurm setup #####

- name: Run tests
env:
Expand Down

0 comments on commit d482120

Please sign in to comment.