From 7c166e2b403bad6e19fb8e91981add59b892bf29 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sat, 2 Feb 2019 02:20:02 +0200 Subject: [PATCH] Restructure the install docs --- docs/gitbook/SUMMARY.md | 7 +- docs/gitbook/how-it-works.md | 8 +- .../install/flagger-install-on-kubernetes.md | 122 ++++++++++++++++++ docs/gitbook/install/install-flagger.md | 75 ----------- docs/gitbook/install/install-grafana.md | 48 ------- 5 files changed, 130 insertions(+), 130 deletions(-) create mode 100644 docs/gitbook/install/flagger-install-on-kubernetes.md delete mode 100644 docs/gitbook/install/install-flagger.md delete mode 100644 docs/gitbook/install/install-grafana.md diff --git a/docs/gitbook/SUMMARY.md b/docs/gitbook/SUMMARY.md index d2d1b664..ee7dce00 100644 --- a/docs/gitbook/SUMMARY.md +++ b/docs/gitbook/SUMMARY.md @@ -5,9 +5,8 @@ ## Install -* [Install Flagger](install/install-flagger.md) -* [Install Grafana](install/install-grafana.md) -* [Install Istio](install/install-istio.md) +* [Flagger Install on Kubernetes](install/flagger-install-on-kubernetes.md) +* [Flagger Install on Google Cloud](install/flagger-install-on-google-cloud.md) ## Usage @@ -15,3 +14,5 @@ * [Monitoring](usage/monitoring.md) * [Alerting](usage/alerting.md) + + diff --git a/docs/gitbook/how-it-works.md b/docs/gitbook/how-it-works.md index 02123a36..97faec2b 100644 --- a/docs/gitbook/how-it-works.md +++ b/docs/gitbook/how-it-works.md @@ -252,14 +252,14 @@ Spec: ```yaml canaryAnalysis: webhooks: - - name: integration-tests - url: http://podinfo.test:9898/echo + - name: integration-test + url: http://int-runner.test:8080/ timeout: 30s metadata: test: "all" token: "16688eb5e9f289f1991c" - - name: load-tests - url: http://podinfo.test:9898/echo + - name: db-test + url: http://migration-check.db/query timeout: 30s metadata: key1: "val1" diff --git a/docs/gitbook/install/flagger-install-on-kubernetes.md b/docs/gitbook/install/flagger-install-on-kubernetes.md new file mode 100644 index 00000000..855b1ff5 --- /dev/null +++ b/docs/gitbook/install/flagger-install-on-kubernetes.md @@ -0,0 +1,122 @@ +# Flagger install on Kubernetes + +This guide walks you through setting up Flagger on a Kubernetes cluster. + +### Prerequisites + +Flagger requires a Kubernetes cluster v1.11 or newer with the +MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controllers enabled. + +Flagger depends on Istio v1.0.3 or newer configured with the following components: + +* istio-citadel +* istio-ingressgateway +* istio-pilot +* istio-policy +* istio-sidecar-injector +* istio-telemetry +* prometheus + +To install and configure Istio you can follow the instructions on +[istio.io](https://istio.io/docs/setup/kubernetes/quick-start/). + +### Install Flagger + +Add Flagger Helm repository: + +```bash +helm repo add flagger https://flagger.app +``` + +Deploy Flagger in the _**istio-system**_ namespace: + +```bash +helm upgrade -i flagger flagger/flagger \ +--namespace=istio-system \ +--set metricsServer=http://prometheus.istio-system:9090 +``` + +Enable **Slack** notifications: + +```bash +helm upgrade -i flagger flagger/flagger \ +--namespace=istio-system \ +--set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ +--set slack.channel=general \ +--set slack.user=flagger +``` + +If you don't have Tiller you can use the helm template command and apply the generated yaml with kubectl: + +```bash +# generate +helm template flagger/flagger \ +--name flagger \ +--namespace=istio-system \ +--set metricsServer=http://prometheus.istio-system:9090 \ +> $HOME/flagger.yaml + +# apply +kubectl apply -f $HOME/flagger.yaml +``` + +### 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:9090 \ +--set user=admin \ +--set password=admin +``` + +Or use helm template command and apply the generated yaml with kubectl: + +```bash +# generate +helm template flagger/grafana \ +--name flagger-grafana \ +--namespace=istio-system \ +--set user=admin \ +--set password=admin \ +> $HOME/flagger-grafana.yaml + +# apply +kubectl apply -f $HOME/flagger-grafana.yaml +``` + +You access Grafana using port forwarding: + +```bash +kubectl -n istio-system port-forward svc/flagger-grafana 3000:3000 +``` + +### Uninstall Flagger and Grafana + +To uninstall the Flagger release with Helm run: + +```text +helm delete --purge flagger +``` + +> **Note** that on uninstall the Canary CRD will not be removed. +Deleting the CRD will make Kubernetes remove all the objects owned by Flagger like Istio virtual services, +Kubernetes deployments and ClusterIP services. + +If you want to remove all the objects created by Flagger you have delete the Canary CRD with kubectl: + +```text +kubectl delete crd canaries.flagger.app +``` + +To uninstall the Grafana release with Helm run: + +```text +helm delete --purge flagger-grafana +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. diff --git a/docs/gitbook/install/install-flagger.md b/docs/gitbook/install/install-flagger.md deleted file mode 100644 index fd85d34d..00000000 --- a/docs/gitbook/install/install-flagger.md +++ /dev/null @@ -1,75 +0,0 @@ -# Install Flagger - -Before installing Flagger make sure you have [Istio](https://istio.io) running with Prometheus enabled. -If you are new to Istio you can follow this GKE guide -[Istio service mesh walk-through](https://docs.flagger.app/install/install-istio). - -**Prerequisites** - -* Kubernetes >= 1.11 -* Istio >= 1.0 -* Prometheus >= 2.6 - -### Install with Helm and Tiller - -Add Flagger Helm repository: - -```bash -helm repo add flagger https://flagger.app -``` - -Deploy Flagger in the _**istio-system**_ namespace: - -```bash -helm upgrade -i flagger flagger/flagger \ ---namespace=istio-system \ ---set metricsServer=http://prometheus.istio-system:9090 -``` - -Enable **Slack** notifications: - -```bash -helm upgrade -i flagger flagger/flagger \ ---namespace=istio-system \ ---set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ ---set slack.channel=general \ ---set slack.user=flagger -``` - -### Install with kubectl - -If you don't have Tiller you can use the helm template command and apply the generated yaml with kubectl: - -```bash -# generate -helm template flagger/flagger \ ---name flagger \ ---namespace=istio-system \ ---set metricsServer=http://prometheus.istio-system:9090 \ ---set controlLoopInterval=1m > $HOME/flagger.yaml - -# apply -kubectl apply -f $HOME/flagger.yaml -``` - -### Uninstall - -To uninstall/delete the flagger release with Helm run: - -```text -helm delete --purge flagger -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -> **Note** that on uninstall the Canary CRD will not be removed. -Deleting the CRD will make Kubernetes remove all the objects owned by Flagger like Istio virtual services, -Kubernetes deployments and ClusterIP services. - - -If you want to remove all the objects created by Flagger you have delete the Canary CRD with kubectl: - -```text -kubectl delete crd canaries.flagger.app -``` - diff --git a/docs/gitbook/install/install-grafana.md b/docs/gitbook/install/install-grafana.md deleted file mode 100644 index 9fc9a69b..00000000 --- a/docs/gitbook/install/install-grafana.md +++ /dev/null @@ -1,48 +0,0 @@ -# Install Grafana - -Flagger comes with a Grafana dashboard made for monitoring the canary analysis. - -### Install with Helm and Tiller - -Add Flagger Helm repository: - -```bash -helm repo add flagger https://flagger.app -``` - -Deploy Grafana in the _**istio-system**_ namespace: - -```bash -helm upgrade -i flagger-grafana flagger/grafana \ ---namespace=istio-system \ ---set url=http://prometheus:9090 \ ---set user=admin \ ---set password=admin -``` - -### Install with kubectl - -If you don't have Tiller you can use the helm template command and apply the generated yaml with kubectl: - -```bash -# generate -helm template flagger/grafana \ ---name flagger-grafana \ ---namespace=istio-system \ ---set user=admin \ ---set password=admin > $HOME/flagger-grafana.yaml - -# apply -kubectl apply -f $HOME/flagger-grafana.yaml -``` - -### Uninstall - -To uninstall/delete the Grafana release with Helm run: - -```text -helm delete --purge flagger-grafana -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. -