1. Installation
This document describes the process for generating and installing the installation package of LUCA BDS.
The process consists of two main phases:
- Generating the installer from a machine with access to the repository.
- Installing LUCA on the target machine using the generated package.
Generating the Installer
From a terminal with access to the LUCA repository, execute:
./create-installer.sh
The script displays a menu with the following options:
| Option | Description |
|---|---|
| 1. Download image from a private registry | Downloads images from the private LUCA repository. |
| 2. Download image from Docker Hub | Downloads additional necessary images (e.g., mariadb, seaweed, etc.). |
| 3. Download Docker binaries | Downloads Docker binaries for installations on machines without Docker or internet connection. |
| 4. Download Docker Compose binaries | Downloads Docker Compose for offline installations. |
| 5. Download aws and jq binaries | Required to upload models to the local S3 service. Only necessary for installations without an internet connection. |
| 6. Download AI models | Includes AI models to have them ready during the installation. Requires a local S3 service. |
| 7. Package the installer | Generates the .tar.gz package with all the necessary scripts and resources. Allows including a license and a copy (dump) of another LUCA database. |
| 8. Exit | Ends the script. |
The result of this process is a file:
installer.tar.gz
This file must be copied to the machine where the installation will take place.
Installing LUCA BDS
Once the installer.tar.gz file is transferred to the target machine:
Unpacking the Installer
tar -xzf installer.tar.gz -C .
chmod 775 .
cd installer
Executing the Installation Script
./install-luca-bds.sh
The script performs the following steps.
Installation Process
Operating System Detection
The script attempts to automatically detect the operating system. If it cannot determine it, it prompts for manual input.
Environment Initialization
Prompt:
Do you want to initialize the Docker environment or install the necessary utilities to upload models to the S3 service? (Y/n)
This step is used if:
- Docker is not installed.
- aws and jq are needed to manage uploading models to the S3 repository.
Optionally, it also allows:
- Initializing the LUCA Docker network.
- Creating the necessary volumes.
Installing the lucadb Service
Prompt:
Do you want to install the lucadb service? (Y/n)
This step handles the configuration of the LUCA database.
The script:
- Generates an
init.sqlfile. - Creates the schemas:
lucaluca_accounts
- Creates the corresponding users with their passwords and permissions.
It subsequently asks whether to add lucadb to the docker-compose that will be generated in the next step.
Installing the luca Service
Prompt:
Do you want to install the luca service? (Y/n)
This step generates the docker-compose that will bring up LUCA services.
First, it asks which services to install.
Base Services
luca-proxyluca-webluca-api
Optionally:
luca-accounts
Additional Services
You can also choose to install:
luca-ailuca-dispatcher
Depending on the selected services, the script prompts for the necessary configuration values.
Finally, it offers the option to:
- Create the docker-compose.
- Start the services.
Loading AI Models
Prompt:
Do you want to load AI models into the local S3 storage? (Y/n)
This step is only necessary if a local S3 service has been configured to store models.
The process:
- Requests the S3 configuration (if it was not inherited from the previous step).
- Creates the models bucket if it does not exist.
- Uploads the AI models included in the package.
The models are loaded from the files included in the .tar.gz.
Final Result
Upon completing the process:
- Docker is configured.
- The LUCA services are deployed.
- The database is initialized.
- The AI models are loaded (if applicable).
To make LUCA operational and usable, the following steps must be followed:
- Log into Keycloak as an administrator user.
- Select the realm to which LUCA connects.
- Select the Clients box.
- Navigate to the client luca-bds-web and insert the corresponding URL for LUCA in the Valid Redirect URIs box (for example,
https://luca.luca-bds.com/*). - Navigate to the client luca-bds-api and check the Credentials option.
- In the Client Secret box, press the Regenerate button and copy the new secret.
- Return to the terminal and execute the command
sudo nano /etc/luca/docker-compose.yml. - Modify the
ACCOUNTS_ADMIN_CLIENTSECRETvariable in theapianddispatcherservices (if applicable) and paste the secret copied in step 6. - Save the changes and execute the command
systemctl restart luca.
The system will be ready for use.