Last active
March 22, 2018 19:34
-
-
Save juanbrny/9fffcf989dc8feb0ae99993202d16cb1 to your computer and use it in GitHub Desktop.
OpenFaaS demo on CaaSP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPENFAAS DEMO | |
----------------------------------------------------- | |
** Mostramos todos los charts disponibles en Kubernetes | |
git clone https://github.com/openfaas/faas-netes | |
cd faas-netes/ | |
** Creamos namespaces especificos | |
kubectl create ns openfaas | |
kubectl create ns openfaas-fn | |
[helm delete --purge openfaas] | |
helm upgrade --install --debug --reset-values --set async=false --set rbac=false openfaas openfaas/ --namespace openfaas --set functionNamespace=openfaas-fn | |
** Obtenemos IP de cluster | |
kubectl describe pod gateway --namespace openfaas | grep Node: | |
** OpenFaaS Dashboard | |
http://192.168.64.7:31112/ui/ | |
** OpenFaaS Metrics | |
http://192.168.64.7:31119 | |
** Deploy some functions | |
//Listado de pods para cada funcion | |
kubectl get pods --namespace=openfaas-fn | |
** Ver ratios de peticiones | |
rate(gateway_function_invocation_total[20s]) | |
** Escalado en base a peticiones | |
while true ; do curl -4 192.168.64.7:31112/function/nodeinfo -d "" ; done | |
//Ver pods en linea comando y dashboard | |
kubectl get pods --namespace=openfaas-fn | |
** Faas client | |
faas-cli new --list | |
faas-cli template pull | |
faas-cli new ExpertDays --lang Dockerfile | |
Edit Dockerfile and insert: FROM suse/sles12:latest :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment