-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from grycap/devel
Devel
- Loading branch information
Showing
8 changed files
with
139 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
||
tasks: | ||
|
||
- name: "Include grycap.slurm" | ||
include_role: | ||
name: "ansible-role-slurm" | ||
vars: | ||
slurm_wn_cpus: 2 | ||
slurm_wn_mem: 1048576 | ||
slurm_wn_gres: "gpu:tesla:2" | ||
slurm_server_name: instance | ||
slurm_wn_ips: ["127.0.0.1"] | ||
slurm_vnode_prefix: vnode- | ||
max_number_of_nodes: 1 | ||
drmaa_lib_install: true | ||
drmaa_lib_version: 1.1.4 | ||
slurm_version: 21.08.8 | ||
|
||
- name: "Include grycap.slurm" | ||
include_role: | ||
name: "ansible-role-slurm" | ||
vars: | ||
slurm_type_of_node: wn | ||
slurm_wn_cpus: 2 | ||
slurm_wn_mem: 1048576 | ||
slurm_wn_gres: "gpu:tesla:2" | ||
slurm_server_name: instance | ||
slurm_wn_ips: ["127.0.0.1"] | ||
slurm_vnode_prefix: vnode- | ||
max_number_of_nodes: 1 | ||
drmaa_lib_install: true | ||
drmaa_lib_version: 1.1.4 | ||
slurm_version: 21.08.8 | ||
|
||
- name: Test | ||
command: scontrol show nodes | ||
changed_when: False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
scenario: | ||
name: default | ||
test_sequence: | ||
- dependency | ||
- destroy | ||
- create | ||
- prepare | ||
- converge | ||
# - idempotence | ||
- verify | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
verifier: | ||
name: ansible | ||
platforms: | ||
- name: instance | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.yml} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
gather_facts: true | ||
|
||
pre_tasks: | ||
- name: Update cache on Debian | ||
apt: | ||
update_cache: yes | ||
when: ansible_os_family == "Debian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- name: geerlingguy.ntp | ||
- name: grycap.ssh | ||
- name: grycap.munge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
become: true | ||
|
||
tasks: | ||
|
||
- name: Test | ||
command: scontrol show nodes | ||
register: nodes | ||
|
||
- name: Check service running | ||
fail: | ||
msg: "Error getting node info" | ||
when: | ||
- "'NodeName=vnode-1' not in nodes.stdout" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters