Downloading And Preparing the Ansible Environment
This article details how to prepare the Ansible environment on the Ansible installer VM.
You can SSH into your Ansible installer VM using a method described in the SSH Into An Azure VM article.
Note that the Lightbits version maps to a few parameters that you will apply in this section. The table below describes the Lightbits version and the mapping to the specific parameters.
Lightbits Version | Docker Repository Username | Light App Package Name | Ansible Version |
---|---|---|---|
3.7.1 | lightos-3-7-1-rhl-8 | light-app-install-environment-v3.7.1~b1548 | v9.1.0 |
3.6.1 | lightos-3-6-1-rhl-8 | light-app-install-environment-v3.6.1~b1503 | 4.2.0 |
3.5.1 | lightos-3-5-1-rhl-8 | light-app-install-environment-v3.5.1~b1443 | 4.2.0 |
3.4.1 | lightos-3-4-1-rhl-8 | light-app-install-environment-v3.4.1~b1397 | 4.2.0 |
3.3.1 | lightos-3-2-1-rhl-86 | light-app-install-environment-v3.3.1~b1335 | 4.2.0 |
3.2.1 | lightos-3-2-1-rhl-86 | light-app-install-environment-v3.2.1~b1252 | 4.2.0 |
3.1.2 | lightos-3-1-2-rhl-86 | light-app-install-environment-v3.1.2~b1127 | 4.2.0 |
3.1.1 | lightos-3-1-1-rhl-86 | light-app-install-environment-v3.1.1~b1119 | 4.2.0 |
In this guide, the reference will use Lightbits version 3.7.1.
- Set the environment variables.
export LIGHTBITS_REPO_TOKEN='YOUR_TOKEN_HERE'
export DOCKER_REPOSITORY_USERNAME='lightos-3-7-1-rhl-8'
export LIGHT_APP_PACKAGE_NAME='light-app-install-environment-v3.7.1~b1548'
export LB_ANSIBLE='v9.1.0'
export KEYNAME='key_name.pem'
Downloading the Lightbits Installer Container
The Lightbits Docker container holds a complete Ansible environment and allows Lightbits to easily be installed.
- Log in to the Lightbits Docker repository.
sudo docker login docker.lightbitslabs.com -u $DOCKER_REPOSITORY_USERNAME -p $LIGHTBITS_REPO_TOKEN
- Pull the lb-ansible container.
sudo docker pull docker.lightbitslabs.com/$DOCKER_REPOSITORY_USERNAME/lb-ansible:$LB_ANSIBLE
Creating a Working Directory
To segregate installs and contain all install information inside a logical container, it is recommended to create a directory per cluster. This also means that you can re-use the same installer VM if you need to perform multiple cluster installs.
- Create a working directory.
mkdir ~/lb_install
Copying the SSH Keys to a Working Directory
If you are using SSH keys to authenticate from the installer VM to the Lightbits storage VMs, Ansible will also need to use the key to authenticate. If you are using a username/password then you can skip this step.
- Create a keys directory inside the working directory.
mkdir ~/lb_install/keys
- Copy the key to the keys directory.
cp /path/to/key/$KEYNAME ~/lb_install/keys/$KEYNAME
- Ensure that the key has the correct permissions.
sudo chmod 700 ~/lb_install/keys/$KEYNAME
Downloading Ansible Packages (Light App) To the Installer VM
The Ansible environment configuration files are hosted inside a Lightbits repository and must be downloaded and then configured.
- Download the install package.
wget "https://dl.lightbitslabs.com/$LIGHTBITS_REPO_TOKEN/$DOCKER_REPOSITORY_USERNAME/raw/files/${LIGHT_APP_PACKAGE_NAME}.tgz?accept_eula=1" -O ~/lb_install/$LIGHT_APP_PACKAGE_NAME.tgz
- Unpack the install package.
tar -xvf ~/lb_install/$LIGHT_APP_PACKAGE_NAME.tgz