-
Notifications
You must be signed in to change notification settings - Fork 1
Local setup
The local setup encompasses a single syncmesh node with the corresponding MongoDB instance and listener. It is mostly used for faster-debugging purposes.
You need the following CLIs and packages installed:
After setting up, just run the script minikube_node_setup.sh
inside local_setup_scripts
in your CLI. This deploys a minikube node and the corresponding namespace with the MongoDB instance included. The namespace for the latter is openfaas-fn
, same for your functions.
After the instance is running, use the functions_deployer.sh
script to deploy your syncmesh function inside the local instance.
Finally, you can access both the dashboard and your function by port forwarding the OpenFaaS gateway:
kubectl port-forward svc/gateway -n openfaas 8080:8080
You can also use an app like kube-forwarder if you like doing it inside an external application more.
Similarly, do the same with the mongoDB instance if you have a listener:
kubectl port-forward openfaas-db-mongodb-0 -n openfaas-fn 27017:27017
If you don't remember how to get the password for the OpenFaaS admin UI on localhost:8080, use the script get_openfaas_password.sh
The listener is a standalone component, that can be deployed by just running go build
on the listener.go
file inside mongo_event_listener
.
minikube stop
stops your instance, the listener can be stopped using go.