Below is an Ansible playbook to automate the installation of HPE Ezmeral Data Fabric (formerly MapR) on a Linux cluster. This playbook assumes you have at least a basic understanding of Ansible and have set up your inventory file for your Linux cluster.
Prerequisites
- Install Ansible on your control node.
- Ensure passwordless SSH access from the control node to all cluster nodes.
- Prepare an Ansible inventory file listing all the nodes in the cluster.
- Download the HPE Ezmeral installation packages and place them in a shared or accessible location.
Inventory File (inventory.yml)
Define your 12-node cluster in the Ansible inventory file:
all:
hosts:
node1:
ansible_host: 192.168.1.101
node2:
ansible_host: 192.168.1.102
node3:
ansible_host: 192.168.1.103
# Add all 12 nodes
vars:
ansible_user: your-ssh-user
ansible_ssh_private_key_file: /path/to/your/private/key
java_package: java-11-openjdk-devel
ezmeral_packages:
- mapr-core
- mapr-fileserver
- mapr-cldb
- mapr-webserver
- mapr-zookeeper
Ansible Playbook (install_hpe_ezmeral.yml)
The playbook automates Java installation, package deployment, service configuration, and starting services.
—
– name: Install HPE Ezmeral Data Fabric on a 12-node cluster
hosts: all
become: yes
vars:
ezmeral_repo_url: “http://repo.mapr.com/releases/v7.0/redhat”
ezmeral_repo_file: “/etc/yum.repos.d/mapr.repo”
tasks:
– name: Install dependencies
yum:
name: “{{ item }}”
state: present
loop:
– epel-release
– “{{ java_package }}”
– wget
– lsof
– name: Configure HPE Ezmeral repository
copy:
dest: “{{ ezmeral_repo_file }}”
content: |
[mapr_repo]
name=MapR Repository
baseurl={{ ezmeral_repo_url }}
gpgcheck=0
enabled=1
– name: Install HPE Ezmeral packages
yum:
name: “{{ item }}”
state: present
loop: “{{ ezmeral_packages }}”
– name: Configure ZooKeeper on specific nodes
block:
– name: Create ZooKeeper data directory
file:
path: /var/mapr/zookeeper
state: directory
owner: mapr
group: mapr
mode: 0755
– name: Set up ZooKeeper myid file
copy:
dest: /var/mapr/zookeeper/myid
content: “{{ item }}”
owner: mapr
group: mapr
mode: 0644
when: inventory_hostname in [‘node1’, ‘node2’, ‘node3’]
loop:
– 1
– 2
– 3
– name: Configure cluster-wide settings
shell: |
/opt/mapr/server/configure.sh -C node1,node2,node3 -Z node1,node2,node3
– name: Start required services
service:
name: “{{ item }}”
state: started
enabled: yes
loop:
– mapr-zookeeper
– mapr-cldb
– mapr-fileserver
– mapr-webserver
– mapr-nodemanager
– name: Verify installation
shell: maprcli node list -columns svc
register: verification_output
– name: Output verification results
debug:
var: verification_output.stdout
Execution Steps
- Prepare the environment:
- Place the inventory.yml and install_hpe_ezmeral.yml files in the same directory.
- Run the playbook:
ansible-playbook -i inventory.yml install_hpe_ezmeral.yml
- Verify the installation:
- Access the HPE Ezmeral Data Fabric WebUI:
http://<CLDB-node-IP>:8443
- Run test commands to ensure the cluster is operational:
hadoop fs -mkdir /test
hadoop fs -ls /
This playbook sets up the cluster for basic functionality. You can expand it to include advanced configurations such as Kerberos integration, SSL/TLS setup, or custom disk partitioning.