Preparing the Installation Workstation (Ansible Controller)
The Ansible Installation host
or Ansible Controller
is the host running the Ansible
playbook to install the Lightbits cluster.
We support two ways to set up the Ansible Controller
:
- Ansible and its dependencies are installed on the Ansible Controller.
- Using a prebuilt Ansible Docker image.
Choose one of the methods and follow the steps - for either the Ansible or Docker method.
We recommend the Docker method, due to its simplicity and consistency in setting up the Ansible environment.
Ansible Method
For the Ansible method, follow these instructions to install the dependencies.
Installing Ansible and Dependencies
The following tools are required to complete the Lightbits cluster software installation:
- sshpass or ssh-key authentication
- Python v3.13 or higher
- Python Modules: ansible, netaddr, pyjwt, six
If you have validated the networking environment as described in the previous section, log in to your installation workstation and begin downloading and installing the required tools on your workstation.
Installing sshpass or Use ssh-key Authentication
The Python tool is essential for running commands remotely on each of the servers used in the cluster. To run these commands, you must install a Secure Shell (SSH) authentication software package. There are two ways to install this package.
- Use the Linux sshpass utility.
To install “sshpass”, enter the following command at the CLI:
$ yum install -y sshpass
- Use ssh-key authentication.
To use ssh-key authentication, see Using SSH-Key Authentication.
- Package required for Multi-Tenancy
$ yum install -y libselinux-python3
Installing Other Dependencies
Install the remaining packages to meet the dependencies for Ansible. Some of these might already be present on the system.
yum install -y gcc libffi-devel openssl-devel git openssh curl bash openssl sudo
Installing the Required Python Version
The Ansible installer is a module installed with Python. Lightbits recommends that you have Python v3.10 or above installed on your system.
If Linux reports that Python 3.x is not installed, make sure to have Python 3.13 and pip3.13 installed.
Installing Ansible Module Using PyPI
Check if Ansible is installed, as well as its version. For example:
ansible --version
Command 'ansible' not found
If not found, you can also install Ansible
using the latest python's pip (pip3.13 in this case). Note that this should be run as a non-root user.
pip3.13 install ansible==9.13.0
Verify that Ansible
is installed, as well as its version, by entering:
ansible --version
ansible [core 2.16.14]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.13/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.13.1 (main, Dec 9 2024, 20:39:36) [GCC 14.2.0] (/usr/local/bin/python3.13)
jinja version = 3.1.5
libyaml = True
If the installation fails due to a UnicodeEncodeError, it is because the locale is not fully configured on the Ansible host. Set the local LC_ALL environment variable and run the pip3 install ansible
command again. For example, for UTF8 systems, set the local to: export LC_ALL=en_US.UTF-8
.
Installing Additional Python Modules
The Python netaddr module and python_jwt are also required.
These modules are used to manipulate network addresses, and generate JWT
tokens as part of the installation.
At your workstation CLI, enter:
Installing Ansible Collections
Install the necessary Ansible collections. If the collections are already installed, proceed to the next step.
ansible-galaxy collection install --no-cache community.grafana community.crypto ansible.posix
Docker Method
Rather than installing and preparing Ansible and its dependencies, we also provide a custom Ansible image to deploy the Lightbits cluster image that contains all dependencies.
Using a Prebuilt Ansible Docker Image
Make sure se-linux is in Permissive or disabled:
[root@client1 ~]#
$ getenforce
Permissive
The only prerequisites to use this image are:
- Having Docker installed.
- Access to Lightbits public registry or a private registry to fetch the
lb-ansible
image. - This method requires a Docker login. Log in using the steps below and the credentials provided in the Lightbits Installation Customer Addendum.
docker login docker.lightbitslabs.com
Username: lightos-3-(Minor Ver)-(Rev)-rhl-(8/9)
Password: <YOUR_TOKEN>
The Docker username and password can be found in the Lightbits Installation Customer Addendum.
Refer to the Docker Installation Documentation for additional information.