8 changed files with 141 additions and 1 deletions
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
--- |
||||
- hosts: gpu_node |
||||
become: True |
||||
roles: |
||||
- nvidia_exporter |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
--- |
||||
- file: |
||||
path: /usr/local/prometheus |
||||
state: directory |
||||
mode: 0755 |
||||
|
||||
- name: Install smi exporter |
||||
copy: |
||||
src: "{{ playbook_dir }}/promtools/results/nvidia-exporter" |
||||
dest: /usr/local/prometheus/nvidia-exporter |
||||
mode: 0755 |
||||
|
||||
- name: Install service files. |
||||
template: |
||||
src: templates/nvidia-exporter.service |
||||
dest: /etc/systemd/system/nvidia-exporter.service |
||||
mode: 644 |
||||
owner: root |
||||
group: root |
||||
tags: |
||||
- service-files |
||||
|
||||
- name: install service files |
||||
command: systemctl daemon-reload |
||||
|
||||
- name: enable service at boot |
||||
systemd: |
||||
name: nvidia-smi-exporter.service |
||||
enabled: yes |
||||
|
||||
- name: make sure servcies are started. |
||||
systemd: |
||||
name: nvidia-smi-exporter.service |
||||
state: restarted |
||||
tags: |
||||
- start-service |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
[Unit] |
||||
Description=prometheus nvidia exporter |
||||
|
||||
[Service] |
||||
TimeoutStartSec=0 |
||||
Restart=always |
||||
ExecStart=/usr/local/prometheus/nvidia-exporter \ |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
Binary file not shown.
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
[interactive] |
||||
centos7-test |
||||
|
||||
[prometheus_proxy] |
||||
centos7-test |
||||
|
||||
[scheduler] |
||||
centos7-test mailhub=172.23.56.1 rewrite_domain=knyft.hpc.rug.nl docker_storage_device=/dev/vdb |
||||
|
||||
[login] |
||||
centos7-test |
||||
|
||||
[node] |
||||
centos7-test |
||||
|
||||
[metadata] |
||||
centos7-test |
||||
|
||||
[peregrine:children] |
||||
scheduler |
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
--- |
||||
- name: install lustre client |
||||
yum: |
||||
name: lustre-client-2.10.5-1.el7.x86_64 |
||||
state: present |
||||
update_cache: yes |
||||
disable_gpg_check: yes |
||||
become: true |
||||
|
||||
- name: make endpoints to mount datahandling storage on. |
||||
file: |
||||
path: "{{ item }}" |
||||
mode: 0777 |
||||
state: directory |
||||
with_items: |
||||
- /home |
||||
- /data |
||||
- /scratch |
||||
|
||||
- name: load the lustre kernel module. |
||||
modprobe: |
||||
name: lustre |
||||
state: present |
||||
|
||||
- name: set lustre.conf |
||||
template: |
||||
src: templates/lustre.conf |
||||
dest: /etc/modprobe.d/lustre.conf |
||||
mode: 0644 |
||||
owner: root |
||||
group: root |
||||
backup: no |
||||
|
||||
- name: Mount /home |
||||
mount: |
||||
path: /home |
||||
src: 172.23.55.211@tcp11:172.23.55.212@tcp11:/home |
||||
fstype: lustre |
||||
opts: ro,seclabel,lazystatfs |
||||
state: present |
||||
|
||||
- name: Mount /data |
||||
mount: |
||||
path: /data |
||||
src: 172.23.55.211@tcp11:172.23.55.212@tcp11:/data |
||||
fstype: lustre |
||||
opts: rw,seclabel,lazystatfs |
||||
state: present |
||||
|
||||
- name: Mount /scratch |
||||
mount: |
||||
path: /scratch |
||||
src: 172.23.55.211@tcp11:172.23.55.212@tcp11:/scratch |
||||
fstype: lustre |
||||
opts: rw,seclabel,lazystatfs |
||||
state: present |
||||
|
||||
- name: mount all mountpoints in fstab |
||||
command: mount -a |
||||
args: |
||||
warn: false |
Loading…
Reference in new issue