Skip to content

Commit

Permalink
Add 'scale' variant to gpfs backend
Browse files Browse the repository at this point in the history
Signed-off-by: Xavi Hernandez <[email protected]>
  • Loading branch information
xhernandez committed Mar 14, 2024
1 parent 8850e00 commit d8a9d0e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
46 changes: 46 additions & 0 deletions playbooks/ansible/roles/sit.gpfs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,54 @@
- name: Define block size and mountpoint
command: "{{ gpfs_toolkit }} filesystem modify -B 128K -m /gpfs/sit_fs sit_fs"

- name: Configure SMB protocol
when: config.be.variant == 'scale'
block:
- name: Define protocol nodes
command: "{{ gpfs_toolkit }} node add {{ item }} -p"
loop: "{{ config.groups['cluster'] }}"

- name: Enable SMB protocol
command: "{{ gpfs_toolkit }} enable smb"

- name: Configure shared directory
command: >-
{{ gpfs_toolkit }} config protocols -f sit_fs -m /gpfs/sit_fs
-e {{
config.nodes |
dict2items |
selectattr('value.ctdb.public', 'defined') |
map(attribute='value.ctdb.public') |
join(',')
}}
- name: Install on all nodes
command: "{{ gpfs_toolkit }} install"

- name: Create admin user for GUI
command: /usr/lpp/mmfs/gui/cli/mkuser admin -p admin123 -g SecurityAdmin

- name: Configure SMB shares
when: config.be.variant == 'scale'
block:
- name: Deploy protocols
command: "{{ gpfs_toolkit }} deploy"

- name: Configure authentication
command: /usr/lpp/mmfs/bin/mmuserauth service create --data-access-method file --type userdefined

- name: Create shares
vars:
name: "{{ item.name }}"
path: "{{ config.paths.mount }}/{{ item.name }}"
volume: "{{ item }}"
include_tasks:
file: new_volume.yml
loop: "{{ samba_shares }}"

- name: Configure shares
command: >-
/usr/lpp/mmfs/bin/mmsmb export add
{{ item.name }}-{{ config.be.name }}-{{ config.be.variant }}
/gpfs/sit_fs/{{ item.name }}
loop: "{{ samba_shares }}"
7 changes: 4 additions & 3 deletions playbooks/roles/local.defaults/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

- name: Generate configuration
when: not config_yml.stat.exists
vars:
os: "{{ use_distro | default('centos9') }}"
be: "{{ (backend | default('xfs') | split('.'))[0] }}"
variant: "{{ (backend | default('xfs') | split('.'))[1] | default('default') }}"
block:
- name: Load global settings
include_vars:
Expand Down Expand Up @@ -47,9 +51,6 @@
src: config.yml.j2
dest: ./ansible/config.yml
vars:
os: "{{ use_distro | default('centos9') }}"
be: "{{ (backend | default('xfs') | split('.'))[0] }}"
variant: "{{ (backend | default('xfs') | split('.'))[1] | default('default') }}"
max_memory: "{{ ansible_memfree_mb }}"
max_cpu: "{{ ansible_processor_nproc }}"

Expand Down
1 change: 1 addition & 0 deletions playbooks/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ environments:
cpus: 2
memory: 1024
domain: sit.test
samba: "{{ variant != 'scale' }}"

data:
# A zip file is necessary to install GPFS but it's not included with
Expand Down

0 comments on commit d8a9d0e

Please sign in to comment.