A running Kubernetes cluster is required.
Istio should be installed in your cluster.
kubectl apply -R -f ./k8s/serverfulexport NAMESPACE="lise-serverful" RELEASE_NAME="mercury" NODE_IP="192.168.1.221" GATEWAY_NODE_PORT=31380helm init --service-account tiller --history-max 200 --tiller-namespace $NAMESPACEkubectl label namespace $NAMESPACE istio-injection=enabledhelm charts/lise-serverful --tiller-namespace $NAMESPACE --namespace $NAMESPACE --name $RELEASE_NAME --dep-up
Then you can test the release by running the following command:
curl -v -d '{"name":"usb key", "quantity":3, "unitPrice": 5}' \
-H "Content-Type: application/json" \
-X POST "http://$NODE_IP:$GATEWAY_NODE_PORT/orders"OpenFaas should be installed in your cluster.
kubectl apply -R -f ./k8s/serverlessexport NODE_IP="192.168.1.221" GATEWAY_NODE_PORT=31112 OF_NAMESPACE=openfaas RELEASE=mercuryhelm init --tiller-namespace $OF_NAMESPACE --service-account tillerhelm install ./charts/lise-serverless --dep-up --name $RELEASE --namespace $OF_NAMESPACE --tiller-namespace $OF_NAMESPACEfaas-cli up -f ./src/serverless/stack.yaml
You can test the release by running the following command:
helm test $RELEASE --tiller-namespace $OF_NAMESPACE --cleanup --parallelYou can also test the functions:
curl -v -d '{"name":"usb key", "quantity":3, "unitPrice": 5}' \
-H "Content-Type: application/json" \
-X POST "http://$NODE_IP:$GATEWAY_NODE_PORT/function/order"You can see the two functions been triggered on the gateway ui: http://$NODE_IP:$GATEWAY_NODE_PORT/ui
The payment function has been triggered by a message sended at the kafka topic orders by the order function.
- Setup Helm authentication context
- Setup TLS
- Circuit Breaking
- Fault Injection
- Security Policies (rate limit...)
- Autoscaling
- Metrics, logs, tracing visualization
- Monitoring: set up Prometheus and Grafana
- Logging: set up Loki with OpenFaas
- CRUD example
- Enable automatic sidecar injections:
kubectl label namespace $NAMESPACE istio-injection=enabled - Deploy without a sidecar:
... spec.template.metadata.annotations."sidecar\.istio\.io/inject"="false" - Read Kafka messages:
/opt/bitnami/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic $TOPIC --from-beginningin the kafka pod