Funded by the EU.
This component is responsible for connecting the FaaS service to the rest of the workflow. It receives a kafka message, sends the appropriate HTTP requests to the FaaS service, aggregates the responses and sends a kafka message to the output topic. In the case of Jupyter-FaaS, it also sends the executed notebooks to CFS.
Because the latest versions of eo4eu custom libraries are not public, you will need a gitlab access token with at least the read registry permission. You should overwrite the file faas-proxy/build/tests/local/scripts/.env.sh with your own credentials (or, preferrably, add the credentials to your own GNU pass database).
git clone https://git.apps.eo4eu.eu/eo4eu/eo4eu-openfaas-operations/faas-proxy
cd faas-proxy/tests/localThen, edit scripts/.env.sh. To setup the virtual environments and extra scripts, run
source scripts/initial-setup.shTo update the libraries for the python version of the proxy, run
source scripts/update-python.shTo setup the environment for running the python version of the proxy, run
source scripts/launch-python.shFor the jupyter version of the proxy, do
source scripts/update-jupyter.sh
source scripts/launch-jupyter.shThese scripts also require secrets that you will have to provide yourself. They are all the references to pass in the scripts launch-python.sh and launch-jupyter.sh. After you have done so, you are ready to run the tests.
You must source the appropriate launch-*.sh script every time you open a new terminal in this location.
cd faas-proxy/tests/local
source scripts/launch-python.sh
python3 -m faas_proxy.mock_app -f data/input.jsonYou will have to edit the appropriate faas-proxy/tests/local/scripts/launch-*.sh and source it again in order to change any of the running parameters. Make sure you have the required S3 credentials. You can make the tests use any input metainfo you like by simply changing the -f flag in the faas_proxy.mock_app command.
