Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #38 from carlossg/flagger
Browse files Browse the repository at this point in the history
Add flagger demo instructions
  • Loading branch information
carlossg-bot authored Feb 1, 2019
2 parents bb738b1 + 4bd5154 commit 1bf1cd2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
6 changes: 3 additions & 3 deletions charts/croc-hunter-jenkinsx/templates/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
- croc-hunter.istio.eu.g.csanchez.org
canaryAnalysis:
# schedule interval (default 60s)
interval: 15s
interval: 30s
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
Expand All @@ -44,10 +44,10 @@ spec:
# minimum req success rate (non 5xx responses)
# percentage (0-100)
threshold: 99
interval: 30s
interval: 60s
- name: istio_request_duration_seconds_bucket
# maximum req duration P99
# milliseconds
threshold: 500
interval: 30s
interval: 60s
{{- end }}
29 changes: 29 additions & 0 deletions flagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,32 @@ Go to the `canary-analysis` dashboard and select
* namespace: `jx-production`
* primary: `jx-production-croc-hunter-jenkinsx-primary`
* canary: `jx-production-croc-hunter-jenkinsx`

to see the roll out metrics.

# Prometheus Metrics

kubectl --namespace istio-system port-forward deploy/prometheus 9090

# Demo

Promote to production

jx promote croc-hunter-jenkinsx --env production --version 0.0.xxx

Tail the flagger logs

kail -d flagger --since=5m

Generate traffic to show the version served

while true; do
out=$(curl -sSL -w "%{http_code}" http://croc-hunter.istio.us.g.csanchez.org/)
date="$(date +%R:%S)"; echo -n $date
echo -n "$out" | tail -n 1 ; echo -n "-" ; echo "$out" | grep Release | grep -o '\d*\.\d*\.\d*'
done

Generate delays and errors to show automatic rollbacks

watch curl -sSL http://croc-hunter.istio.us.g.csanchez.org/delay?wait=5
watch curl -sSL http://croc-hunter.istio.us.g.csanchez.org/status?code=500
6 changes: 3 additions & 3 deletions flagger/croc-hunter-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
- croc-hunter.istio.eu.g.csanchez.org
canaryAnalysis:
# schedule interval (default 60s)
interval: 15s
interval: 30s
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
Expand All @@ -44,9 +44,9 @@ spec:
# minimum req success rate (non 5xx responses)
# percentage (0-100)
threshold: 99
interval: 30s
interval: 60s
- name: istio_request_duration_seconds_bucket
# maximum req duration P99
# milliseconds
threshold: 500
interval: 30s
interval: 60s

0 comments on commit 1bf1cd2

Please sign in to comment.