Skip to content

Latest commit

 

History

History

liveness-detector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

liveness-detector

This module provides an endpoint to check whether the user is actively using his pod or not

Installation

In order to kickstart the project ensure pixi is installed as we will be using it for environment and packaging management. Then to install the base dependencies and jupyter kernel for this environment run

$ pixi install

Testing

running the tests can be achieved by running the following command

$ pixi run test

Running the server

shell

Ensure the PROJECT_SOURCE environment variable is set then run

$ pixi run uvicorn liveness_detector:app --port 8888

Docker

build the image with

$ docker build --target=production --tag=${YOUR_TAG}

run it with

$ docker run -it --rm -v ${YOUR_LOCAL_PROJECT_PATH}:/project:Z -e PROJECT_SOURCE=/project -p 8888:8888
${YOUR_TAG}

Connect to it with

$ curl -sSL 127.0.0.1:8888/healthz

As an init container

mount the /renku-liveness folder in the init container and the environment container and run the /entrypoint-init-container.sh script

then from the environment container, run the /renku-liveness/entrypoint-hook.sh with the 8888 port forwarded.