Chapter 8. Defining deployment details
To automate the deployment of Red Hat Hyperconverged Infrastructure for Virtualization using Ansible, you need to define your deployment in the following configuration files.
These files are created on the hyperconverged node and establish SSH public key authentication with itself and other nodes in the cluster.
- An inventory file that defines the storage volumes and their layout as Gluster volumes.
- An inventory file for single node deployment that defines the storage volumes and their layout as Gluster volumes.
- A variable file that defines a number of required values for deployment.
Create backup copies of the example configuration files.
For 3 to 12 nodes deployment, use the following commands to create the backup copies:
# cd /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment # cp gluster_inventory.yml gluster_inventory.yml.backup # cp he_gluster_vars.json he_gluster_vars.json.backup
For single node deployment, use the following commands to create the backup copies:
#cd/etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment #cp single_node_gluster_inventory.yml single_node_gluster_inventory.yml.backup # cp he_gluster_vars.json he_gluster_vars.json.backup
Define your deployment in a
gluster_inventory.ymlfor a 3 to 12 nodes deployment or in
single_node_gluster_inventory.ymlfile for a single node deployment.
Use the example
gluster_inventory.ymlfile to define your deployment. A complete outline of this file is available in Understanding the
Define deployment variables in a
Use the example
he_gluster_vars.jsonfile to define the required variables. A complete outline of this file is available in Understanding the
he_gluster_vars.jsonfile and specify a password.
The required variables in
he_gluster_vars.jsoninclude password values, so it is important to encrypt the file to protect the password values.
# ansible-vault encrypt he_gluster_vars.json
Enter and confirm a new vault password when prompted.
This password is required when you deploy Red Hat Hyperconverged Infrastructure for Virtualization using the process in Executing the deployment playbook.
See Working with files encrypted using Ansible Vault for more information.