From 4ea6d7cae6f069aa926c2b474946fc13db976f55 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 26 Apr 2019 12:33:09 +0300 Subject: [PATCH] Add SuperGloo install docs --- README.md | 23 +-- docs/gitbook/SUMMARY.md | 1 + .../install/flagger-install-with-supergloo.md | 135 ++++++++++++++++++ 3 files changed, 148 insertions(+), 11 deletions(-) create mode 100644 docs/gitbook/install/flagger-install-with-supergloo.md diff --git a/README.md b/README.md index c25e5866a..fd036842a 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Flagger documentation can be found at [docs.flagger.app](https://docs.flagger.ap * [Flagger install on Kubernetes](https://docs.flagger.app/install/flagger-install-on-kubernetes) * [Flagger install on GKE Istio](https://docs.flagger.app/install/flagger-install-on-google-cloud) * [Flagger install on EKS App Mesh](https://docs.flagger.app/install/flagger-install-on-eks-appmesh) + * [Flagger install with SuperGloo](https://docs.flagger.app/install/flagger-install-with-supergloo) * How it works * [Canary custom resource](https://docs.flagger.app/how-it-works#canary-custom-resource) * [Routing](https://docs.flagger.app/how-it-works#istio-routing) @@ -152,20 +153,20 @@ For more details on how the canary analysis and promotion works please [read the ## Features -| Feature | Istio | App Mesh | -| -------------------------------------------- | ------------------ | ------------------ | -| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | -| A/B testing (headers and cookies filters) | :heavy_check_mark: | :heavy_minus_sign: | -| Load testing | :heavy_check_mark: | :heavy_check_mark: | -| Webhooks (custom acceptance tests) | :heavy_check_mark: | :heavy_check_mark: | -| Request success rate check (Envoy metric) | :heavy_check_mark: | :heavy_check_mark: | -| Request duration check (Envoy metric) | :heavy_check_mark: | :heavy_minus_sign: | -| Custom promql checks | :heavy_check_mark: | :heavy_check_mark: | -| Ingress gateway (CORS, retries and timeouts) | :heavy_check_mark: | :heavy_minus_sign: | +| Feature | Istio | App Mesh | SuperGloo | +| -------------------------------------------- | ------------------ | ------------------ |------------------ | +| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| A/B testing (headers and cookies filters) | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | +| Load testing | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Webhooks (custom acceptance tests) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Request success rate check (Envoy metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Request duration check (Envoy metric) | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | +| Custom promql checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Ingress gateway (CORS, retries and timeouts) | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | ## Roadmap -* Integrate with other service mesh technologies like Linkerd v2, Super Gloo or Consul Mesh +* Integrate with other service mesh technologies like Linkerd v2 * Add support for comparing the canary metrics to the primary ones and do the validation based on the derivation between the two ## Contributing diff --git a/docs/gitbook/SUMMARY.md b/docs/gitbook/SUMMARY.md index 4ce8974e6..ad8721c1e 100644 --- a/docs/gitbook/SUMMARY.md +++ b/docs/gitbook/SUMMARY.md @@ -8,6 +8,7 @@ * [Flagger Install on Kubernetes](install/flagger-install-on-kubernetes.md) * [Flagger Install on GKE Istio](install/flagger-install-on-google-cloud.md) * [Flagger Install on EKS App Mesh](install/flagger-install-on-eks-appmesh.md) +* [Flagger Install with SuperGloo](install/flagger-install-with-supergloo.md) ## Usage diff --git a/docs/gitbook/install/flagger-install-with-supergloo.md b/docs/gitbook/install/flagger-install-with-supergloo.md new file mode 100644 index 000000000..c0c7e1d75 --- /dev/null +++ b/docs/gitbook/install/flagger-install-with-supergloo.md @@ -0,0 +1,135 @@ +# Flagger install on Kubernetes with SuperGloo + +This guide walks you through setting up Flagger on a Kubernetes cluster using [SuperGloo](https://github.com/solo-io/supergloo). + +SuperGloo by [Solo.io](https://solo.io) is an opinionated abstraction layer that will simplify the installation, management, and operation of your service mesh. +It supports running multiple ingress with multiple mesh (Istio, App Mesh, Consul Connect and Linkerd 2) in the same cluster. + +### Prerequisites + +Flagger requires a Kubernetes cluster **v1.11** or newer with the following admission controllers enabled: + +* MutatingAdmissionWebhook +* ValidatingAdmissionWebhook + +### Install Istio with SuperGloo + +Download SuperGloo CLI and add it to your path: + +```bash +curl -sL https://run.solo.io/supergloo/install | sh +export PATH=$HOME/.supergloo/bin:$PATH +``` + +Deploy the SuperGloo controller in the `supergloo-system` namespace: + +```bash +supergloo init +``` + +Create the `istio-system` namespace and install Istio with traffic management, telemetry and Prometheus enabled: + +```bash +ISTIO_VER="1.0.6" + +kubectl create ns istio-system + +supergloo install istio --name istio \ +--namespace=supergloo-system \ +--auto-inject=true \ +--installation-namespace=istio-system \ +--mtls=false \ +--prometheus=true \ +--version ${ISTIO_VER} +``` + +Create a cluster role binding so that Flagger can manipulate SuperGloo custom resources: + +```bash +kubectl create clusterrolebinding flagger-supergloo \ +--clusterrole=mesh-discovery \ +--serviceaccount=istio-system:flagger +``` + +Wait for the Istio control plane to become available: + +```bash +kubectl -n istio-system rollout status deployment/istio-sidecar-injector +kubectl -n istio-system rollout status deployment/prometheus +``` + +### Install Flagger + +Add Flagger Helm repository: + +```bash +helm repo add flagger https://flagger.app +``` + +Deploy Flagger in the _**istio-system**_ namespace and set the service mesh provider to SuperGloo: + +```bash +helm upgrade -i flagger flagger/flagger \ +--namespace=istio-system \ +--set metricsServer=http://prometheus.istio-system:9090 \ +--set meshProvider=supergloo:istio.supergloo-system +``` + +When using SuperGloo the mesh provider format is `supergloo:.`. + +Optionally you can enable **Slack** notifications: + +```bash +helm upgrade -i flagger flagger/flagger \ +--reuse-values \ +--namespace=istio-system \ +--set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ +--set slack.channel=general \ +--set slack.user=flagger +``` + +### Install Grafana + +Flagger comes with a Grafana dashboard made for monitoring the canary analysis. + +Deploy Grafana in the _**istio-system**_ namespace: + +```bash +helm upgrade -i flagger-grafana flagger/grafana \ +--namespace=istio-system \ +--set url=http://prometheus.istio-system:9090 +``` + +You can access Grafana using port forwarding: + +```bash +kubectl -n istio-system port-forward svc/flagger-grafana 3000:80 +``` + +### Install Load Tester + +Flagger comes with an optional load testing service that generates traffic +during canary analysis when configured as a webhook. + +Deploy the load test runner with Helm: + +```bash +helm upgrade -i flagger-loadtester flagger/loadtester \ +--namespace=test \ +--set cmd.timeout=1h +``` + +Deploy with kubectl: + +```bash +helm fetch --untar --untardir . flagger/loadtester && +helm template loadtester \ +--name flagger-loadtester \ +--namespace=test +> $HOME/flagger-loadtester.yaml + +# apply +kubectl apply -f $HOME/flagger-loadtester.yaml +``` + +> **Note** that the load tester should be deployed in a namespace with Istio sidecar injection enabled.