Skip to content

Commit d7780e3

Browse files
authored
Merge pull request #557 from dheren-git/scale_hdfs_dev_master_512
Scale HDFS dev to master for 512
2 parents 62dacb0 + dea4804 commit d7780e3

File tree

22 files changed

+108
-259
lines changed

22 files changed

+108
-259
lines changed

roles/scale_hdfs/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ Role Definition
66
- It allows computers connected to the same network or domain to access files from other local computers as easily as if they
77
were on the computer's local hard drive.
88

9+
OS/Arch Support:
10+
---------------------------
11+
- Arch :
12+
-1: x86
13+
-2: PowerLe
14+
- OS :
15+
-1: RHEL7
16+
-2: RHEL8
17+
918
Prerequisite
1019
----------------------------
1120
- CES should be enabled and configured.
@@ -61,11 +70,11 @@ Implementation
6170
- If ‘scale_install_repository_url’ is undefined and ‘scale_install_remotepkg_path’ is defined, then the installation method is remote.
6271
- If ‘scale_install_repository_url’ is undefined and ‘scale_install_remotepkg_path’ is undefined and ‘scale_install_localpkg_path’ is defined, then the installation method is local.
6372
- Depending on the installation method, appropriate playbook is called for collecting the rpms and rpms are installed on all the nodes on which hdfs is enabled.
64-
73+
6574
- `Cluster`
6675
- This role setup all hdfs required configurations.
6776
- To enable hdfs protocol, we run command `mmces service enable hdfs` on all the nodes where hdfs is enabled.
68-
77+
6978
- `Postcheck`
7079
- This role verify namenodes and datanodes status.
7180
- This role uses command `mmces service list` to check if hdfs service is up and running.

roles/scale_hdfs/cluster/tasks/configure.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
- name: check | Check free ces ip
9898
shell:
99-
cmd: "mmces address list -Y|grep -v -e hdfs -e object|awk -F: '{print $7}'|grep -v cesAddress"
99+
cmd: "mmces address list -Y|awk -F: '(length($9) == 0){print $7}'"
100100
register: scale_free_ces
101101
delegate_to: "{{ scale_server }}"
102102
run_once: true
@@ -108,6 +108,8 @@
108108
when:
109109
- scale_existing_ces_ip.stdout | length == 0
110110
- scale_free_ces.stdout_lines | length > 0
111+
delegate_to: "{{ scale_server }}"
112+
run_once: true
111113

112114
- block:
113115
- name: check | fetch mountpoint
@@ -140,7 +142,7 @@
140142
delegate_to: "{{ scale_server }}"
141143

142144
- name: configure | Check HDFS ces_group
143-
shell: "/usr/lpp/mmfs/bin/mmces address list|grep {{ scale_hdfs_ces_group_name }}"
145+
shell: "/usr/lpp/mmfs/bin/mmces address list|grep -w {{ scale_hdfs_ces_group_name }}"
144146
register: check_hdfs_ces_group
145147
run_once: true
146148
delegate_to: "{{ scale_server }}"

roles/scale_hdfs/node/defaults/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ scale_install_localpkg_tmpdir_path: /tmp
1515
install_debuginfo: true
1616

1717
# Directory to install 3.1.1.x hdfs package
18-
hdfs_rhel_version_path: 'hdfs_rpms/rhel7/hdfs_3.1.1.x/'
18+
hdfs_rhel_version_path: 'hdfs_rpms/rhel/hdfs_3.1.1.x/'
1919

2020
# Directory to install 3.3.x hdfs package
21-
hdfs_rhel_version_path_33: 'hdfs_rpms/rhel7/hdfs_3.3.x/'
21+
hdfs_rhel_version_path_33: 'hdfs_rpms/rhel/hdfs_3.3.x/'
2222

2323
# Directory to install 3.1.1.x hdfs package
24-
hdfs_sles_version_path: 'hdfs_rpms/rhel7/hdfs_3.1.1.x/'
24+
hdfs_sles_version_path: 'hdfs_rpms/rhel/hdfs_3.1.1.x/'
2525

26-
# Directory to install 3.3.x hdfs package
26+
# Directory to install 3.1.1.x hdfs package
2727
hdfs_ubuntu_version_path: 'hdfs_debs/ubuntu/hdfs_3.1.1.x/'

roles/scale_hdfs/node/tasks/apt/install.yml

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

roles/scale_hdfs/node/tasks/install.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,35 +90,32 @@
9090
- include_tasks: prepare_env.yml
9191

9292
- block:
93-
- name:
93+
- name: install | Fetch hdfs version
9494
set_fact:
95-
hdfs_version_path_selection_rhel: "{{ hdfs_rhel_version_path_33 }}"
95+
hdfs_version_path_selection_rhel: "{{ hdfs_rhel_version_path_33 }}"
9696
when: transparency_33_enabled|bool
9797

9898
- name: install | Fetch hdfs rpm dir path for rhel
9999
set_fact:
100-
hdfs_rpm_path_rhel: "{{ hdfs_version_path_selection_rhel }}"
101-
100+
hdfs_rpm_path_rhel: "{{ hdfs_version_path_selection_rhel }}"
101+
102+
- name: install | Set correct hdfs rpm dir path for scale release lower 5.1.2
103+
set_fact:
104+
hdfs_rpm_path_rhel: "{{ hdfs_rpm_path_rhel | replace('/rhel/','/rhel7/') }}"
105+
when: scale_version is version_compare('5.1.2', '<')
106+
102107
- name: install | Fetch hdfs rpm dir path for sles
103108
set_fact:
104-
hdfs_rpm_path_sles: "{{ hdfs_sles_version_path }}"
109+
hdfs_rpm_path_sles: "{{ hdfs_sles_version_path }}"
105110

106111
- name: install | Fetch hdfs rpm dir path for ubuntu
107112
set_fact:
108-
hdfs_rpm_path_ubuntu: "{{ hdfs_ubuntu_version_path }}"
113+
hdfs_rpm_path_ubuntu: "{{ hdfs_ubuntu_version_path }}"
109114

110-
111115
run_once: true
112116
delegate_to: localhost
113117

114118
- include_tasks: install_{{ scale_installmethod }}.yml
115119

116-
- import_tasks: apt/install.yml
117-
when: ansible_distribution in scale_ubuntu_distribution
118-
119120
- import_tasks: yum/install.yml
120121
when: ansible_distribution in scale_rhel_distribution
121-
122-
- import_tasks: zypper/install.yml
123-
when: ansible_distribution in scale_sles_distribution
124-

roles/scale_hdfs/node/tasks/install_local_pkg.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,43 +117,27 @@
117117
scale_hdfs_url: "{{ hdfs_rpm_path_rhel }}"
118118
when: ansible_distribution in scale_rhel_distribution and ansible_distribution_major_version == '8'
119119

120-
- name: install | hdfs path on sles15
121-
set_fact:
122-
scale_hdfs_url: "{{ hdfs_rpm_path_sles }}"
123-
when: ansible_distribution in scale_sles_distribution and ansible_distribution_major_version >= '15'
124-
125-
- name: install | hdfs path on ubuntu20
126-
set_fact:
127-
scale_hdfs_url: "{{ hdfs_rpm_path_ubuntu }}"
128-
when: ansible_distribution in scale_ubuntu_distribution and ansible_distribution_major_version == '20'
129-
130-
#
131-
132-
# Find hdfs rpms
133-
134-
- block: ## when: host is defined as a protocol node
135-
120+
- block:
136121
- name: install | Find gpfs.hdfs-protocol package
137122
find:
138123
paths: "{{ hdfs_extracted_path }}/{{ scale_hdfs_url }}"
139124
patterns: gpfs.hdfs-protocol*
140125
register: scale_install_gpfs_hdfs
141126

142-
143127
- name: install | Check valid GPFS hdfs(gpfs.hdfs-protocol) package
144128
assert:
145129
that: scale_install_gpfs_hdfs.matched > 0
146130
msg: "No GPFS hdfs(gpfs.hdfs-protocol) package found {{ hdfs_extracted_path }}/{{ scale_hdfs_url }}"
147131

148132
- name: install | Add GPFS hdfs package to list
149133
vars:
150-
current_package: "{{ files.path }}"
134+
current_package: "{{ filelist.path }}"
151135
set_fact:
152136
scale_install_all_packages: "{{ scale_install_all_packages + [ current_package ] }}"
153137
with_items:
154138
- "{{ scale_install_gpfs_hdfs.files }}"
155139
loop_control:
156-
loop_var: files
140+
loop_var: filelist
157141

158142
- block:
159143
- name: initialize
@@ -162,14 +146,13 @@
162146

163147
- name: install | Add GPFS package to list
164148
set_fact:
165-
debuginfo_package: "{{ debuginfo_package + [ files.path ] }}"
149+
debuginfo_package: "{{ debuginfo_package + [ filepacklist.path ] }}"
166150
with_items:
167151
- "{{ scale_install_gpfs_hdfs_debuginfo.files }}"
168152
loop_control:
169-
loop_var: files
153+
loop_var: filepacklist
170154

171155
- name: remove debuginfo from packages
172156
set_fact:
173157
scale_install_all_packages: "{{ scale_install_all_packages | difference(debuginfo_package)}}"
174158
when: not install_debuginfo|bool and ansible_distribution in scale_rhel_distribution
175-

roles/scale_hdfs/node/tasks/install_remote_pkg.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,6 @@
8181
scale_hdfs_url: "{{ hdfs_rpm_path_rhel }}"
8282
when: ansible_distribution in scale_rhel_distribution and ansible_distribution_major_version == '8'
8383

84-
- name: install | hdfs path on sles15
85-
set_fact:
86-
scale_hdfs_url: "{{ hdfs_rpm_path_sles }}"
87-
when: ansible_distribution in scale_sles_distribution and ansible_distribution_major_version >= '15'
88-
89-
- name: install | hdfs path on ubuntu20
90-
set_fact:
91-
scale_hdfs_url: "{{ hdfs_rpm_path_ubuntu }}"
92-
when: ansible_distribution in scale_ubuntu_distribution and ansible_distribution_major_version == '20'
93-
9484
- block: ## when: host is defined as a protocol node
9585

9686
- name: install | Find gpfs.hdfs (gpfs.hdfs-protocol) package

roles/scale_hdfs/node/tasks/install_repository.yml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
---
2-
- name: install | Initialize
3-
set_fact:
4-
scale_hdfs_url: ""
5-
gpgcheck: "yes"
6-
7-
- name: install | Disable gpg check
8-
set_fact:
9-
gpgcheck: "no"
10-
when: scale_version < '5.0.4.0'
11-
122
- name: install | hdfs path on rhel7
133
set_fact:
144
scale_hdfs_url: "{{ hdfs_rpm_path_rhel }}"
@@ -19,23 +9,12 @@
199
scale_hdfs_url: "{{ hdfs_rpm_path_rhel }}"
2010
when: ansible_distribution in scale_rhel_distribution and ansible_distribution_major_version == '8'
2111

22-
- name: install | hdfs path on sles15
23-
set_fact:
24-
scale_hdfs_url: "{{ hdfs_rpm_path_sles }}"
25-
when: ansible_distribution in scale_sles_distribution and ansible_distribution_major_version >= '15'
26-
27-
- name: install | hdfs path on ubuntu20
28-
set_fact:
29-
scale_hdfs_url: "{{ hdfs_rpm_path_ubuntu }}"
30-
when: ansible_distribution in scale_ubuntu_distribution and ansible_distribution_major_version == '20'
31-
32-
3312
- name: install | Configure hdfs YUM repository
3413
yum_repository:
3514
name: spectrum-scale-hdfs
3615
description: IBM Spectrum Scale (hdfs)
3716
baseurl: "{{ scale_install_repository_url }}{{ scale_hdfs_url }}"
38-
gpgcheck: "{{ gpgcheck }}"
17+
gpgcheck: "{{ scale_install_gpgcheck }}"
3918
repo_gpgcheck: no
4019
sslverify: no
4120
state: present
@@ -44,30 +23,6 @@
4423
- ansible_pkg_mgr == 'yum' or ansible_pkg_mgr == 'dnf'
4524
- scale_install_repository_url != 'existing'
4625

47-
- name: install | Configure hdfs zypper repository
48-
zypper_repository:
49-
name: spectrum-scale-hdfs-rpms
50-
repo: "{{ scale_install_repository_url }}{{ scale_hdfs_url }}"
51-
runrefresh: yes
52-
state: present
53-
disable_gpg_check: yes
54-
when:
55-
- ansible_pkg_mgr == 'zypper'
56-
- scale_install_repository_url != 'existing'
57-
58-
- name: install | Configure hdfs APT repository
59-
apt_repository:
60-
filename: spectrum-scale-hdfs-debs
61-
repo: "deb [trusted=yes] {{ scale_install_repository_url }}{{ scale_hdfs_url }} ./"
62-
validate_certs: no
63-
state: present
64-
update_cache: yes
65-
codename: IBM Spectrum Scale (HDFS debs)
66-
mode: 0777
67-
when:
68-
- ansible_pkg_mgr == 'apt'
69-
- scale_install_repository_url != 'existing'
70-
7126
- name: install | Add GPFS hdfs packages to list
7227
set_fact:
7328
scale_install_all_packages: "{{ scale_install_all_packages + [ hdfs_packages ] }}"
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
---
2-
- name: Initialize
3-
set_fact:
4-
disable_gpgcheck: "no"
5-
6-
- name: Disable gpg check
7-
set_fact:
8-
disable_gpgcheck: "yes"
9-
when: scale_version < '5.0.4.4'
10-
112
- name: install | Install GPFS HDFS packages
123
yum:
134
name: "{{ scale_install_all_packages }}"
145
state: present
15-
disable_gpg_check: "{{ disable_gpgcheck }}"
6+
disable_gpg_check: "{{ scale_disable_gpgcheck }}"
167
when: ansible_fqdn in scale_hdfs_nodes_list or ansible_fqdn in scale_protocol_nodes_list
17-
8+

roles/scale_hdfs/node/tasks/zypper/install.yml

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

0 commit comments

Comments
 (0)