Skip to main content

2. Update

This document describes the process for generating and using the LUCA BDS update package.

The process consists of two main phases:

  1. Generating the updater from a machine with access to the repository.
  2. 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:

OptionDescription
1. Download image from a private registryDownloads the updated images from the LUCA private repository.
2. Download image from Docker HubDownloads additional necessary images (e.g., mariadb, seaweed, etc.).
3. Package the updaterGenerates the .tar.gz package containing all necessary scripts and resources.
4. ExitEnds 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:

OptionDescription
1. Load Docker imagesLoads the images included in the updater package into Docker.
2. Update a microserviceAllows modifying the configuration of a service in the docker-compose.
3. Manage docker-compose backupAllows restoring or deleting the docker-compose backup.
4. ExitEnds the script.

Load Docker images

This option:

  1. Takes the images included in the updater package.
  2. 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-compose file is automatically created.

Once this is done, two functionalities are offered.

Update an image

Allows changing the image of a service.

Process:

  1. Select the service to modify.
  2. 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:

  1. Select the service to modify.
  2. Enter the name of the environment variable.
  3. 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-compose file 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-compose file has been updated if changes were made.
  • There is a backup of the docker-compose in case of modifications.

The system is updated and ready to restart services if necessary.