Mu is a serverless faas platform based on the Fn project
This chart deploys a fully functioning instance of Mu on a Kubernetes cluster using the Helm 3 package manager.
Helmsman is a superset of helm with the following benefits
- Multi namespace deployment
- Resume from failure - just run it again
- Deployment ordering - pick the order
- Parametrizable values.yaml
- Automation - no more manual deployments (ie. operators)
- Ease & Automation - this one should be first
Before installing Mu, you'll need:
- A computer running Linux or MacOS.
- A k8s cluster preferably with persistent volume provisioning support.
- Helmsman and indirectly the Helm 3 package manager, installed locally.
To setup a local development environment, start minikube as follows:
# please alter configuration to your likings
$ minikube start --vm-driver=hyperkit --memory=6144 --cpus=4 --disk-size=50g
$ minikube addons enable ingress
# building functions locally requires docker. Let's leverage minikube's internal dockerd
$ eval $(minikube docker-env)
Please take the time to review the default settings in mu/values.yaml
Mu persists function's metadata in MySQL. This is configured using the MySQL Helm Chart.
By default this uses container storage. If required, you may configure a persistent volume by setting the mysql.* values in the chart values to that which corresponds to your storage requirements.
$ helm repo add leanmu 'https://raw.githubusercontent.com/lean-mu/mu-helm/master/'
$ helm repo update
$ helm install --create-namespace -n mu mu leanmu/muDeployment is performed as a background task. We strongly recommend to use k9s to check on status. It is much simplier than the cli and allows to quickly browser though deployments, events and logs.
You should now have a live instance of mu deployed on the cluster. Accessing the instance requires to define its ingress in the DNS.
Get the ingres ip using the command below, and make it match the ingres' fn.mu.local defined in values.yaml
$ kubectl get ingress mu-ingress-controller -o jsonpath="{.status.loadBalancer.ingress[0].ip}"You are done! Using a browser, open a browser to http//fn.mu.local and the Mu user interface should show.
When properly configured, the following URLs are available
UI endpoint - http://fn.mu.local/ui
API endpoint - http://fn.mu.local/api
FN invocation endpoint - http://fn.mu.local/
FLOW endpoint - http://fn.mu.local/flow
monitoring endpoint - http://fn.mu.local/grafana
Note: Those endpoints can be fully configured by adjusting the chart, for instance you could setup virtual hosts rather than context paths
At this point, and since mu is built on project fn, it is a good idea to install the fn client.
$ brew install fn
# Then set you context to your instance
$ fn create context mu --api-url http://fn.mu.local/api --registry <YOURREGISTRY>
Successfully created context: mu
# set the default context
$ fn use ctx mu
Now using context: mu
# run a quick test to check cluster connectivity
$ fn version
Client version is latest version: 0.6.7
Server version: 0.3.749Further reading about functions development can be found in the Getting Started guides or the chart notes.
- Fn: 1234567890
- grafana: admin/admin
helm delete muThe command removes all the Kubernetes components associated with the chart and deletes the release.
Note: Please make sure to run the command from the correct namespace