Skip to content

Commit ef4b725

Browse files
authored
Merge pull request #599 from digvijay2016/master
Changes to support AWS BYOL 1.4 beta
2 parents 8d9bfff + 58c8d99 commit ef4b725

File tree

3 files changed

+167
-196
lines changed

3 files changed

+167
-196
lines changed

samples/playbook_aws.yml

Lines changed: 0 additions & 195 deletions
This file was deleted.

samples/playbook_cloud.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,42 @@
1010
# vars/scale_clusterdefinition.json
1111
- import_playbook: "set_json_variables.yml"
1212

13+
# Ensure provisioned VMs are up and Passwordless SSH setup
14+
# has been compleated and operational
15+
- name: Check passwordless SSH connection is setup
16+
hosts: scale_node
17+
any_errors_fatal: true
18+
gather_facts: false
19+
connection: local
20+
tasks:
21+
- name: Check passwordless SSH on all scale inventory hosts
22+
shell: ssh -i {{ ansible_ssh_private_key_file }} {{ inventory_hostname }} "echo PASSWDLESS_SSH_ENABLED"
23+
register: result
24+
until: result.stdout.find("PASSWDLESS_SSH_ENABLED") != -1
25+
retries: 30
26+
delay: 10
27+
28+
# Ensure all provisioned VMs are running the supported OS versions
29+
- name: Check for supported OS
30+
hosts: scale_node
31+
any_errors_fatal: true
32+
gather_facts: true
33+
tasks:
34+
- name: Spectrum Scale Precheck | Check OS Distribution
35+
assert:
36+
that:
37+
- ansible_distribution == "RedHat"
38+
- ansible_distribution_major_version == "7" or ansible_distribution_major_version == "8"
39+
- (ansible_distribution_version is match("7.9") or
40+
ansible_distribution_version is match("8.2") or
41+
ansible_distribution_version is match("8.4"))
42+
fail_msg: "Only instances running RedHat Enterprise Linux version 7.9, 8.2 and 8.4 are supported"
43+
1344
# Setup Spectrum Scale on nodes and create cluster
1445
- hosts: scale_node
1546
any_errors_fatal: true
47+
vars:
48+
- scale_install_directory_pkg_path: /opt/IBM/gpfs_cloud_rpms
1649
roles:
1750
- core/precheck
1851
- core/node
@@ -25,3 +58,136 @@
2558
- zimon/node
2659
- zimon/cluster
2760
- zimon/postcheck
61+
62+
# Cloud deployment specific actions after Spectrum Scale
63+
# cluster installation and setup
64+
tasks:
65+
- block:
66+
- name: accept client lisence for compute descriptor node
67+
command: /usr/lpp/mmfs/bin/mmchnode --client -N "computedescnodegrp"
68+
69+
- name: set filesystem
70+
set_fact:
71+
fs_name: "{{ scale_storage.0.filesystem }}"
72+
when:
73+
- scale_storage is defined
74+
75+
- name: create empty file on descriptor node
76+
command: /usr/lpp/mmfs/bin/mmdsh -N "computedescnodegrp" touch /var/mmfs/etc/ignoreAnyMount.{{ fs_name }}
77+
78+
- name: unmount filesystem on descriptor node
79+
command: /usr/lpp/mmfs/bin/mmumount {{ fs_name }} -N "computedescnodegrp"
80+
run_once: true
81+
when:
82+
- scale_sync_replication_config | bool
83+
84+
- name: Prevent kernel upgrade
85+
lineinfile:
86+
path: /etc/yum.conf
87+
line: exclude=kernel* redhat-release*
88+
89+
# Configure the Spectrum Scale Pagepool setings
90+
- hosts: scale_node
91+
any_errors_fatal: false
92+
gather_facts: true
93+
tasks:
94+
- block:
95+
- name: Spectrum Scale Config | Find Compute Nodes
96+
add_host:
97+
name: "{{ item }}"
98+
groups: scale_compute_members
99+
when:
100+
- hostvars[item]['scale_nodeclass'] is defined and 'computenodegrp' in hostvars[item]['scale_nodeclass']
101+
with_items: "{{ ansible_play_hosts }}"
102+
changed_when: false
103+
104+
- name: Spectrum Scale Config | Find Storage Nodes
105+
add_host:
106+
name: "{{ item }}"
107+
groups: scale_storage_members
108+
when:
109+
- hostvars[item]['scale_nodeclass'] is defined and 'storagenodegrp' in hostvars[item]['scale_nodeclass']
110+
with_items: "{{ ansible_play_hosts }}"
111+
changed_when: false
112+
113+
- name: Spectrum Scale Config | Determine Compute Node Total Memory
114+
set_fact:
115+
scale_compute_total_mem: "{{ hostvars[item]['ansible_memtotal_mb'] }}"
116+
when: hostvars[item]['ansible_memtotal_mb'] is defined and hostvars[item]['ansible_memtotal_mb']
117+
with_items: "{{ groups['scale_compute_members'].0 }}"
118+
run_once: true
119+
120+
- name: Spectrum Scale Config | Determine Storage Node Total Memory
121+
set_fact:
122+
scale_storage_total_mem: "{{ hostvars[item]['ansible_memtotal_mb'] }}"
123+
when: hostvars[item]['ansible_memtotal_mb'] is defined and hostvars[item]['ansible_memtotal_mb']
124+
with_items: "{{ groups['scale_storage_members'].0 }}"
125+
run_once: true
126+
127+
- name: Spectrum Scale Config | Determine Compute Node Pagepool Memory
128+
set_fact:
129+
scale_compute_total_mem_per: "{{ ((scale_compute_total_mem | int / 1024) * 0.25) | round(0, 'ceil') | int | abs }}"
130+
when: scale_compute_total_mem is defined
131+
run_once: true
132+
133+
- name: Spectrum Scale Config | Determine Storage Node Pagepool Memory
134+
set_fact:
135+
scale_storage_total_mem_per: "{{ ((scale_storage_total_mem | int / 1024) * 0.25) | round(0, 'ceil') | int | abs }}"
136+
when: scale_storage_total_mem is defined
137+
run_once: true
138+
139+
- name: Spectrum Scale Config | Define Compute Raw Pagepool Size
140+
set_fact:
141+
pagepool_compute: "{{ scale_compute_total_mem_per }}"
142+
when: scale_compute_total_mem_per is defined
143+
run_once: true
144+
145+
- name: Spectrum Scale Config | Define Storage Raw Pagepool Size
146+
set_fact:
147+
pagepool_storage: "{{ scale_storage_total_mem_per }}"
148+
when: scale_storage_total_mem_per is defined
149+
run_once: true
150+
151+
- name: Spectrum Scale Config | Check Compute Pagepool Floor Value
152+
set_fact:
153+
pagepool_compute: "1"
154+
when:
155+
- pagepool_compute is defined
156+
- pagepool_compute | int < 1
157+
run_once: true
158+
159+
- name: Spectrum Scale Config | Check Compute Pagepool Ceiling Value
160+
set_fact:
161+
pagepool_compute: "16"
162+
when:
163+
- pagepool_compute is defined
164+
- pagepool_compute | int > 16
165+
run_once: true
166+
167+
- name: Spectrum Scale Config | Check Storage Pagepool Floor Value
168+
set_fact:
169+
pagepool_storage: "1"
170+
when:
171+
- pagepool_storage is defined
172+
- pagepool_storage | int < 1
173+
run_once: true
174+
175+
- name: Spectrum Scale Config | Check Storage Pagepool Ceiling Value
176+
set_fact:
177+
pagepool_compute: "16"
178+
when:
179+
- pagepool_storage is defined
180+
- pagepool_storage | int > 16
181+
run_once: true
182+
183+
- name: Spectrum Scale Config | Assign Compute Pagepool
184+
command: "/usr/lpp/mmfs/bin/mmchconfig pagepool={{ pagepool_compute }}G -i -N computenodegrp"
185+
when:
186+
- pagepool_compute is defined
187+
run_once: true
188+
189+
- name: Spectrum Scale Config | Assign Storage Pagepool
190+
command: "/usr/lpp/mmfs/bin/mmchconfig pagepool={{ pagepool_storage }}G -i -N storagenodegrp"
191+
when:
192+
- pagepool_storage is defined
193+
run_once: true

samples/set_json_variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
scale_cluster_manager: "{{ item.is_manager_node | default(false) }}"
3737
scale_cluster_gui: "{{ item.is_gui_server | default(false) }}"
3838
scale_zimon_collector: "{{ item.is_collector_node | default(false) }}"
39-
state: "{{ item.state | default('present') }}"
39+
scale_state: "{{ item.state | default('present') }}"
4040
is_admin_node: "{{ item.is_admin_node | default('true') }}"
4141
scale_nodeclass: "{{ item.scale_nodeclass | default(omit) }}"
4242
scale_config: "{{ scale_config | default(omit) }}"

0 commit comments

Comments
 (0)