Running the Ansible Installation

This article details how to run the Lightbits installation using the lb-ansible Docker container and the configuration files that were set in a previous section.

For more information on this command, see the Running the Ansible Installation Playbook article in the Lightbits Installation and Configuration Guide.

You will need to reference the previously used parameter $DOCKER_REPOSITORY_USERNAME,$LB_ANSIBLE.

Running the Lightbits Installation Ansible Command

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

  1. Create a directory for the Lightbits etcd certificates.
Bash
Copy
  1. Use the following command to install Lightbits, using Ansible running inside the lb-ansible container.
Bash
Copy

The installation will take around 10 minutes to complete, and any SSH sessions with Lightbits target VMs will drop as they are rebooted.

When complete, the installation status will appear. You should see failed=0 for all of the Lightbits servers.

Bash
Copy

Once the installation is complete, follow the steps outlined in Performing Post-Deployment Configuration.

Anatomy Of The Command

The docker run command that will be used to run the install can be confusing, so we have detailed the components of it into each section below.

Create a directory to house the Lightbits etcd certificates.

mkdir ~/lb_install/lightos-certificates

Run Docker interactively, removing the container on exit and using the host network.

docker run -it --rm --net=host \

Use the current user-id within the container to prevent having to use root or sudo.

-e UID=`id -u` \

Use the current group-id within the container to prevent having to use root or sudo.

-e GID=`id -g` \

Set the current user to the container user to prevent having to use root or sudo.

-e UNAME=$USER \

Mount the previously created lightos-certificates directory to /lightos-certificates inside the container.

-v ~/lb_install/lightos-certificates/:/lightos-certificates \

Mount the working directory to /lb_install inside the container.

-v ~/lb_install/:/lb_install \

Change the working directory inside the container to /lb_install.

-w /lb_install \

Run the lb-ansible Docker container.

docker.lightbitslabs.com/$DOCKER_REPOSITORY_USERNAME/lb-ansible:$LB_ANSIBLE \

Run all text within the ' inside the lb-ansible container, starting with ansible-playbook.

sh -c 'ansible-playbook \

Set the Ansible logging to output to /lb_install/ansible.log inside the container.

-e ANSIBLE_LOG_PATH=/lb_install/ansible.log \

Output the Lightbits system JWT to /lb_install/lightos_jwt inside the container.

-e system_jwt_path=/lb_install/lightos_jwt \

Output the Lightbits default admin JWT to /lb_install/lightos_default_admin_jwt inside the container.

-e lightos_default_admin_jwt=/lb_install/lightos_default_admin_jwt \

Output the Lightbits etcd certificates to /lightos-certificates inside the container.

-e certificates_directory=/lightos-certificates \

Use the information inside the hosts file that was previously configured.

-i /lb_install/ansible/inventories/cluster_example/hosts \

Run the deploy-lightos.yml playbook with verbosity.

/lb_install/playbooks/deploy-lightos.yml -vvv'

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