Skip to content

Commit

Permalink
updating to latest keptn version + latest dt env variable names
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Grabner <[email protected]>
  • Loading branch information
grabnerandi committed Feb 25, 2022
1 parent b007c27 commit 8aa4cbe
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cloudautomation/INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ As shown by the instructor simply walk through the *Add new SLO* wizard in Dynat
| Metrics Expression | `(100)*(calc:service.tenant.responsetime.count.faster500ms:splitBy())/(builtin:service.requestCount.server:splitBy())` |
| Name of SLO | `Performance SLO of xxxx` |
| Description | `% of requests handled by xxxx service faster than 500ms` |
| Entity Selector | `mzName("Tenant: tnt-xxxx-svc"),type("SERVICE"),tag("[Environment]DT_APPLICATION_ENVIRONMENT:production")` |
| Entity Selector | `mzName("Tenant: tnt-xxxx-svc"),type("SERVICE"),tag("[Environment]DT_RELEASE_STAGE:production")` |
| Timeframe | `-1w` |

### Step 3 - Create SLO Dashboard
Expand Down
2 changes: 1 addition & 1 deletion cloudautomation/monaco/projects/lab1/slo/slo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ performanceSlo:
- name: "Performance SLO of {{ .Env.TENANT_ID }}"
- description: "% of requests handled by {{ .Env.TENANT_ID }} service faster than 500ms"
- expression: "(100)*(calc:service.tenant.responsetime.count.faster500ms:splitBy())/(builtin:service.requestCount.server:splitBy())"
- filter: "mzName(\\\"Tenant: tnt-{{ .Env.TENANT_ID }}-svc\\\"),type(\\\"SERVICE\\\"),tag(\\\"[Environment]DT_APPLICATION_ENVIRONMENT:production\\\")"
- filter: "mzName(\\\"Tenant: tnt-{{ .Env.TENANT_ID }}-svc\\\"),type(\\\"SERVICE\\\"),tag(\\\"[Environment]DT_RELEASE_STAGE:production\\\")"
- target: "85.00"
- warning: "90.00"
- timeframe: "-1d"
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"comparison": "EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_NAME",
"key": "DT_RELEASE_PRODUCT",
"value": "delivery-demo"
},
"values": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"comparison": "TAG_KEY_EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_RELEASE_VERSION"
"key": "DT_RELEASE_VERSION"
},
"values": null,
"negate": false
Expand All @@ -31,7 +31,7 @@
"comparison": "EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_NAME",
"key": "DT_RELEASE_PRODUCT",
"value": "delivery-demo"
},
"values": null,
Expand Down
10 changes: 8 additions & 2 deletions install-keptn-on-k3s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eu

# Keptn Version Information
KEPTNVERSION=${KEPTNVERSION:-0.12.0}
KEPTNVERSION=${KEPTNVERSION:-0.13.1}
KEPTN_TYPE="controlplane"
KEPTN_DELIVERYPLANE=false
KEPTN_EXECUTIONPLANE=false
Expand Down Expand Up @@ -37,7 +37,7 @@ KEPTN_EXECUTION_PLANE_PROJECT_FILTER=${KEPTN_EXECUTION_PLANE_PROJECT_FILTER:-""}

# PROM_SERVICE_VERSION="release-0.6.1"
# # PROM_SLI_SERVICE_VERSION="release-0.3.0" <<-- has been merged with the prometheus service
DT_SERVICE_VERSION="0.20.0"
DT_SERVICE_VERSION="0.21.0"
# DT_SLI_SERVICE_VERSION="release-0.12.0" <<-- has been merged with dynatrace-service!
GENERICEXEC_SERVICE_VERSION="release-0.8.4"
MONACO_SERVICE_VERSION="release-0.9.1" # migratetokeptn08
Expand Down Expand Up @@ -908,6 +908,9 @@ function install_demo_cloudautomation {
KEPTN_EXECUTION_PLANE_INGRESS_DOMAIN=${KEPTN_DOMAIN:-none}
fi

export KEPTN_ENDPOINT="${PREFIX}://${KEPTN_DOMAIN}"
export KEPTN_INGRESS=${FQDN}

# export those variables as we call another script
export KEPTN_CONTROL_PLANE_DOMAIN="${KEPTN_CONTROL_PLANE_DOMAIN}"
export KEPTN_CONTROL_PLANE_API_TOKEN="${KEPTN_CONTROL_PLANE_API_TOKEN}"
Expand All @@ -919,6 +922,9 @@ function install_demo_cloudautomation {
./install-cloudautomation-workshop.sh ./cloudautomation/scripts/tenants.stockssample_2.sh
cd ${currentDir}

# Also install the Argo Rollout example
./create-keptn-project-from-template.sh delivery-rollout ${OWNER_EMAIL} ${KEPTN_ROLLOUT_PROJECT}

# now trigger the delivery of the devops tools
keptn trigger delivery --project=devopstools --service=keptnwebservice --image=grabnerandi/keptnwebservice:2.0.1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ attachRules:
key: "app.kubernetes.io/name"
value: $SERVICE
- context: ENVIRONMENT
key: DT_APPLICATION_ENVIRONMENT
key: DT_RELEASE_STAGE
value: $STAGE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"comparison": "EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_NAME",
"key": "DT_RELEASE_PRODUCT",
"value": "delivery-demo"
},
"values": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"comparison": "TAG_KEY_EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_RELEASE_VERSION"
"key": "DT_RELEASE_VERSION"
},
"values": null,
"negate": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"operator": "EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_NAME",
"key": "DT_RELEASE_PRODUCT",
"value": "{{ .project }}"
},
"negate": false
Expand All @@ -33,7 +33,7 @@
"operator": "EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_ENVIRONMENT",
"key": "DT_RELEASE_STAGE",
"value": "{{ .stage }}"
},
"negate": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spec_version: '1.0'
indicators:
throughput: metricSelector=builtin:service.requestCount.total:merge("dt.entity.service"):sum&entitySelector=type(SERVICE),tag([Environment]DT_APPLICATION_ENVIRONMENT:$STAGE),tag([Kubernetes]app:$SERVICE)
error_rate: metricSelector=builtin:service.errors.total.rate:merge("dt.entity.service"):avg&entitySelector=type(SERVICE),tag([Environment]DT_APPLICATION_ENVIRONMENT:$STAGE),tag([Kubernetes]app:$SERVICE)
response_time_p50: metricSelector=builtin:service.response.time:merge("dt.entity.service"):percentile(50)&entitySelector=type(SERVICE),tag([Environment]DT_APPLICATION_ENVIRONMENT:$STAGE),tag([Kubernetes]app:$SERVICE)
response_time_p90: metricSelector=builtin:service.response.time:merge("dt.entity.service"):percentile(90)&entitySelector=type(SERVICE),tag([Environment]DT_APPLICATION_ENVIRONMENT:$STAGE),tag([Kubernetes]app:$SERVICE)
response_time_p95: metricSelector=builtin:service.response.time:merge("dt.entity.service"):percentile(95)&entitySelector=type(SERVICE),tag([Environment]DT_APPLICATION_ENVIRONMENT:$STAGE),tag([Kubernetes]app:$SERVICE)
throughput: metricSelector=builtin:service.requestCount.total:merge("dt.entity.service"):sum&entitySelector=type(SERVICE),tag([Environment]DT_RELEASE_STAGE:$STAGE),tag([Kubernetes]app:$SERVICE)
error_rate: metricSelector=builtin:service.errors.total.rate:merge("dt.entity.service"):avg&entitySelector=type(SERVICE),tag([Environment]DT_RELEASE_STAGE:$STAGE),tag([Kubernetes]app:$SERVICE)
response_time_p50: metricSelector=builtin:service.response.time:merge("dt.entity.service"):percentile(50)&entitySelector=type(SERVICE),tag([Environment]DT_RELEASE_STAGE:$STAGE),tag([Kubernetes]app:$SERVICE)
response_time_p90: metricSelector=builtin:service.response.time:merge("dt.entity.service"):percentile(90)&entitySelector=type(SERVICE),tag([Environment]DT_RELEASE_STAGE:$STAGE),tag([Kubernetes]app:$SERVICE)
response_time_p95: metricSelector=builtin:service.response.time:merge("dt.entity.service"):percentile(95)&entitySelector=type(SERVICE),tag([Environment]DT_RELEASE_STAGE:$STAGE),tag([Kubernetes]app:$SERVICE)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"comparison": "EQUALS",
"value": {
"context": "ENVIRONMENT",
"key": "DT_APPLICATION_NAME",
"key": "DT_RELEASE_PRODUCT",
"value": "delivery-demo"
},
"values": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ attachRules:
key: "app.kubernetes.io/name"
value: $SERVICE
- context: ENVIRONMENT
key: DT_APPLICATION_ENVIRONMENT
key: DT_RELEASE_STAGE
value: $STAGE

0 comments on commit 8aa4cbe

Please sign in to comment.