-
db-inserter
Reads an MQTT message and inserts it into a Postgres table
The following connects the function to the MQTT topic via the Emitter broker:
annotations: topic: "drone-position/"
-
db-reader
Reads positions of the drones ingested so far
-
render-map
Static webpage that renders mapbox locations using the
db-reader
endpoint
-
You will need to create a secret for Postgres with the login information:
export USER="postgres" export PASS="" export HOST="postgresql.default.svc.cluster.local" kubectl create secret generic -n openfaas-fn db \ --from-literal db-username="$USER" \ --from-literal db-password="$PASS" \ --from-literal db-host="$HOST"
-
Deploy the stack
cd openfaas/services faas-cli deploy
Use
--filter NAME
to deploy only one function at a time -
Rebuild the stack if you want
Use an environment variable to specify your own Docker Hub Account as per the docs
export DOCKER_USER="some-user" faas-cli up