Commit cdb53e74 authored by Matthias's avatar Matthias
Browse files

cleanup readme

parent 3acde840
Pipeline #29270 passed with stages
in 2 minutes and 29 seconds
......@@ -2,71 +2,4 @@
API to start, stop, manage import processes for memobase. Will be used in the Admin Interface (Drupal).
See Dockerfile for dependencies.
# Deploy in Kubernetes
cd kubernetes-manifests
kubectl apply -f .
# Start the app
python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt
pip3 install -e .
cd import_api_app
mkdir charts
cd ..
export FLASK_APP=import_api_app
export FLASK_ENV=development
export SFTP_PORT=80
export SFTP_USER=mb_sftp
flask run
This will start a development web server hosting your application, which you will be able to see by navigating to
# Update the charts
Currently the app only use the helm charts stored in /charts. They are updated at deployment via the Dockerfile.
To update them use `/`. The source is <>
# Run tests
The tests work locally if you have a connection to a kubernetes cluster, i.e. kubectl is configured. To run the tests, from the root directory, run `pytest`. It is not possible to run them in gitlab yet.
# Force code-style checking before committing
Done with pre-commits and flake8 : <>
Needs to run in the console of the venv
pre-commit install
# Automatically fix coding errors
autopep8 --in-place --aggressive --aggressive *.py
# How to work with microK8s if needed
- Install microK8s following (better than the microK8s site)
- Don't forget the firewall rules :
sudo ufw allow in on cni0 && sudo ufw allow out on cni0
sudo ufw default allow routed
- At the end do `sudo microk8s kubectl config view --raw > $HOME/.kube/config`. This way, the python client will find the kubernetes configuration
# Might be needed for tests to run
- in venv : pip install -e .
Check swagger for documentation of implemented endpoints.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment