Integration¶
Dependencies¶
LIM is an substantive module, so it should be integrated into Luna Platform already deployed. LIM services depends on the following Luna Platform components:
Luna Configurator
Luna Faces
Luna Licenses (feature index should be on)
Redis
Configurator integration¶
To integrate LIM services in Luna Platform, you need first upload its settings to Luna Configurator using configs migration mechanism. Special docker container entrypoint is supplied for these purposes.
To migrate configs to the latest revision just run following command:
docker run --rm --network host ${DOCKER_REGISTRY}/lim-configs:${LIM_TAG}
Or use a more advanced command with additional parameters:
docker run --rm --entrypoint='' --network host ${DOCKER_REGISTRY}/lim-configs:${LIM_TAG} python -m configs.migrate head --config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configurator
For downgrade, specify the target revision that can also be relative:
docker run --rm --entrypoint='' --network host ${DOCKER_REGISTRY}/lim-configs:${LIM_TAG} python -m configs.migrate -1
After these steps, you can start LIM services with config received from Luna Configurator.
Deploy tips¶
The following deploy sequence is recommended:
LIM Indexer
LIM Manager
LIM Matcher
The deployment of the LIM Indexer should be done on a separate server, because building an index takes a lot of resources for a long time. One LIM Indexer instance can only build one index at a time, so it is recommended to run multiple indexer instances. The indexer must be also configured with storage, which must be large enough.
LIM Manager assigns index building tasks to indexers, so it must be configured with actual LIM Indexer origins. It also recommended to run at least two manager instances for redundancy purposes. Since task management is carried out through the Redis, if one manager is down, the second one will be able to continue its work from the instant step.
LIM Matcher does not communicate with other LIM services. It only monitors the storage, and when indices appear it loads them into memory. Since matching requests processing is carried out through the Redis streams, any number of matcher instances could be run without any system config updates. The number of LIM Matcher instances should be determined by performance requirements.
The run instructions¶
Python Matcher Proxy integration¶
Once all the LIM services are running, you can integrate indexed matching into Luna Python Matcher Proxy through the plugin system. See matching plugin for details.
When using the matching plugin, you can make HTTP requests to Luna Python Matcher Proxy as usual, and it will forward the acceptable requests to LIM Matcher, and then enrich the match results if needed.