The Backend is the REST API server of the MOV.AI platform All the REST API request end points are contained in the Backend server. The Backend is activating the internal platform APIs for serving the received requests Additionally the Backend is managing the users Login process
The python module named backend
should launch a web server on port 5004 serving all necessary API endpoints for MOV.AI core webservices.
python3 -m backend
- 2 running redis servers
Parameters list that can be set through environment variables:
HTTP_PORT=5004
JWT_SECRET_KEY='random authentication key'
REDIS_LOCAL_PORT=6379
REDIS_MASTER_PORT=6379
REDIS_MASTER_HOST=redis-master
REDIS_LOCAL_HOST=redis-local
The complete build process requires 2 steps :
- a python module building step which will create a
.whl
file - a docker image building step which will create a container image and install the previously built
.whl
file
rm dist/*
python3 setup.py bdist_wheel --universal
python3 -m pip install --no-cache-dir \
--index-url="https://artifacts.cloud.mov.ai/repository/pypi-experimental/simple" \
--extra-index-url https://pypi.org/simple \
./dist/*.whl
This will install all dependencies, including MOVAI modules such as:
- movai_core_shared - https://github.com/xsoulp/movai-core-shared
- gd_node - https://github.com/xsoulp/gd-node
- dal - https://github.com/xsoulp/data-access-layer
For ROS melodic distribution :
docker build -t backend:melodic -f docker/melodic/Dockerfile .
For ROS noetic distribution :
docker build -t backend:noetic -f docker/noetic/Dockerfile .
For ROS melodic distribution :
docker run -t backend:melodic
For ROS noetic distribution :
docker run -t backend:noetic
For ROS melodic distribution :
export BACKEND_DISTRO=melodic
docker-compose -f tests/docker-compose.yml up -d
For ROS noetic distribution :
export BACKEND_DISTRO=noetic
docker-compose -f tests/docker-compose.yml up -d