Running the Ansible Installation Playbook

Lightbits Cluster Installation Process

#Installation Steps
1Connecting your installation workstation to Lightbits’ software repository
2Verifying the network connectivity of the servers used in the cluster
3Setting up an Ansible environment on your installation workstation
4Installing a Lightbits cluster by running the Ansible installation playbook
5Updating clients (if required)
6Provisioning storage, connecting clients, and performing IO tests

As discussed in Preparing the Installation Workstation (Ansible Controller), we support installing using Ansible or using a prebuilt Docker image that contains Ansible. Pick the method that applies to your installation environment and follow the commands to install the Lightbits cluster software on the storage servers. Afterwards, go to the bottom of the section to confirm a successful installation.

For both methods, we provide the simple default installation methods. However, we provide other more advanced installation configuration examples in the Ansible Docker section. Note, however, that these same examples can be adopted into the Ansible method; for that you will just skip the Docker commands and refer to the ansible-playbook commands as the template.

Ansible Installation Method

Running the Ansible Controller

The Ansible playbook operations below can take several minutes. The output will report the status of all the tasks that succeeded/failed on the nodes.

To install the cluster software and configure the cluster, change into light-app directory with cd ~/light-app, and enter the following command to run the playbook. Note that this should be executed as a non-root user.

Bash
Copy
  • This command must be run from the directory where light-app was extracted to. All of the paths will then work as displayed.
  • The inventory file points to a "hosts" file, which instructs Ansible where to deploy Lightbits.
  • The selected playbook, "deploy-lightos.yml", instructs Ansible on how to install and configure the Lightbits cluster on the servers mentioned in the "hosts" file.
  • Ansible will log to its default path as specified by ansible.cfg. By default that is /var/log/ansible.log. The log path can be changed by prefixing ANSIBLE_LOG_PATH=/var/log/ansible.log ansible-playbook ...
  • The following files will be created into the home directory: lightos-system-jwt & lightos-default-admin-jwt. Note: The home directory is the home directory of the non-root user running the Ansible command.
  • Certificates used by the cluster will be saved into a new directory, lightos-certificates. This directory will be created in the home directory.
  • It is recommended to make a secure backup of this content, or at a minimum, the jwt files and lightos-certificates directory.
  • Debug level verbosity is enabled with -vvv. This helps diagnose any issues if they happen.

When the installation is done, the cluster will be bootstrapped with a system-scope project. You will need access to the JWT. By default the cluster-admin JWT is placed in ~/lightos-system-jwt of the Ansible host. This path can be changed by editing group_vars/all.yml before running the ansible-playbook, and appending this variable system_jwt_path: "{{ '~/lightos-system-jwt' | expanduser }}"

Prebuilt Ansible Docker Installation Method

If using the prebuilt Docker image with Ansible, ensure that Docker is logged in. Refer to the bottom of Preparing the Installation Workstation (Ansible Controller) for instructions on how to log in using Docker.

This first subsection shows instructions on launching a simple or default Lightbits installation. The subsections afterwards show other variations to the installation that might apply to more complex configurations.

Additionally, each Docker example requires the correct Docker URL docker.lightbitslabs.com/lightos-3-(Minor Ver)-(Rev)-rhl-8/lb-ansible:v9.1.0. Note that the path bit is incomplete and requires substitution. Refer to the Lightbits Installation Customer Addendum for the correct Docker image URL.

Running Using the lb-ansible Docker Image

Bash
Copy

We will pre-create the lightos-certificates directory inside ~/light-app, so that our certificates get saved outside of the container.

Docker command breakdown:

  • Mount the current working directory or $PWD to /ansible inside the container, to have access to the playbook and roles. The current working directory at this point will be where light-app was extracted.
  • Set the WORKDIR to /ansible inside the container. This sets the current working directory within Docker to /ansible.
  • Configure Ansible to write logs to /ansible/ansible.log.
  • Run the playbook with specified hosts from an inventory folder in the ansible/inventories/cluster_example.
  • Sets system_jwt_path for the system jwt to be saved in ~/light-app/lightos_jwt after the container is closed.
  • Set light_default_admin_jwt path for the admin-project jwt to be placed at ~/light-app/lightos_default_admin_jwt after the container is closed.
  • Set the path for the generated certificates to be placed in ~/light-app/lightos-certificates after the container is closed.

Custom Inventory Folder

If the inventory folder is placed in a different location, such as: /path/to/inventory, you can mount this path as well and use it:

Bash
Copy

Using SSH-Keys Present On Ansible-Controller Host

If you use SSH-Keys present on your ansible-controller machine and you copied these keys to the authorized_keys on target hosts, you will want to use this key inside the container.

The following example shows how to mount the ~/.ssh folder so that Ansible running inside the container will use it.

Bash
Copy

Verify Successful Installation

When the installation completes with no errors, you will see an output similar to the following:

Bash
Copy

The installation flow is now complete, and you can move on to the client configuration sections of the Installation Guide.

You should also make sure you back up your installation files properly. For more, see Planning for the Lightbits Cluster Software Installation.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard