Important: You are viewing the main
branch of this repository. If you've previously used the master
branch in your own playbooks then you will need to make some changes in order to switch to the main
branch. See MIGRATING.md for details.
Ansible project with multiple roles for installing and configuring IBM Storage Scale (GPFS) software defined storage.
Table of Contents
scale_prepare_disable_selinux: true
), by default falsescale_prepare_disable_firewall: true
), by default false.The following Ansible versions are tested:
The following IBM Storage Scale versions are tested:
Specific OS requirements:
Users need to have a basic understanding of the Ansible concepts for being able to follow these instructions. Refer to the Ansible User Guide if this is new to you.
Install Ansible on any machine (control node)
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py
$ pip3 install ansible==2.9
Refer to the Ansible Installation Guide for detailed installation instructions.
Note that Python 3 is required for certain functionality of this project to work. Ansible should automatically detect and use Python 3 on managed machines, refer to the Ansible documentation for details and workarounds.
Download IBM Storage Scale packages
A Developer Edition Free Trial is available at this site: https://www.ibm.com/account/reg/us-en/signup?formid=urx-41728
Customers who have previously purchased IBM Storage Scale can obtain entitled versions from IBM Fix Central. Visit https://www.ibm.com/support/fixcentral and search for 'IBM Storage Scale (Software defined storage)'.
Create password-less SSH keys between all nodes in the cluster
A pre-requisite for installing IBM Storage Scale is that password-less SSH must be configured among all nodes in the cluster. Password-less SSH must be configured and verified with FQDN, hostname, and IP of every node to every node.
Example:
$ ssh-keygen
$ ssh-copy-id -oStrictHostKeyChecking=no node1.gpfs.net
$ ssh-copy-id -oStrictHostKeyChecking=no node1
$ ssh-copy-id -oStrictHostKeyChecking=no
Repeat this process for all nodes to themselves and to all other nodes.
Create project directory on Ansible control node
The preferred way of accessing the roles provided by this project is by placing them inside the collections/ansible_collections/ibm/spectrum_scale
directory of your project, adjacent to your Ansible playbook. Simply clone the repository to the correct path:
$ mkdir my_project
$ cd my_project
$ git clone -b main https://github.com/IBM/ibm-spectrum-scale-install-infra.git collections/ansible_collections/ibm/spectrum_scale
Be sure to clone the project under the correct subdirectory:
my_project/
├── collections/
│ └── ansible_collections/
│ └── ibm/
│ └── spectrum_scale/
│ └── ...
├── hosts
└── playbook.yml
Create Ansible inventory
Define IBM Storage Scale nodes in the Ansible inventory (e.g. hosts
) in the following format:
# hosts:
[cluster01]
scale01 scale_cluster_quorum=true scale_cluster_manager=true
scale02 scale_cluster_quorum=true scale_cluster_manager=true
scale03 scale_cluster_quorum=true scale_cluster_manager=false
scale04 scale_cluster_quorum=false scale_cluster_manager=false
scale05 scale_cluster_quorum=false scale_cluster_manager=false
The above is just a minimal example. It defines Ansible variables directly in the inventory. There are other ways to define variables, such as host variables and group variables.
Numerous variables are available which can be defined in either way to customize the behavior of the roles. Refer to VARIABLES.md for a full list of all supported configuration options.
Create Ansible playbook
The basic Ansible playbook (e.g. playbook.yml
) looks as follows:
# playbook.yml:
---
- hosts: cluster01
collections:
- ibm.spectrum_scale
vars:
- scale_install_localpkg_path: /path/to/Spectrum_Scale_Standard-5.0.4.0-x86_64-Linux-install
roles:
- core_prepare
- core_install
- core_configure
- core_verify
Again, this is just a minimal example. There are different installation methods available, each offering a specific set of options:
Refer to VARIABLES.md for a full list of all supported configuration options.
Run the playbook to install and configure the IBM Storage Scale cluster
ansible-playbook
command:$ ansible-playbook -i hosts playbook.yml
$ cd samples/
$ ./ansible.sh
Note: An advantage of using the automation script is that it will generate log files based on the date and the time in the
/tmp
directory.
Playbook execution screen
Playbook execution starts here:
$ ./ansible.sh
Running #### ansible-playbook -i hosts playbook.yml
PLAY #### [cluster01]
**********************************************************************************************************
TASK #### [Gathering Facts]
**********************************************************************************************************
ok: [scale01]
ok: [scale02]
ok: [scale03]
ok: [scale04]
ok: [scale05]
TASK [common : check | Check Spectrum Scale version]
*********************************************************************************************************
ok: [scale01]
ok: [scale02]
ok: [scale03]
ok: [scale04]
ok: [scale05]
...
Playbook recap:
#### PLAY RECAP
***************************************************************************************************************
scale01 : ok=0 changed=65 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
scale02 : ok=0 changed=59 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
scale03 : ok=0 changed=59 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
scale04 : ok=0 changed=59 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
scale05 : ok=0 changed=59 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Users can define variables to override default values and customize behavior of the roles. Refer to VARIABLES.md for a full list of all supported configuration options.
Additional functionality can be enabled by defining further variables. Browse the examples in the samples/ directory to learn how to:
The following roles are available for you to reuse when assembling your own playbook:
roles/core_*
)*roles/gui_*
)roles/smb_*
)roles/nfs_*
)roles/obj_*
)roles/hdfs_*
)roles/callhome_*
)roles/fal_*
)Note that Core GPFS is the only mandatory role, all other roles are optional. Each of the optional roles requires additional configuration variables. Browse the examples in the samples/ directory to learn how to:
All hosts in the play are configured as nodes in the same IBM Storage Scale cluster. If you want to add hosts to an existing cluster then add at least one node from that existing cluster to the play.
You can create multiple clusters by running multiple plays. Note that you will need to reload the inventory to clear dynamic groups added by the IBM Storage Scale roles:
- name: Create one cluster
hosts: cluster01
roles: ...
- name: Refresh inventory to clear dynamic groups
hosts: localhost
connection: local
gather_facts: false
tasks:
- meta: refresh_inventory
- name: Create another cluster
hosts: cluster02
roles: ...
The roles in this project can (currently) be used to create new clusters or extend existing clusters. Similarly, new file systems can be created or extended. But this project does not remove existing nodes, disks, file systems or node classes. This is done on purpose — and this is also the reason why it can not be used, for example, to change the file system pool of a disk. Changing the pool requires you to remove and then re-add the disk from a file system, which is not currently in the scope of this project.
Furthermore, upgrades are not currently in scope of this role. IBM Storage Scale supports rolling online upgrades (by taking down one node at a time), but this requires careful planning and monitoring and might require manual intervention in case of unforeseen problems.
The roles in this project store configuration files in /var/mmfs/tmp
on the first host in the play. These configuration files are kept to determine if definitions have changed since the previous run, and to decide if it's necessary to run certain IBM Storage Scale commands (again). When experiencing problems one can simply delete these configuration files from /var/mmfs/tmp
in order to clear the cache — doing so forces re-application of all definitions upon the next run. As a downside, the next run may take longer than expected as it might re-run unnecessary IBM Storage Scale commands. This will automatically re-generate the cache.
Please use the issue tracker to ask questions, report bugs and request features.
We welcome contributions to this project, see CONTRIBUTING.md for more details.
Please note: all roles / playbooks / modules / resources in this repository are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. We are not responsible for any damage or charges or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any production environment. This content is subject to change without notice.
Copyright IBM Corporation, released under the terms of the Apache License 2.0.