2. Update
This document describes the process for generating and using the LUCA BDS update package.
The process consists of two main phases:
- Generating the updater from a machine with access to the repository.
- Updating LUCA on the destination machine using the generated package.
Generating the updater
From a terminal with access to the LUCA repository, execute:
./create-updater.sh
The script displays a menu with the following options:
| Option | Description |
|---|---|
| 1. Download image from a private registry | Downloads the updated images from the LUCA private repository. |
| 2. Download image from Docker Hub | Downloads additional necessary images (e.g., mariadb, seaweed, etc.). |
| 3. Package the updater | Generates the .tar.gz package containing all necessary scripts and resources. |
| 4. Exit | Ends the script. |
The result of this process is a file:
updater.tar.gz
This file must be copied to the machine where the update will take place.
Updating LUCA BDS
Once the updater.tar.gz file has been transferred to the destination machine:
Unpacking the updater
tar -xzf updater.tar.gz -C .
chmod 775 .
Running the update script
./update-luca-bds.sh
Before performing any action, the script asks:
Do you want to stop the luca service? (Y/n)
This allows stopping the containers before applying changes to the images or configuration.
Updater Options
After the initial question, the script shows the following menu:
| Option | Description |
|---|---|
| 1. Load Docker images | Loads the images included in the updater package into Docker. |
| 2. Update a microservice | Allows modifying the configuration of a service in the docker-compose. |
| 3. Manage docker-compose backup | Allows restoring or deleting the docker-compose backup. |
| 4. Exit | Ends the script. |
Load Docker images
This option:
- Takes the images included in the updater package.
- Loads them into the Docker environment of the machine.
This prepares the system to use new versions of the services.
Update a microservice
This option allows modifying the content of the docker-compose file that contains the LUCA configuration.
Before making any changes:
- A backup of the
docker-composefile is automatically created.
Once this is done, two functionalities are offered.
Update an image
Allows changing the image of a service.
Process:
- Select the service to modify.
- Enter the new tag of the image you wish to use.
The script updates the image reference in the docker-compose.
Modify environment variables
Allows adding or modifying environment variables in a service.
Process:
- Select the service to modify.
- Enter the name of the environment variable.
- Enter the value of the variable.
Behavior:
- If the variable does not exist, it is added to the file.
- If the variable already exists, its current value will be displayed, and confirmation will be requested before updating it.
Managing docker-compose backups
The updater allows managing the backup created when modifying services.
Available options:
- Restore backup — Restores the
docker-composefile to the state prior to modification. - Delete backup — Deletes the backup file generated during the update.
Final Result
After completing the necessary operations:
- The new images are loaded in Docker.
- The
docker-composefile has been updated if changes were made. - There is a backup of the
docker-composein case of modifications.
The system is updated and ready to restart services if necessary.