Configuring Ansible Files

Lightbits is installed through Ansible and you must configure the example Ansible configuration files based on the environment. This article details how to configure those files for Azure.

Getting Started

First, ensure that you have followed the steps to Downloading And Preparing the Ansible Environment and are using the same versioning and Lightbits repository key.

You can then SSH into your Ansible installer VM using a method described in the SSH Into An Azure VM article.

To complete this section, you will need the private IP addresses of all Lightbits target VMs that were deployed in the Deploying Lightbits Targets step.

Get Lightbits Target VM IP Addresses

  1. To get the private IP addresses of the Lightbits target VMs, navigate to the Virtual Machines blade in the Azure portal.
  2. Find the Lightbits target VM and click on the name.
  1. Inside the VM Overview section under Properties, the Private IP address is shown in the Networking section.
  1. Copy the IP addresses for all Lightbits storage VMs and keep them safe for use in the following sections.

Configuring the Hosts File

The Hosts file contains information about the Lightbits target storage nodes, so that Ansible can configure them prior to creating a cluster.

  1. Open the Hosts file.
Bash
Copy
  1. Inside the text editor, change the content to reflect one of the examples below. The choice will depend on if you are using an SSH key or username/password.

If you are using more than the minimum of three servers, add another line for each server. Remember to add the server name(s) to the duros_nodes and etcd sections.

Hosts File Example Using an SSH Key

  1. Edit the following variables:
  • $VM_IP{i}
  • $KEYNAME
  • $VM_USERNAME
  • $LIGHTBITS_REPO_TOKEN
  • $DOCKER_REPOSITORY_USERNAME
Bash
Copy
  1. Save and exit the file.

Hosts File Example Using a Username And Password

  1. Edit the following variables:
  • $VM_IP{i}
  • $VM_USERNAME
  • $VM_PASSWORD
  • $LIGHTBITS_REPO_TOKEN
  • $DOCKER_REPOSITORY_USERNAME
Bash
Copy
  1. Save and exit the file.

Configuring the Server Configuration Files

Each VM used in the Lightbits cluster must have a configuration YAML file located in the ~/lb_install/ansible/inventories/cluster_example/host_vars/ directory. The name of the file must match the name given to the node in the ~/lb_install/ansible/inventories/cluster_example/hosts file. For example: server00.yml, server01.yml, server02.yml. This will be referenced as $SERVERNAME.

The configuration file for each server includes a section for initialDeviceCount and maxDeviceCount. In the cloud, these are the same and are determined by the VM size that was selected. For the parameter that needs to be configured here, refer to the table below.

VM SizeDisk Count
Standard_L16s_v32
Standard_L32s_v34
Standard_L48s_v36
Standard_L64s_v38
Standard_L80s_v310
Standard_L16as_v32
Standard_L32as_v34
Standard_L48as_v36
Standard_L64as_v38
Standard_L80as_v310
  1. Open the server configuration file.
Bash
Copy
  1. Use the example below to create or edit the configuration file.
  2. Edit the following variables:
  • $VM_IP
  • $SERVERNAME
  • $DISK_COUNT
Bash
Copy
  1. Repeat this step until all VMs in the storage cluster have a configuration file.

Configuring the Group Variables File

Some parameters are applied to all servers in the cluster. These are controlled by the file at ~/lb_install/ansible/inventories/cluster_example/group_vars/all.yml. This file needs to be edited for Azure deployments.

  1. Open the configuration file.
Bash
Copy
  1. Configure the file to match the code snippet below.
Bash
Copy
  1. Save and exit the file.

Configuring Ansible Tasks

For the installation in Azure, some task and templates files need to be changed. Run the following to configure those files.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard