This ansible role deploys and configures all services required for an Ophidia cluster.
This repository contains Ansible roles that are published in Ansible Galaxy: https://galaxy.ansible.com/OphidiaBigData/ophidia-cluster/
- cert_passwd: the password for the certificates and user account
- ophdb_passwd: the password for MySQL
- oph_user: user that will run the Ophidia framework
- oph_account_user: username of the Ophidia user account to be created
- oph_account_passwd: password of the Ophidia user account to be created
- base_path: base path for shared data folder
- io_prefix: hostname perfix of Ophidia IO nodes
- io_node_number: number of IO nodes considered in the cluster
- io_hostnames: list of hostnames of Ophidia IO nodes
- io_cpus: number of cores for Ophidia IO nodes
- io_ips: list of IP addresses of Ophidia IO nodes
- server_hostname: Ophidia Server node hostname
- private_server_ip: private IP address of Ophidia Server node
- public_server_ip: public IP address of Ophidia Server node
- nfs_subnet: subnetwork for the Ophidia io-compute nodes (for NFS folder mount)
- mysql_subnet: subnetwork for MySQL server on the cluster nodes (for database grant)
- deploy_type: type of deployment ('install', 'configure' or 'complete')
- node_type: type of node to deploy ('server', 'io' or 'single')
- user_home: path of the user home directory
- force_reinstall: flag (false or true) to define if instance should be updated when the role is executed a second time
Requires grycap.nfs and grycap.slurm roles.
Requires at least Ansible v2.3.
An example of playbook to install the Ophidia cluster:
---
- hosts: oph-server
roles:
- { role: 'OphidiaBigData.ophidia-cluster', node_type: 'server', deploy_type: 'install', server_hostname: "{{ansible_hostname}}", io_hostnames: "{{ groups['oph-io']|map('extract', hostvars, 'ansible_hostname')|list }}", private_server_ip: "{{ ansible_default_ipv4.address }}", io_node_number: "{{ groups['oph-io']|length }}" }
- hosts: oph-io
roles:
- { role: 'OphidiaBigData.ophidia-cluster', node_type: 'io', deploy_type: 'install', server_hostname: "{{ hostvars['oph-server']['ansible_hostname'] }}", io_hostnames: "{{ groups['oph-io']|map('extract', hostvars, 'ansible_hostname')|list }}", private_server_ip: "{{ hostvars['oph-server']['ansible_default_ipv4']['address'] }}" }
An example of playbook to configure the Ophidia cluster:
---
- hosts: oph-server
roles:
- {role: 'OphidiaBigData.ophidia-cluster', node_type: 'server', deploy_type: 'configure', server_hostname: "{{ansible_hostname}}", io_hostnames: "{{ groups['oph-io']|map('extract', hostvars, 'ansible_hostname')|list }}", io_ips: "{{ groups['oph-io']|map('extract', hostvars, 'ansible_default_ipv4')|list }}", private_server_ip: "{{ ansible_default_ipv4.address }}", public_server_ip: "{{ ansible_default_ipv4.address }}", nfs_subnet: "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}", mysql_subnet: "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}", io_node_number: "{{ groups['oph-io']|length }}" }
- hosts: oph-io
roles:
- {role: 'OphidiaBigData.ophidia-cluster', node_type: 'io', deploy_type: 'configure', server_hostname: "{{ hostvars['oph-server']['ansible_hostname'] }}", io_hostnames: "{{ groups['oph-io']|map('extract', hostvars, 'ansible_hostname')|list }}", io_ips: "{{ groups['oph-io']|map('extract', hostvars, ['ansible_default_ipv4', 'address'])|list }}", private_server_ip: "{{ ansible_default_ipv4.address }}", public_server_ip: "{{ ansible_default_ipv4.address }}", nfs_subnet: "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}", mysql_subnet: "{{ ansible_default_ipv4.network }}/{{ ansible_default_ipv4.netmask }}" }
- Ophidia: http://ophidia.cmcc.it
- Installation and configuration: http://ophidia.cmcc.it/documentation/admin/index.html