Before upgrade#
Make sure that you are the root user before upgrade!
Before launching the LUNA PLATFORM, you must perform the following actions:
- Create backups.
- Delete old symbolic link.
- Unpack the distribution of the new version of LUNA PLATFORM.
- Create new symbolic link.
- Change group and owner for new directories.
- Move Image Store buckets.
- Configure SELinux and Firewall if not previously configured.
- Create log directories for new services, if logging to a file was previously used.
- Update license.
- Install Docker.
- Set up GPU computing if you plan to use GPU.
- Login to VisionLabs registry if authorization was not previously performed.
Backups creation#
Create backups for all the databases used with LUNA PLATFORM before performing the migration procedures. You can restore your data if any problems occur during the migration.
It is recommended to create backups for Image Store buckets.
Backups creation for databases and buckets is not described in this document.
Delete old symbolic link#
Go to the "luna" directory.
cd /var/lib/luna
Delete the "current" symbolic link.
rm -f current
Distribution unpacking#
The distribution package is an archive luna_v.5.59.0, where v.5.59.0 is a numerical identifier, describing the current LUNA PLATFORM version.
The archive includes configuration files, required for installation and exploitation. It does not include Docker images for the services. They should be downloaded from the Internet.
Move the distribution package to the directory on your server before the installation. For example, move the files to /root/
directory. The directory should not contain any other distribution or license files except the target ones.
Move the distribution to the created directory.
mv /root/luna_v.5.59.0.zip /var/lib/luna
Install the unzip archiver if it is necessary.
yum install -y unzip
Go to the folder with distribution.
cd /var/lib/luna
Unzip files.
unzip luna_v.5.59.0.zip
Symbolic link creation#
Create a symbolic link.
The link indicates that the current version of the distribution file is used to run LUNA PLATFORM.
ln -s luna_v.5.59.0 current
Changing group and owner for directories#
LP services are launched inside the containers by the "luna" user. Therefore, it is required to set permissions for this user to use the mounted volumes.
Go to the LP "example-docker" directory.
cd /var/lib/luna/current/example-docker/
Create a directory to store settings.
mkdir luna_configurator/used_dumps
Set permissions for the user with UID 1001 and group 0 to use the mounted directories.
chown -R 1001:0 luna_configurator/used_dumps
Move Image Store buckets#
LUNA PLATFORM 5 is supposed to store buckets in the root directory /var/lib/luna/
to simplify the process of subsequent updates.
Create a directory to store Image Store buckets.
mkdir -p /var/lib/luna/image_store
Move the contents of the Image Store bucket directory to the new bucket storage directory.
mv /var/lib/luna/luna_v.3.3.8/luna-image-store/luna_image_store/local_storage/* /var/lib/luna/image_store
Set permissions for the user with UID 1001 and group 0 to use the mounted directories.
chown -R 1001:0 /var/lib/luna/image_store
SELinux and Firewall#
You must configure SELinux and Firewall so that they do not block LUNA PLATFORM services.
SELinux and Firewall configurations are not described in this guide.
If SELinux and Firewall are not configured, the installation cannot be performed.
Create log directory for new services#
Skip this section if no logs were previously stored on the server.
In the version of LUNA PLATFORM 5, new services have appeared for which you need to create directories with logs.
See "Logging to server" section if you have not previously used logging to a file, but want to enable it.
Following are the commands to create directories for all existing services. These commands will create and assign permissions only to missing directories.
mkdir -p /tmp/logs/configurator /tmp/logs/image-store /tmp/logs/accounts /tmp/logs/faces /tmp/logs/licenses /tmp/logs/events /tmp/logs/python-matcher /tmp/logs/handlers /tmp/logs/remote-sdk /tmp/logs/tasks /tmp/logs/tasks-worker /tmp/logs/sender /tmp/logs/api /tmp/logs/admin /tmp/logs/backport3 /tmp/logs/backport4 /tmp/logs/lambda
chown -R 1001:0 /tmp/logs/configurator /tmp/logs/image-store /tmp/logs/accounts /tmp/logs/faces /tmp/logs/licenses /tmp/logs/events /tmp/logs/python-matcher /tmp/logs/handlers /tmp/logs/remote-sdk /tmp/logs/tasks /tmp/logs/tasks-worker /tmp/logs/sender /tmp/logs/api /tmp/logs/admin /tmp/logs/backport3 /tmp/logs/backport4 /tmp/logs/lambda
If you need to use the Python Matcher Proxy service, then you need to additionally create the /tmp/logs/python-matcher-proxy
directory and set its permissions.
License update#
To update the license, follow these steps:
- Follow the steps from license activation manual.
- Set settings for HASP license or Guardant license before starting Licenses container.
Actions from License activation manual#
Open the license activation manual and follow the necessary steps.
Note: This action is mandatory. The license will not work without following the steps to activate the license from the corresponding manual.
Docker installation#
The Docker installation is described in the official documentation.
Note: Docker version 25.0.3 was used when testing this instruction. It is not guaranteed to work with higher versions of Docker.
Quick installation commands are listed below.
Check the official documentation for updates if you have any problems with the installation.
Install dependencies:
yum install -y yum-utils device-mapper-persistent-data lvm2
Add repository:
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install Docker:
yum -y install docker-ce docker-ce-cli containerd.io
Launch Docker:
systemctl start docker
systemctl enable docker
Check Docker status:
systemctl status docker
Calculations using GPU#
You can use GPU for the general calculations performed by Remote SDK.
Skip this section if you are not going to utilize GPU for your calculations.
You need to install NVIDIA Container Toolkit to use GPU with Docker containers. The example of the installation is given below.
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | tee /etc/yum.repos.d/nvidia-docker.repo
yum install -y nvidia-container-toolkit
systemctl restart docker
Check the NVIDIA Container toolkit operating by running a base CUDA container (this container is not provided in the LP distribution and should be downloaded from the Internet):
docker run --rm --gpus all nvidia/cuda:11.4.3-base-centos7 nvidia-smi
See the NVIDIA documentation for additional information.
Attributes extraction on the GPU is engineered for maximum throughput. The input images are processed in batches. This reduces computation cost per image but does not provide the shortest latency per image.
GPU acceleration is designed for high load applications where request counts per second consistently reach thousands. It won’t be beneficial to use GPU acceleration in non-extensively loaded scenarios where latency matters.
Login to registry#
When launching containers, you should specify a link to the image required for the container launching. This image will be downloaded from the VisionLabs registry. Before that, you should login to the registry.
Login and password can be requested from the VisionLabs representative.
Enter login
docker login dockerhub.visionlabs.ru --username <username>
After running the command, you will be prompted for a password. Enter password.
In the
docker login
command, you can enter the login and password at the same time, but this does not guarantee security because the password can be seen in the command history.