This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Added example for manual testing (#81)
* docs: Added example for manual testing Signed-off-by: Christian Kreuzberger <[email protected]> * fix typos from review Signed-off-by: Christian Kreuzberger <[email protected]>
- Loading branch information
1 parent
636d0b0
commit 882fa6f
Showing
5 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# How to manually test unleash-service | ||
|
||
1. Install and configure Unleash (out of scope here) | ||
2. Install unleash-service (see [Installation instructions](../README.md#Installation)) | ||
3. Create Kubernetes secret for unleash-service to connect to Unleash: `kubectl -n keptn create secret generic unleash --from-literal="UNLEASH_SERVER_URL=http://unleash.unleash-dev/api" --from-literal="UNLEASH_USER=keptn" --from-literal="UNLEASH_TOKEN=keptn"` | ||
4. Create your Keptn project with a stage `production` and a sequence `remediation`: `keptn create project sockshop --shipyard=shipyard.yaml` | ||
5. Create a service: `keptn create service carts --project sockshop` | ||
6. Add remediation.yaml to your project: `keptn add-resource --project sockshop --service carts --stage production --resource remediation.yaml --resourceUri remediation.yaml` | ||
7. Trigger remediation using CLI: `keptn send event -f remediation-triggered.json` | ||
8. Watch :) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"type": "sh.keptn.event.production.remediation.triggered", | ||
"specversion": "1.0", | ||
"source": "https:\/\/github.com\/keptn-contrib\/prometheus-service", | ||
"id": "f2b878d3-03c0-4e8f-bc3f-454bc1b3d79d", | ||
"time": "2019-06-07T07:02:15.64489Z", | ||
"contenttype": "application\/json", | ||
"data": { | ||
"project": "sockshop", | ||
"stage": "production", | ||
"service": "carts", | ||
"problem": { | ||
"problemTitle": "failure_rate_increase", | ||
"rootCause": "Failure rate increase" | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: spec.keptn.sh/0.1.4 | ||
kind: Remediation | ||
metadata: | ||
name: carts-remediation | ||
spec: | ||
remediations: | ||
- problemType: Failure rate increase | ||
actionsOnOpen: | ||
- action: toggle-feature | ||
name: Toogle feature flag | ||
description: Toogle feature flag EnablePromotion to OFF | ||
value: | ||
EnablePromotion: "off" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: "spec.keptn.sh/0.2.2" | ||
kind: "Shipyard" | ||
metadata: | ||
name: "shipyard-sockshop" | ||
spec: | ||
stages: | ||
- name: "production" | ||
sequences: | ||
- name: "remediation" | ||
triggeredOn: | ||
- event: "production.remediation.finished" | ||
selector: | ||
match: | ||
evaluation.result: "fail" | ||
tasks: | ||
- name: "get-action" | ||
- name: "action" | ||
- name: "evaluation" | ||
triggeredAfter: "3m" | ||
properties: | ||
timeframe: "3m" |