-
Notifications
You must be signed in to change notification settings - Fork 13
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 #472 from pneerincx/feature/nfs
Feature/nfs
- Loading branch information
Showing
21 changed files
with
142 additions
and
165 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,10 @@ | ||
--- | ||
volumes: | ||
- mount_point: '/local' | ||
device: '/dev/vdb' | ||
mounted_owner: root | ||
mounted_group: root | ||
mounted_mode: '0755' | ||
mount_options: 'rw,relatime' | ||
type: ext4 | ||
... |
60 changes: 0 additions & 60 deletions
60
group_vars/wingedhelix_cluster/secrets.yml.2021-09-13T18:30:42
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
--- | ||
volumes: | ||
- mount_point: '/local' | ||
device: '/dev/vdb' | ||
mounted_owner: root | ||
mounted_group: root | ||
mounted_mode: '0755' | ||
mount_options: 'rw,relatime' | ||
type: ext4 | ||
... | ||
# | ||
# Example data structure used by the mount_volume role. | ||
# | ||
# --- | ||
# volumes: | ||
# - mount_point: '/local' | ||
# device: '/dev/vdb' | ||
# mounted_owner: root | ||
# mounted_group: root | ||
# mounted_mode: '0755' | ||
# mount_options: 'rw,relatime' | ||
# type: ext4 | ||
# ... | ||
# |
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,7 @@ | ||
--- | ||
- name: Install NFS utils. | ||
yum: | ||
name: nfs-utils | ||
when: pfs_mounts | selectattr('type', 'search', 'nfs') | list | length >= 1 | ||
become: true | ||
... |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
--- | ||
# | ||
# Important: maintain correct handler order. | ||
# Handlers are executed in the order in which they are defined | ||
# and not in the order in which they are listed in a "notify: handler_name" statement! | ||
# | ||
# Restart before reload: an reload after a restart may be redundant but should not fail, | ||
# but the other way around may fail when the impact of changes was too large for a reload. | ||
# | ||
- name: 'Restart nfs-server service.' | ||
systemd: | ||
name: 'nfs-server.service' | ||
state: restarted | ||
daemon_reload: true | ||
become: true | ||
listen: restart_nfs-server | ||
|
||
- name: 'Reload nfs-server service.' | ||
systemd: | ||
name: 'nfs-server.service' | ||
state: reloaded | ||
daemon_reload: true | ||
become: true | ||
listen: reload_nfs-server | ||
|
||
- name: '(Re)export all NFS shares.' | ||
command: 'exportfs -a' | ||
become: true | ||
listen: export_nfs_shares | ||
... |
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,34 @@ | ||
# | ||
# This role may depend on the mount_volume role to mount the filesystems that must be exported over NFS. | ||
# | ||
--- | ||
- name: 'Install NFS utils.' | ||
yum: | ||
name: nfs-utils | ||
notify: | ||
- restart_nfs-server | ||
- export_nfs_shares | ||
become: true | ||
|
||
- name: 'Enable and start nfs-server service.' | ||
systemd: | ||
name: nfs-server.service | ||
state: 'started' | ||
enabled: true | ||
daemon_reload: true | ||
notify: | ||
- export_nfs_shares | ||
become: true | ||
|
||
- name: 'Add NFS share to /etc/exports.' | ||
lineinfile: | ||
path: /etc/exports | ||
line: "/mnt/{{ item.pfs }} {{ network_private_storage_cidr }}(rw,sync,root_squash,no_subtree_check)" | ||
with_items: "{{ pfs_mounts | selectattr('type', 'search', 'nfs') | selectattr('device', 'defined') | list }}" | ||
notify: | ||
- export_nfs_shares | ||
become: true | ||
|
||
- name: Flush handlers | ||
meta: flush_handlers | ||
... |
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 |
---|---|---|
|
@@ -8,5 +8,7 @@ | |
- sshd | ||
- ldap # client | ||
- regular_users | ||
- lustre_client | ||
- nfs_client | ||
- shared_storage | ||
... |
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,14 @@ | ||
# | ||
# This play depends on: | ||
# * cluster_part1.yml | ||
# | ||
--- | ||
- import_playbook: pre_deploy_checks.yml | ||
|
||
- name: '###==-> Extra roles for NFS server. <-==###' | ||
hosts: | ||
- nfs_server | ||
roles: | ||
- mount_volume | ||
- nfs_server | ||
... |
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 |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
hosts: | ||
- sys_admin_interface | ||
roles: | ||
- mount_volume | ||
- slurm_management | ||
- prom_server | ||
- grafana | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,9 @@ wh-repo | |
[docs] | ||
docs | ||
|
||
[nfs_server] | ||
wh-sai | ||
|
||
[sys_admin_interface] | ||
wh-sai | ||
|
||
|