├── .gitignore ├── CODEOWNERS ├── LICENSE ├── README-KeptnForDynatrace.md ├── README.md ├── cloudautomation ├── INSTRUCTIONS.md ├── README.md ├── WorkshopHandsOnFEEDBACK.xlsx ├── WorkshopHandsOnFORATTENDEES.pdf ├── images │ ├── lab1_slodashboard.png │ ├── lab1_slodashboard_edit.png │ ├── lab2_clonsedashboard.png │ ├── lab2_releasevalidationdashboard.png │ ├── lab2_releasevalidationdashboard_edit.png │ ├── lab2_trigger_evaluation_devopstool.png │ ├── lab3_clonedashboard.png │ ├── lab3_deliverysequenceoverview.png │ ├── lab3_editslo.png │ ├── lab3_qualitygatedashboard_edit.png │ ├── lab3_triggerdelivery.png │ ├── setup_dtapitokens.png │ ├── validate-access-to-demoapp.png │ ├── validate-access-to-devopstool.png │ ├── validate-install-dns.png │ ├── validate-install-ec2-instances.png │ ├── validate-install-executionplane.png │ └── validate-install-workshopprojects.png ├── keptnwebservice │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── app.css │ ├── app.js │ ├── index.html │ ├── logo.png │ └── package.json ├── monaco │ ├── README.md │ ├── environment.yaml │ └── projects │ │ ├── delete │ │ └── delete.tmpl │ │ ├── general │ │ └── management-zone │ │ │ ├── management-zone.yaml │ │ │ └── zone.json │ │ ├── lab1 │ │ ├── dashboard │ │ │ ├── dashboard.yaml │ │ │ └── default_slo_dashboard.json │ │ └── slo │ │ │ ├── slo.json │ │ │ └── slo.yaml │ │ ├── lab2 │ │ └── dashboard │ │ │ ├── dashboard.yaml │ │ │ └── default_release_validation_dashboard.json │ │ ├── lab3 │ │ └── dashboard │ │ │ ├── dashboard.yaml │ │ │ └── default_qualitygate_dashboard.json │ │ └── setup │ │ ├── auto-tag │ │ ├── keptn-tagging.json │ │ └── tagging.yaml │ │ ├── calculated-metrics-service │ │ ├── calcslometric.json │ │ ├── calctenantmetric.yaml │ │ └── calcversionmetric.json │ │ ├── conditional-naming-host │ │ ├── namingrules.json │ │ └── namingrules.yaml │ │ ├── conditional-naming-processgroup │ │ ├── namingrules.json │ │ └── namingrules.yaml │ │ ├── conditional-naming-service │ │ ├── namingrules.json │ │ └── namingrules.yaml │ │ ├── dashboard │ │ ├── dashboard.yaml │ │ ├── default_qualitygate_dashboard.json │ │ ├── default_release_validation_dashboard.json │ │ ├── default_slo_dashboard.json │ │ └── default_workshop_dashboard.json │ │ └── request-attributes │ │ ├── attribute.json │ │ └── attribute.yaml └── scripts │ ├── add-resource-for-all-tenants.sh │ ├── create-service-for-all-tenants.sh │ ├── dashboards │ └── KQG;project=release-validation;stage=production;service=tnt-aapl-svc.json │ ├── default_qualitygate_dashboard.json │ ├── default_slo_dashboard.json │ ├── dynatrace.conf.quality-gate.yaml │ ├── dynatrace_shipyard.yaml │ ├── install-cloudautomation-workshop.sh │ ├── monaco-for-all-tenants.sh │ ├── reset_catenant.sh │ ├── tenants.aapl.sh │ ├── tenants.acer.sh │ ├── tenants.stockssample.sh │ ├── tenants.stockssample_10.sh │ ├── tenants.stockssample_2.sh │ ├── tenants.stockssample_20.sh │ ├── tenants.stockssample_5.sh │ ├── trigger-evaluation-for-all-tenants.sh │ └── trigger-for-all-tenants.sh ├── create-keptn-project-from-template.sh ├── dev.fun.triggered.json ├── dynatrace ├── createdtproblem.sh └── createnotification.sh ├── files ├── dynatrace │ ├── dynakube_06.yaml │ ├── dynakube_cr.yaml │ └── oneagent_values.yaml ├── gitea │ ├── gitea-ingress.yaml │ └── helm-gitea.yaml ├── istio │ ├── istio-gateway.yaml │ └── istio-ingress.yaml ├── jmeter │ ├── simplenode_load.jmx │ └── simplenode_load_withdtmint.jmx └── keptn │ └── keptn-ingress.yaml ├── images ├── dynatraceslodashboard.png ├── gitea_upstream_git.png ├── keptn_project_overview.png ├── keptnqualitygate_dynatrace.png ├── perfaaservice_1.png ├── perfaaservice_2.png ├── perfaaservice_3.png ├── perfaaservice_4.png ├── perfaaservice_5.png ├── perfaaservice_6.png ├── perfaaservice_animated.gif ├── remediation.gif ├── remediation_1.png ├── remediation_2.png ├── remediation_3.png ├── remediation_4.png ├── remediation_5.png ├── remediation_6.png ├── remediation_demo1.png ├── remediation_demo2.png ├── rollout_version1_done.png ├── rollout_version2_canaryphases.png ├── rollout_version2_edit_values_yaml.png ├── synchronizing_dynatrace_entities.png └── trigger_delivery_rollout_version1_api.png ├── install-keptn-on-k3s.sh ├── keptn_project_templates ├── advanced-performance │ ├── dynatrace │ │ ├── dynatrace.conf.yaml │ │ └── sli.yaml │ ├── functional.testing.triggered.json │ ├── jmeter │ │ ├── basiccheck.jmx │ │ ├── basiccheck_withdtmint.jmx │ │ ├── basicload.jmx │ │ ├── basicload_withdtmint.jmx │ │ └── jmeter.conf.yaml │ ├── service_appundertest │ │ └── servicedir.txt │ ├── shipyard.yaml │ └── stage_performance │ │ └── appundertest │ │ └── slo.yaml ├── auto-remediation │ ├── dynatrace │ │ └── dynatrace.conf.yaml │ ├── generic-executor │ │ ├── action.triggered.escalate.sh │ │ ├── action.triggered.firstaction.sh │ │ ├── action.triggered.poweroutageaction.py │ │ ├── action.triggered.secondaction.sh │ │ └── action.triggered.validatedns.sh │ ├── service_default │ │ └── servicedir.txt │ ├── shipyard.yaml │ └── stage_production │ │ └── default │ │ └── remediation.yaml ├── delivery-rollout │ ├── dynatrace │ │ ├── dynatrace.conf.yaml │ │ └── monaco.conf.yaml │ ├── generic-executor │ │ └── validate.triggered.sh │ ├── jmeter │ │ ├── basiccheck.jmx │ │ ├── jmeter.conf.yaml │ │ └── load.jmx │ ├── job │ │ ├── job.config │ │ └── validate.triggered.sh │ ├── prod.deployment.triggered.json │ ├── readme.md │ ├── service_simplenode │ │ └── servicedir.txt │ ├── shipyard.yaml │ ├── stage_prod │ │ └── simplenode │ │ │ ├── dynatrace │ │ │ └── sli.yaml │ │ │ ├── helm │ │ │ ├── endpoints.yaml │ │ │ └── simplenode │ │ │ │ ├── .helmignore │ │ │ │ ├── Chart.yaml │ │ │ │ ├── README.md │ │ │ │ ├── command.txt │ │ │ │ ├── templates │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── ingress.yaml │ │ │ │ ├── rolebinding.yaml │ │ │ │ ├── rollout.yaml │ │ │ │ └── service.yaml │ │ │ │ └── values.yaml │ │ │ ├── locust │ │ │ ├── load.py │ │ │ ├── locust.conf │ │ │ └── locust.conf.yaml │ │ │ └── slo.yaml │ ├── stage_staging │ │ └── simplenode │ │ │ ├── dynatrace │ │ │ ├── projects │ │ │ │ └── coreconfig │ │ │ │ │ └── auto-tag │ │ │ │ │ ├── keptn-tagging.json │ │ │ │ │ └── tagging.yaml │ │ │ └── sli.yaml │ │ │ ├── helm │ │ │ ├── endpoints.yaml │ │ │ └── simplenode │ │ │ │ ├── .helmignore │ │ │ │ ├── Chart.yaml │ │ │ │ ├── README.md │ │ │ │ ├── command.txt │ │ │ │ ├── templates │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── ingress.yaml │ │ │ │ ├── rolebinding.yaml │ │ │ │ ├── rollout.yaml │ │ │ │ └── service.yaml │ │ │ │ └── values.yaml │ │ │ ├── locust │ │ │ ├── load.py │ │ │ ├── locust.conf │ │ │ └── locust.conf.yaml │ │ │ └── slo.yaml │ ├── staging.deployment.triggered.json │ └── viewsimplenodeapp.html ├── delivery-simplenode │ ├── dynatrace │ │ ├── dynatrace.conf.yaml │ │ └── monaco.conf.yaml │ ├── jmeter │ │ ├── basiccheck.jmx │ │ ├── jmeter.conf.yaml │ │ └── load.jmx │ ├── service_simplenode │ │ ├── charts │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── deployment.yaml │ │ │ │ ├── rolebinding.yaml │ │ │ │ └── services.yaml │ │ │ └── values.yaml │ │ └── servicedir.txt │ ├── shipyard.yaml │ ├── shipyard_multiprod.yaml │ ├── shipyard_withhotfix.yaml │ ├── stage_production │ │ └── simplenode │ │ │ ├── dynatrace │ │ │ └── projects │ │ │ │ └── simplenode │ │ │ │ ├── dashboard │ │ │ │ ├── qualitygatedb.json │ │ │ │ └── qualitygatedb.yaml │ │ │ │ ├── management-zone │ │ │ │ ├── keptn-mz.json │ │ │ │ └── keptn-mz.yaml │ │ │ │ └── synthetic-monitor │ │ │ │ ├── synthetic.yaml │ │ │ │ ├── synthetic_browser.json │ │ │ │ └── synthetic_http.json │ │ │ └── slo.yaml │ └── stage_staging │ │ └── simplenode │ │ ├── dynatrace │ │ └── projects │ │ │ └── simplenode │ │ │ ├── dashboard │ │ │ ├── qualitygatedb.json │ │ │ └── qualitygatedb.yaml │ │ │ └── management-zone │ │ │ ├── keptn-mz.json │ │ │ └── keptn-mz.yaml │ │ └── slo.yaml ├── dynatrace-monaco │ └── shipyard.yaml ├── generic-automation │ ├── generic-executor │ │ ├── echo.triggered.sh │ │ └── getjoke.triggered.sh │ ├── service_default │ │ └── servicedir.txt │ └── shipyard.yaml ├── performance-as-selfservice │ ├── dynatrace │ │ ├── dynatrace.conf.yaml │ │ └── sli.yaml │ ├── jmeter │ │ ├── basiccheck.jmx │ │ ├── basiccheck_withdtmint.jmx │ │ ├── basicload.jmx │ │ ├── basicload_withdtmint.jmx │ │ └── jmeter.conf.yaml │ ├── service_appundertest │ │ └── servicedir.txt │ ├── service_easytravel │ │ └── servicedir.txt │ ├── shipyard.yaml │ └── stage_performance │ │ ├── appundertest │ │ └── slo.yaml │ │ └── easytravel │ │ ├── jmeter │ │ ├── easytravel-classic-random-book.jmx │ │ ├── easytravel-users.txt │ │ └── jmeter.conf.yaml │ │ └── slo.yaml ├── prod-delivery-simplenode │ ├── dynatrace │ │ ├── dynatrace.conf.yaml │ │ ├── dynatrace.conf.yaml.default │ │ └── monaco.conf.yaml │ ├── service_tnt-XXX-svc │ │ └── servicedir.txt │ ├── shipyard.yaml │ ├── stage_production │ │ ├── dynatrace │ │ │ ├── projects │ │ │ │ └── simplenode │ │ │ │ │ ├── calculated-metrics-service │ │ │ │ │ ├── calcslometric.json │ │ │ │ │ ├── calctenantmetric.yaml │ │ │ │ │ └── calcversionmetric.json │ │ │ │ │ ├── conditional-naming-processgroup │ │ │ │ │ ├── namingrules.json │ │ │ │ │ └── namingrules.yaml │ │ │ │ │ ├── conditional-naming-service │ │ │ │ │ ├── namingrules.json │ │ │ │ │ └── namingrules.yaml │ │ │ │ │ ├── management-zone │ │ │ │ │ ├── keptn-mz.json │ │ │ │ │ └── keptn-mz.yaml │ │ │ │ │ └── synthetic-monitor │ │ │ │ │ ├── synthetic.yaml │ │ │ │ │ ├── synthetic_browser.json │ │ │ │ │ └── synthetic_http.json │ │ │ └── sli.yaml │ │ └── tnt-XXX-svc │ │ │ ├── helm │ │ │ ├── endpoints.yaml │ │ │ └── tnt-XXX-svc │ │ │ │ ├── Chart.yaml │ │ │ │ ├── templates │ │ │ │ └── deployment.yaml │ │ │ │ └── values.yaml │ │ │ └── slo.yaml │ └── stage_staging │ │ ├── dynatrace │ │ ├── projects │ │ │ └── simplenode │ │ │ │ ├── auto-tag │ │ │ │ ├── keptn-tagging.json │ │ │ │ └── tagging.yaml │ │ │ │ ├── calculated-metrics-service │ │ │ │ ├── calctestmetric.json │ │ │ │ └── caltestmetric.yaml │ │ │ │ ├── management-zone │ │ │ │ ├── keptn-mz.json │ │ │ │ ├── keptn-mz.yaml │ │ │ │ └── keptn-service-mz.json │ │ │ │ ├── request-attributes │ │ │ │ ├── attribute.json │ │ │ │ └── attribute.yaml │ │ │ │ └── synthetic-monitor │ │ │ │ ├── synthetic.yaml │ │ │ │ └── synthetic_http.json │ │ └── sli.yaml │ │ └── tnt-XXX-svc │ │ ├── helm │ │ ├── endpoints.yaml │ │ └── tnt-XXX-svc │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ └── deployment.yaml │ │ │ └── values.yaml │ │ ├── locust │ │ ├── load.py │ │ ├── locust.conf │ │ └── locust.conf.yaml │ │ └── slo.yaml ├── prod-devopstools │ ├── service_jenkins │ │ └── servicedir.txt │ ├── service_keptnwebservice │ │ └── servicedir.txt │ ├── shipyard.yaml │ └── stage_production │ │ ├── jenkins │ │ └── helm │ │ │ ├── endpoints.yaml │ │ │ └── jenkins │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ └── deployment.yaml │ │ │ └── values.yaml │ │ └── keptnwebservice │ │ └── helm │ │ ├── endpoints.yaml │ │ └── keptnwebservice │ │ ├── Chart.yaml │ │ ├── templates │ │ └── deployment.yaml │ │ └── values.yaml ├── prometheus-qg │ ├── podtato-head │ │ ├── deployment.yaml │ │ └── service.yaml │ ├── podtato-ingress.yaml │ ├── prometheus-ingress.yaml │ ├── service_helloservice │ │ └── servicedir.txt │ ├── shipyard.yaml │ ├── sli-secret.yaml │ └── stage_quality-gate │ │ └── helloservice │ │ ├── prometheus │ │ └── sli.yaml │ │ └── slo.yaml ├── quality-gate-dynatrace │ ├── dynatrace │ │ ├── dynatrace.conf.yaml │ │ └── monaco.conf.yaml │ ├── service_demo │ │ └── servicedir.txt │ ├── shipyard.yaml │ ├── shipyard_simple.yaml │ └── stage_quality-gate │ │ └── dynatrace │ │ └── projects │ │ ├── coreconfig │ │ └── auto-tag │ │ │ ├── keptn-tagging.json │ │ │ └── tagging.yaml │ │ └── quality-gate │ │ └── dashboard │ │ ├── qgdashboard.json │ │ └── qgdashboard.yaml ├── release-validation-simplenode │ ├── dynatrace │ │ └── dynatrace.conf.yaml │ ├── service_tnt-XXX-svc │ │ └── servicedir.txt │ └── shipyard.yaml └── two-stage-delivery-simplenode │ ├── dynatrace │ ├── dynatrace.conf.yaml │ └── monaco.conf.yaml │ ├── jmeter │ ├── basiccheck.jmx │ ├── jmeter.conf.yaml │ └── load.jmx │ ├── service_simplenode │ └── servicedir.txt │ ├── shipyard.yaml │ ├── stage_production │ └── simplenode │ │ ├── dynatrace │ │ └── projects │ │ │ └── simplenode │ │ │ ├── management-zone │ │ │ ├── keptn-mz.json │ │ │ └── keptn-mz.yaml │ │ │ └── synthetic-monitor │ │ │ ├── synthetic.yaml │ │ │ ├── synthetic_browser.json │ │ │ └── synthetic_http.json │ │ ├── helm │ │ ├── endpoints.yaml │ │ └── simplenode │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ ├── rolebinding.yaml │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ └── slo.yaml │ └── stage_staging │ └── simplenode │ ├── helm │ ├── endpoints.yaml │ └── simplenode │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── deployment.yaml │ │ ├── ingress.yaml │ │ ├── rolebinding.yaml │ │ └── service.yaml │ │ └── values.yaml │ └── slo.yaml ├── kubectl ├── performance.testing.triggered.placeholder.json └── trigger.performance.testing.sh /.gitignore: -------------------------------------------------------------------------------- 1 | _justForAndi.txt 2 | files/curloutput.txt 3 | gitea-ingress_gen.yaml 4 | *.tmp 5 | cloudautomation/scripts/tenants.sh 6 | cloudautomation/monaco/.logs/*.* 7 | cloudautomation/scripts/.logs/*.* 8 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | # 3 | # Lists the owners of this project 4 | # 5 | ############################################################## 6 | # 7 | # Learn about CODEOWNERS file format: 8 | # https://help.github.com/en/articles/about-code-owners 9 | # 10 | @thschue 11 | -------------------------------------------------------------------------------- /cloudautomation/WorkshopHandsOnFEEDBACK.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/WorkshopHandsOnFEEDBACK.xlsx -------------------------------------------------------------------------------- /cloudautomation/WorkshopHandsOnFORATTENDEES.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/WorkshopHandsOnFORATTENDEES.pdf -------------------------------------------------------------------------------- /cloudautomation/images/lab1_slodashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab1_slodashboard.png -------------------------------------------------------------------------------- /cloudautomation/images/lab1_slodashboard_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab1_slodashboard_edit.png -------------------------------------------------------------------------------- /cloudautomation/images/lab2_clonsedashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab2_clonsedashboard.png -------------------------------------------------------------------------------- /cloudautomation/images/lab2_releasevalidationdashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab2_releasevalidationdashboard.png -------------------------------------------------------------------------------- /cloudautomation/images/lab2_releasevalidationdashboard_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab2_releasevalidationdashboard_edit.png -------------------------------------------------------------------------------- /cloudautomation/images/lab2_trigger_evaluation_devopstool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab2_trigger_evaluation_devopstool.png -------------------------------------------------------------------------------- /cloudautomation/images/lab3_clonedashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab3_clonedashboard.png -------------------------------------------------------------------------------- /cloudautomation/images/lab3_deliverysequenceoverview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab3_deliverysequenceoverview.png -------------------------------------------------------------------------------- /cloudautomation/images/lab3_editslo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab3_editslo.png -------------------------------------------------------------------------------- /cloudautomation/images/lab3_qualitygatedashboard_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab3_qualitygatedashboard_edit.png -------------------------------------------------------------------------------- /cloudautomation/images/lab3_triggerdelivery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/lab3_triggerdelivery.png -------------------------------------------------------------------------------- /cloudautomation/images/setup_dtapitokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/setup_dtapitokens.png -------------------------------------------------------------------------------- /cloudautomation/images/validate-access-to-demoapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/validate-access-to-demoapp.png -------------------------------------------------------------------------------- /cloudautomation/images/validate-access-to-devopstool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/validate-access-to-devopstool.png -------------------------------------------------------------------------------- /cloudautomation/images/validate-install-dns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/validate-install-dns.png -------------------------------------------------------------------------------- /cloudautomation/images/validate-install-ec2-instances.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/validate-install-ec2-instances.png -------------------------------------------------------------------------------- /cloudautomation/images/validate-install-executionplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/validate-install-executionplane.png -------------------------------------------------------------------------------- /cloudautomation/images/validate-install-workshopprojects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/images/validate-install-workshopprojects.png -------------------------------------------------------------------------------- /cloudautomation/keptnwebservice/.gitignore: -------------------------------------------------------------------------------- 1 | serviceoutput.log 2 | package-lock.json -------------------------------------------------------------------------------- /cloudautomation/keptnwebservice/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:15 2 | 3 | # Create app directory 4 | WORKDIR /usr/src/app 5 | 6 | # Install app dependencies 7 | # A wildcard is used to ensure both package.json AND package-lock.json are copied 8 | # where available (npm@5+) 9 | COPY package*.json ./ 10 | 11 | RUN npm install 12 | 13 | RUN apt-get update -y 14 | RUN apt-get install -y ca-certificates 15 | # If you are building your code for production 16 | # RUN npm ci --only=production 17 | 18 | # Bundle app source 19 | COPY . . 20 | 21 | EXPOSE 8080 22 | 23 | CMD [ "npm", "start" ] -------------------------------------------------------------------------------- /cloudautomation/keptnwebservice/README.md: -------------------------------------------------------------------------------- 1 | # Running Locally 2 | 3 | 1. Once you clone the repo, you need to run npm install to download the required modules. I used npm: `7.5.0`, node: `15.8.0` 4 | 5 | ``` 6 | npm update 7 | npm start 8 | ``` 9 | 10 | 1. Set these environment variables 11 | 12 | ``` 13 | export KEPTN_ENDPOINT=[YOUR URL] 14 | export KEPTN_API_TOKEN=[YOUR-TOKEN] 15 | ``` 16 | 17 | 1. Run the application 18 | 19 | ``` 20 | npm start 21 | ``` 22 | 23 | 1. Access the application @ http://127.0.0.1:8080/ 24 | 25 | # Running as docker container 26 | 27 | I have uploaded the following versions to my dockerhub registry: 28 | 29 | | Image | Description | 30 | | ------ | ------------- | 31 | | grabnerandi/keptnwebservice:1.0.0 | Initial Version | 32 | | grabnerandi/keptnwebservice:2.0.0 | Version with better UI and Manage Resource support | 33 | | grabnerandi/keptnwebservice:2.0.1 | Allows requests to https without a valid certificate | -------------------------------------------------------------------------------- /cloudautomation/keptnwebservice/app.css: -------------------------------------------------------------------------------- 1 | .top-header { 2 | background-color: #00a1b2; 3 | } 4 | .top-header-text { 5 | font-family: BerninaSansWeb,OpenSans,sans-serif; 6 | color:white; 7 | background-color: #00a1b2; 8 | font-size:x-large; 9 | font-weight: bold; 10 | vertical-align: bottom; 11 | } 12 | h2, h3 { 13 | font-family: BerninaSansWeb,OpenSans,sans-serif; 14 | color: #454646; 15 | line-height: 1.6; 16 | } 17 | body { 18 | font-family: BerninaSansWeb,OpenSans,sans-serif; 19 | } -------------------------------------------------------------------------------- /cloudautomation/keptnwebservice/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/cloudautomation/keptnwebservice/logo.png -------------------------------------------------------------------------------- /cloudautomation/keptnwebservice/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeptnWebService", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": {}, 6 | "scripts": { 7 | "start": "node app.js" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /cloudautomation/monaco/environment.yaml: -------------------------------------------------------------------------------- 1 | workshop: 2 | - name: "workshop" 3 | - env-url: "https://{{ .Env.DT_TENANT }}" 4 | - env-token-name: "DT_API_TOKEN" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/delete/delete.tmpl: -------------------------------------------------------------------------------- 1 | delete: 2 | - "dashboard/SLO Dashboard for Tenant TENANT_ID" 3 | - "dashboard/KQG;project=release-validation;stage=production;service=tnt-TENANT_ID-svc" 4 | - "dashboard/KQG;project=delivery-demo;stage=staging;service=tnt-TENANT_ID-svc" 5 | - "slo/Availability of TENANT_ID" 6 | - "slo/Performance SLO of TENANT_ID" 7 | -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/general/management-zone/management-zone.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - zone: "zone.json" 3 | 4 | zone: 5 | - name: "Tenant: tnt-{{ .Env.TENANT_ID }}-svc" 6 | -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/general/management-zone/zone.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}" 3 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/lab1/dashboard/dashboard.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - slo_dashboard: "default_slo_dashboard.json" 3 | 4 | slo_dashboard: 5 | - name: "SLO Dashboard for Tenant {{ .Env.TENANT_ID }}" 6 | - owner: "{{ .Env.OWNER_EMAIL }}" 7 | - tenant: "{{ .Env.TENANT_ID }}" 8 | - availabilitySloId: "/lab1/slo/availabilitySlo.id" 9 | - performanceSloId: "/lab1/slo/performanceSlo.id" 10 | - mzId: "/general/management-zone/zone.id" 11 | - mzName: "/general/management-zone/zone.name" 12 | - bridgeLink: "https://{{ .Env.KEPTN_CONTROL_PLANE_DOMAIN }}/bridge" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/lab1/slo/slo.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": true, 3 | "name": "{{ .name }}", 4 | "customDescription": "{{ .description }}", 5 | "useRateMetric": true, 6 | "metricExpression": "{{ .expression }}", 7 | "metricRate": "", 8 | "metricDenominator": "", 9 | "metricNumerator": "", 10 | "evaluationType": "AGGREGATE", 11 | "filter": "{{ .filter }}", 12 | "target": "{{ .target }}", 13 | "warning": "{{ .warning }}", 14 | "timeframe": "{{ .timeframe }}" 15 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/lab1/slo/slo.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - availabilitySlo: "slo.json" 3 | - performanceSlo: "slo.json" 4 | 5 | availabilitySlo: 6 | - name: "Availability of {{ .Env.TENANT_ID }}" 7 | - description: "% of time {{ .Env.TENANT_ID }} service is available based on synthetic test" 8 | - expression: "(builtin:synthetic.browser.availability.location.total:splitBy())" 9 | - filter: "mzName(\\\"Tenant: tnt-{{ .Env.TENANT_ID }}-svc\\\"),type(\\\"SYNTHETIC_TEST\\\")" 10 | - target: "95.00" 11 | - warning: "99.00" 12 | - timeframe: "-1d" 13 | 14 | performanceSlo: 15 | - name: "Performance SLO of {{ .Env.TENANT_ID }}" 16 | - description: "% of requests handled by {{ .Env.TENANT_ID }} service faster than 500ms" 17 | - expression: "(100)*(calc:service.tenant.responsetime.count.faster500ms:splitBy())/(builtin:service.requestCount.server:splitBy())" 18 | - filter: "mzName(\\\"Tenant: tnt-{{ .Env.TENANT_ID }}-svc\\\"),type(\\\"SERVICE\\\"),tag(\\\"[Environment]DT_RELEASE_STAGE:production\\\")" 19 | - target: "85.00" 20 | - warning: "90.00" 21 | - timeframe: "-1d" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/lab2/dashboard/dashboard.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - release_validation_dashboard: "default_release_validation_dashboard.json" 3 | 4 | release_validation_dashboard: 5 | - name: "KQG;project=release-validation;stage=production;service=tnt-{{ .Env.TENANT_ID }}-svc" 6 | - owner: "{{ .Env.OWNER_EMAIL }}" 7 | - tenant: "{{ .Env.TENANT_ID }}" 8 | - availabilitySloId: "/lab1/slo/availabilitySlo.id" 9 | - performanceSloId: "/lab1/slo/performanceSlo.id" 10 | - mzId: "/general/management-zone/zone.id" 11 | - mzName: "/general/management-zone/zone.name" 12 | - bridgeLink: "https://{{ .Env.KEPTN_CONTROL_PLANE_DOMAIN }}/bridge" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/lab3/dashboard/dashboard.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - qg_dashboard: "default_qualitygate_dashboard.json" 3 | 4 | qg_dashboard: 5 | - name: "KQG;project=delivery-demo;stage=staging;service=tnt-{{ .Env.TENANT_ID }}-svc" 6 | - owner: "{{ .Env.OWNER_EMAIL }}" 7 | - tenant: "{{ .Env.TENANT_ID }}" 8 | - availabilitySloId: "/lab1/slo/availabilitySlo.id" 9 | - performanceSloId: "/lab1/slo/performanceSlo.id" 10 | - mzId: "/general/management-zone/zone.id" 11 | - mzName: "/general/management-zone/zone.name" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/auto-tag/keptn-tagging.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "valueFormat": "{ProcessGroup:Environment:{{ .name }}}", 8 | "propagationTypes": [ 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "PROCESS_GROUP_CUSTOM_METADATA", 15 | "dynamicKey": { 16 | "source": "ENVIRONMENT", 17 | "key": "{{ .name }}" 18 | }, 19 | "type": "PROCESS_CUSTOM_METADATA_KEY" 20 | }, 21 | "comparisonInfo": { 22 | "type": "STRING", 23 | "operator": "EXISTS", 24 | "value": null, 25 | "negate": false, 26 | "caseSensitive": null 27 | } 28 | } 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/auto-tag/tagging.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - keptn-stage-tag: "keptn-tagging.json" 3 | - keptn-service-tag: "keptn-tagging.json" 4 | - keptn-project-tag: "keptn-tagging.json" 5 | - keptn-deployment-tag: "keptn-tagging.json" 6 | 7 | keptn-stage-tag: 8 | - name: "keptn_stage" 9 | 10 | keptn-service-tag: 11 | - name: "keptn_service" 12 | 13 | keptn-project-tag: 14 | - name: "keptn_project" 15 | 16 | keptn-deployment-tag: 17 | - name: "keptn_deployment" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/calculated-metrics-service/calcslometric.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsmMetricKey": "{{ .metricKey }}", 3 | "name": "{{ .name }}", 4 | "enabled": true, 5 | "metricDefinition": { 6 | "metric": "REQUEST_COUNT", 7 | "requestAttribute": null 8 | }, 9 | "unit": "COUNT", 10 | "unitDisplayName": "", 11 | "entityId": null, 12 | "managementZones": [], 13 | "conditions": [ 14 | { 15 | "attribute": "SERVICE_TAG", 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "comparison": "EQUALS", 19 | "value": { 20 | "context": "ENVIRONMENT", 21 | "key": "DT_RELEASE_PRODUCT", 22 | "value": "delivery-demo" 23 | }, 24 | "values": null, 25 | "negate": false 26 | } 27 | }, 28 | { 29 | "attribute": "RESPONSE_TIME", 30 | "comparisonInfo": { 31 | "type": "NUMBER", 32 | "comparison": "LOWER_THAN_OR_EQUAL", 33 | "value": 500, 34 | "values": null, 35 | "negate": false 36 | } 37 | } 38 | ], 39 | "dimensionDefinition": { 40 | "name": "version", 41 | "dimension": "{Request:ApplicationReleaseVersion}", 42 | "placeholders": [], 43 | "topX": 10, 44 | "topXDirection": "DESCENDING", 45 | "topXAggregation": "SINGLE_VALUE" 46 | } 47 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/calculated-metrics-service/calctenantmetric.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - tenantfastercount: "calcslometric.json" 3 | - tenantrtbyversion: "calcversionmetric.json" 4 | 5 | tenantfastercount: 6 | - name: "Tenant.ResponseTime.Count.Faster500ms" 7 | - metricKey: "calc:service.tenant.responsetime.count.faster500ms" 8 | 9 | tenantrtbyversion: 10 | - name: "Tenant.ResponseTime.ByVersion" 11 | - metricKey: "calc:service.tenant.responsetime.byversion" 12 | 13 | -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/calculated-metrics-service/calcversionmetric.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsmMetricKey": "{{ .metricKey }}", 3 | "name": "{{ .name }}", 4 | "enabled": true, 5 | "metricDefinition": { 6 | "metric": "RESPONSE_TIME", 7 | "requestAttribute": null 8 | }, 9 | "unit": "MICRO_SECOND", 10 | "unitDisplayName": "", 11 | "entityId": null, 12 | "managementZones": [], 13 | "conditions": [ 14 | { 15 | "attribute": "SERVICE_TAG", 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "comparison": "TAG_KEY_EQUALS", 19 | "value": { 20 | "context": "ENVIRONMENT", 21 | "key": "DT_RELEASE_VERSION" 22 | }, 23 | "values": null, 24 | "negate": false 25 | } 26 | }, 27 | { 28 | "attribute": "SERVICE_TAG", 29 | "comparisonInfo": { 30 | "type": "TAG", 31 | "comparison": "EQUALS", 32 | "value": { 33 | "context": "ENVIRONMENT", 34 | "key": "DT_RELEASE_PRODUCT", 35 | "value": "delivery-demo" 36 | }, 37 | "values": null, 38 | "negate": false 39 | } 40 | } 41 | ], 42 | "dimensionDefinition": { 43 | "name": "version", 44 | "dimension": "{Request:ApplicationReleaseVersion}", 45 | "placeholders": [], 46 | "topX": 10, 47 | "topXDirection": "DESCENDING", 48 | "topXAggregation": "SUM" 49 | } 50 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/conditional-naming-host/namingrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "HOST", 3 | "nameFormat": "{{ .name }}", 4 | "displayName": "{{ .name }}", 5 | "enabled": true, 6 | "rules": [ 7 | { 8 | "key": { 9 | "attribute": "HOST_TAGS", 10 | "type": "STATIC" 11 | }, 12 | "comparisonInfo": { 13 | "type": "TAG", 14 | "operator": "EQUALS", 15 | "value": { 16 | "context": "ENVIRONMENT", 17 | "key": "KeptnStage", 18 | "value" : "{{ .stage }}" 19 | }, 20 | "negate": false 21 | } 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/conditional-naming-host/namingrules.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - staging_naming: "namingrules.json" 3 | - production_naming: "namingrules.json" 4 | 5 | staging_naming: 6 | - name: "cs workshop staging" 7 | - stage: "staging" 8 | 9 | production_naming: 10 | - name: "cs workshop production" 11 | - stage: "production" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/conditional-naming-processgroup/namingrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "{{ .type }}", 3 | "nameFormat": "{ProcessGroup:KubernetesBasePodName}.{ProcessGroup:KubernetesNamespace}", 4 | "displayName": "{{ .name }}", 5 | "enabled": true, 6 | "rules": [ 7 | { 8 | "key": { 9 | "attribute": "PROCESS_GROUP_PREDEFINED_METADATA", 10 | "dynamicKey": "KUBERNETES_BASE_POD_NAME", 11 | "type": "PROCESS_PREDEFINED_METADATA_KEY" 12 | }, 13 | "comparisonInfo": { 14 | "type": "STRING", 15 | "operator": "EXISTS", 16 | "value": null, 17 | "negate": false, 18 | "caseSensitive": null 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/conditional-naming-processgroup/namingrules.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - pg_naming: "namingrules.json" 3 | 4 | pg_naming: 5 | - name: "k8s PG Naming Rule" 6 | - type: "PROCESS_GROUP" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/conditional-naming-service/namingrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "{{ .type }}", 3 | "nameFormat": "{ProcessGroup:KubernetesBasePodName}.{ProcessGroup:KubernetesNamespace}", 4 | "displayName": "{{ .name }}", 5 | "enabled": true, 6 | "rules": [ 7 | { 8 | "key": { 9 | "attribute": "PROCESS_GROUP_PREDEFINED_METADATA", 10 | "dynamicKey": "KUBERNETES_BASE_POD_NAME", 11 | "type": "PROCESS_PREDEFINED_METADATA_KEY" 12 | }, 13 | "comparisonInfo": { 14 | "type": "STRING", 15 | "operator": "EXISTS", 16 | "value": null, 17 | "negate": false, 18 | "caseSensitive": null 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/conditional-naming-service/namingrules.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - svc_naming: "namingrules.json" 3 | 4 | svc_naming: 5 | - name: "k8s SVC Naming Rule" 6 | - type: "SERVICE" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/dashboard/dashboard.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - qg_dashboard: "default_qualitygate_dashboard.json" 3 | - slo_dashboard: "default_slo_dashboard.json" 4 | - release_validation_dashboard: "default_release_validation_dashboard.json" 5 | - workshop_dashboard: "default_workshop_dashboard.json" 6 | 7 | qg_dashboard: 8 | - name: "KQG;project=delivery-demo;stage=staging;service=tnt-xxxx-svc" 9 | - owner: "{{ .Env.OWNER_EMAIL }}" 10 | 11 | slo_dashboard: 12 | - name: "SLO Dashboard for Tenant xxxx" 13 | - owner: "{{ .Env.OWNER_EMAIL }}" 14 | 15 | release_validation_dashboard: 16 | - name: "KQG;project=release-validation;stage=production;service=tnt-xxxx-svc" 17 | - owner: "{{ .Env.OWNER_EMAIL }}" 18 | 19 | workshop_dashboard: 20 | - name: "Cloud Automation Workshop Overview and Links" 21 | - owner: "{{ .Env.OWNER_EMAIL }}" 22 | - dttenant: "{{ .Env.DT_TENANT }}" 23 | - keptncontrolplane: "{{ .Env.KEPTN_CONTROL_PLANE_DOMAIN }}" 24 | - keptnstagingingress: "{{ .Env.KEPTN_STAGING_INGRESS }}" 25 | - keptnproductioningress: "{{ .Env.KEPTN_PRODUCTION_INGRESS }}" 26 | - workshopuser: "{{ .Env.WORKSHOP_USERNAME }}" 27 | - workshoppwd: "{{ .Env.WORKSHOP_PASSWORD }}" 28 | - onlinespreadsheetlink: "{{ .Env.ONLINE_SPREADSHEET }}" -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/dashboard/default_workshop_dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboardMetadata": { 3 | "name": "{{ .name }}", 4 | "shared": true, 5 | "owner": "{{ .owner }}", 6 | "tags": [ 7 | "overview" 8 | ], 9 | "preset": true 10 | }, 11 | "tiles": [ 12 | { 13 | "name": "Markdown", 14 | "tileType": "MARKDOWN", 15 | "configured": true, 16 | "bounds": { 17 | "top": 0, 18 | "left": 0, 19 | "width": 1254, 20 | "height": 798 21 | }, 22 | "tileFilter": {}, 23 | "markdown": "# Welcome to the Cloud Automation Workshop. Here are all important links you need today\n\nWe have a couple of things for you ...\n\n## Online Spreadsheet \nIn this [Online Spreadsheet]({{ .onlinespreadsheetlink }}) you can claim your Workshop Tenant Id by putting your name in column A next to a not yet claimed Tenant.\nWe also use this Excel to keep track of Hands-On Status!\n\n## Hands-On Instructions \nSupporting information for the Hands-On, e.g.: screenshots, copy/paste help ...\n\n* Instructions on [GitHub](https://github.com/keptn-sandbox/keptn-on-k3s/blob/master/cloudautomation/INSTRUCTIONS.md)\n* Instructions in [PowerPoint/PDF](https://github.com/keptn-sandbox/keptn-on-k3s/blob/master/cloudautomation/WorkshopHandsOnFORATTENDEES.pdf)\n\n## Dynatrace Environments\n\n* Dynatrace tenant: [{{ .dttenant }}](https://{{ .dttenant }})\n* Cloud Automation tenant: [{{ .keptncontrolplane }}](https://{{ .keptncontrolplane }})\n\nFor both use a browser in *Incognito Mode* and login with \n\n* User: {{ .workshopuser }}\n* Pass: {{ .workshoppwd }}\n\n## Sample CI/CD to trigger automation\n\nInstead of hosting a Jenkins, GitLab or Azure DevOps we created a [Simple DevOps Web Interface](http://keptnwebservice.devopstools-production.{{ .keptnproductioningress }})\n allowing you to trigger Cloud Automation sequences just as your existing CI would do:\n\n## Your sample / demo tenant app: Possible it is blocked by your Corporate Firewall (but thats not an issue)\nWe all have our own sample apps. They follow the same link name pattern. Only thing you need to do is replace XXXX with your tenantId, e.g: aapl, acer, ...\n\n* Staging: [http://tnt-XXXX-svc.delivery-demo-staging.{{ .keptnstagingingress }}](http://tnt-XXXX-svc.delivery-demo-staging.{{ .keptnstagingingress }})\n\n* Production: [http://tnt-XXXX-svc.delivery-demo-production.{{ .keptnproductioningress }}](http://tnt-XXXX-svc.delivery-demo-production.{{ .keptnproductioningress }})\n\n## Any other question\nEither use Zoom Chat, raise your hands (if you are in the room) or send me an email: {{ .owner }}" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/request-attributes/attribute.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "enabled": true, 4 | "dataType": "STRING", 5 | "dataSources": [ 6 | { 7 | "enabled": true, 8 | "source": "REQUEST_HEADER", 9 | "valueProcessing": { 10 | "splitAt": "", 11 | "trim": false, 12 | "extractSubstring": { 13 | "position": "BETWEEN", 14 | "delimiter": "{{ .delimiter }}", 15 | "endDelimiter": ";" 16 | } 17 | }, 18 | "parameterName": "x-dynatrace-test", 19 | "capturingAndStorageLocation": "CAPTURE_AND_STORE_ON_SERVER" 20 | } 21 | ], 22 | "normalization": "ORIGINAL", 23 | "aggregation": "FIRST", 24 | "confidential": false, 25 | "skipPersonalDataMasking": false 26 | } -------------------------------------------------------------------------------- /cloudautomation/monaco/projects/setup/request-attributes/attribute.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - lsn-tag: "attribute.json" 3 | - ltn-tag: "attribute.json" 4 | - tsn-tag: "attribute.json" 5 | 6 | lsn-tag: 7 | - name: "LSN" 8 | - delimiter: "LSN=" 9 | 10 | ltn-tag: 11 | - name: "LTN" 12 | - delimiter: "LTN=" 13 | 14 | tsn-tag: 15 | - name: "TSN" 16 | - delimiter: "TSN=" 17 | -------------------------------------------------------------------------------- /cloudautomation/scripts/add-resource-for-all-tenants.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | TENANTS=${1:-none} 6 | PROJECT=${2:-none} 7 | STAGE=${3:-none} 8 | LOCALRESOURCE=${4:-none} 9 | RESOURCEURI=${5:-none} 10 | 11 | if [[ "$TENANTS" == "none" ]] || [[ "$PROJECT" == "none" ]] || [[ "$STAGE" == "none" ]] || [[ "$LOCALRESOURCE" == "none" ]] || [[ "$RESOURCEURI" == "none" ]]; then 12 | echo "Usage: $0 TENANTLIST PROJECT STAGE SERVICE LOCALRESOURCE RESOURCEURI" 13 | echo "Example: " 14 | echo "$0 tenants.sh delivery-demo production localslo.yaml slo.yaml" 15 | exit 1 16 | fi 17 | 18 | # loading tenants 19 | source $TENANTS 20 | 21 | instanceCount=${#INSTANCE_ARRAY[@]} 22 | 23 | # now either create a single or multiple instances 24 | for (( instanceIx=0; instanceIx projects/delete/delete.yaml 32 | monaco -e environment.yaml projects/delete 33 | rm projects/delete/delete.yaml 34 | else 35 | monaco -e environment.yaml -p $PROJECT projects 36 | fi 37 | 38 | done 39 | 40 | # and now back 41 | cd $currentDir -------------------------------------------------------------------------------- /cloudautomation/scripts/reset_catenant.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script helps to reset a Cloud Automation tenant's default "dynatrace" project 4 | 5 | set -eu 6 | 7 | PREFIX="https" 8 | 9 | KEPTN_CONTROL_PLANE_API_TOKEN=${KEPTN_CONTROL_PLANE_API_TOKEN:-none} 10 | KEPTN_CONTROL_PLANE_DOMAIN=${KEPTN_CONTROL_PLANE_DOMAIN:-none} 11 | 12 | if [[ "$KEPTN_CONTROL_PLANE_API_TOKEN" != "none" ]] && [[ "$KEPTN_CONTROL_PLANE_DOMAIN" != "none" ]]; then 13 | keptn auth --api-token "${KEPTN_CONTROL_PLANE_API_TOKEN}" --endpoint "${PREFIX}://$KEPTN_CONTROL_PLANE_DOMAIN/api" 14 | else 15 | # assume that keptn cli is already authenticated 16 | keptn status 17 | fi 18 | 19 | echo "Ready to reset the currently connected keptn? (y/n)" 20 | read userinput 21 | if [[ "$userinput" != "y" ]]; then 22 | echo "stop" 23 | exit 0 24 | fi 25 | 26 | # lets first delete secret and project 27 | # keptn delete secret dynatrace 28 | keptn delete project dynatrace 29 | 30 | # now lets create the project and add the default dynatrace.conf.yaml 31 | keptn create project dynatrace --shipyard=./dynatrace_shipyard.yaml 32 | keptn add-resource --project=dynatrace --stage=quality-gate --resource="dynatrace.conf.quality-gate.yaml" --resourceUri="dynatrace/dynatrace.conf.yaml" 33 | # keptn add-resource --project=dynatrace --stage=production --resource="dynatrace.conf.production.yaml" --resourceUri="dynatrace/dynatrace.conf.yaml" 34 | -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.aapl.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(aapl) -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.acer.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(acer) 2 | -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.stockssample.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(aapl acer amzn bnym bofa cola comp dish docu duke dyna ebay fedx ford geel goog intc msft nflx nike nvda orly pton qcom sbux siri tsla vrtx wday yumb) -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.stockssample_10.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(aapl acer amzn bnym bofa cola comp dish docu duke) -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.stockssample_2.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(aapl acer) -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.stockssample_20.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(aapl acer amzn bnym bofa cola comp dish docu duke dyna ebay fedx ford geel goog intc msft nflx nike) -------------------------------------------------------------------------------- /cloudautomation/scripts/tenants.stockssample_5.sh: -------------------------------------------------------------------------------- 1 | INSTANCE_ARRAY=(aapl acer amzn bnym bofa) -------------------------------------------------------------------------------- /cloudautomation/scripts/trigger-evaluation-for-all-tenants.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | TENANTS=${1:-none} 6 | PROJECT=${2:-none} 7 | STAGE=${3:-none} 8 | TIMEFRAME=${4:-none} 9 | SLEEP_IN_SECS=${5:-5} 10 | 11 | if [[ "$TENANTS" == "none" ]] || [[ "$PROJECT" == "none" ]] || [[ "$STAGE" == "none" ]] || [[ "$TIMEFRAME" == "none" ]]; then 12 | echo "Usage: ./$0 TENANTLIST PROJECT STAGE TIMEFRAME [SLEEP_IN_SECS]" 13 | echo "Example: " 14 | echo "./$0 tenants.sh dynatrace quality-gate 30m" 15 | exit 1 16 | fi 17 | 18 | # loading tenants 19 | source $TENANTS 20 | 21 | instanceCount=${#INSTANCE_ARRAY[@]} 22 | 23 | # now either create a single or multiple instances 24 | for (( instanceIx=0; instanceIx 1: 7 | methodArg = sys.argv[1] 8 | 9 | print("This is the output of my poweroutage action handler python called for " + os.getenv('DATA_PROBLEM_PROBLEMTITLE',"")) 10 | print("Received the following message from the remediation action definition: "+ os.getenv("DATA_ACTION_VALUE_MESSAGE", "NO MESSAGE")) 11 | print("This output will be part of the Dynatrace Problem Comment.") 12 | print("You can even pass links via markdown: [Click me](https://www.keptn.sh)") 13 | 14 | # Following are some more examples on environment variables 15 | # print("I also have some env variables, e.g: PID=" + os.getenv('DATA_PROBLEM_PID', "") + ", SHKEPTNCONTEXT=" + os.getenv('SHKEPTNCONTEXT', "")) 16 | # print("SOURCE=" + os.getenv('DATA_SOURCE',"")) 17 | # print("PROJECT=" + os.getenv('DATA_PROJECT',"")) 18 | # print("PROBLEMTITLE=" + os.getenv('DATA_PROBLEM_PROBLEMTITLE',"")) 19 | -------------------------------------------------------------------------------- /keptn_project_templates/auto-remediation/generic-executor/action.triggered.secondaction.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "This is the action handler for action $DATA_ACTION_ACTION. Full action event available at $1" 4 | echo "-------------------------------------------------------------------" 5 | echo "Here some more context for our action: \$PID=${DATA_PROBLEM_PID}, \$SHKEPTNCONTEXT=$SHKEPTNCONTEXT, \$SOURCE=$SOURCE, \$PROJECT=$DATA_PROJECT, \$SERVICE=$DATA_SERVICE, \$STAGE=$DATA_STAGE" 6 | echo "Lets do some something against problem $DATA_PROBLEM_PROBLEMTITLE..." -------------------------------------------------------------------------------- /keptn_project_templates/auto-remediation/generic-executor/action.triggered.validatedns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "This script gets called for the remediation action: $DATA_ACTION_ACTION for PID=$DATA_PROBLEM_PID ($DATA_PROBLEM_PROBLEMTITLE)" 4 | echo "Full action event available at $1" 5 | echo "-------------------------------------------------------------------" 6 | echo "Here some more context for our action: \$PID=${DATA_PROBLEM_PID}, \$SHKEPTNCONTEXT=$SHKEPTNCONTEXT, \$SOURCE=$SOURCE, \$PROJECT=$DATA_PROJECT, \$SERVICE=$DATA_SERVICE, \$STAGE=$DATA_STAGE" 7 | echo "Lets do some something against problem $DATA_PROBLEM_PROBLEMTITLE..." -------------------------------------------------------------------------------- /keptn_project_templates/auto-remediation/service_default/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/auto-remediation/service_default/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/auto-remediation/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "spec.keptn.sh/0.2.0" 2 | kind: "Shipyard" 3 | metadata: 4 | name: "shipyard-auto-remediation" 5 | spec: 6 | stages: 7 | - name: "production" 8 | sequences: 9 | - name: "remediation" 10 | triggeredOn: 11 | - event: "production.remediation.finished" 12 | selector: 13 | match: 14 | evaluation.result: "fail" 15 | tasks: 16 | - name: "get-action" 17 | - name: "action" 18 | - name: "evaluation" 19 | triggeredAfter: "5m" 20 | properties: 21 | timeframe: "5m" -------------------------------------------------------------------------------- /keptn_project_templates/auto-remediation/stage_production/default/remediation.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: spec.keptn.sh/0.1.4 2 | kind: Remediation 3 | metadata: 4 | name: dynatrace-demo-remediation 5 | spec: 6 | remediations: 7 | - problemType: Simulated Power outage 8 | actionsOnOpen: 9 | - name: Handle Power Outage 10 | action: poweroutageaction 11 | description: In a power outage scenario we make sure nobody dripped on a cable 12 | value: 13 | Message: Please make sure nobody dripped on a cable! 14 | - name: Escalate 15 | action: escalate 16 | description: Escalate to somebody that knows how to fix this 17 | value: 18 | Message: We are having a power outage!! 19 | - problemType: Critical Performance Issue 20 | actionsOnOpen: 21 | - name: We escalate performance issues right away 22 | action: escalate 23 | description: Lets escalate performance issues for now 24 | value: 25 | Message: Help Us! We have a critical performance issue! 26 | - problemType: Browser monitor global outage 27 | actionsOnOpen: 28 | - name: Validate DNS entries 29 | action: validatedns 30 | description: In a global outage we first validate if DNS is the problem 31 | - name: Escalate 32 | action: escalate 33 | description: Escalate to humans in case DNS wasnt the issue 34 | value: 35 | Message: Global outage not caused by DNS 36 | - problemType: default 37 | actionsOnOpen: 38 | - name: Our First Action 39 | action: firstaction 40 | description: This is the first remediation action triggered for any type of problem 41 | value: 42 | CustomKey1: customValue1 43 | CustomKey2: customValue2 44 | - name: Our Second Action 45 | action: secondaction 46 | description: This is the second remediation action triggered for any type of problem 47 | value: 48 | CustomKey1: customValue1 49 | CustomKey2: customValue2 50 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | attachRules: 4 | tagRule: 5 | - meTypes: 6 | - PROCESS_GROUP_INSTANCE 7 | tags: 8 | - context: CONTEXTLESS 9 | key: keptn_project 10 | value: $PROJECT 11 | - context: CONTEXTLESS 12 | key: keptn_service 13 | value: $SERVICE 14 | - context: CONTEXTLESS 15 | key: keptn_stage 16 | value: $STAGE -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/dynatrace/monaco.conf.yaml: -------------------------------------------------------------------------------- 1 | projects: 2 | - coreconfig -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/generic-executor/validate.triggered.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is a script that will be executed by the Keptn Generic Executor Service 4 | # It will be called with a couple of enviornment variables that are filled with Keptn Event Details, Env-Variables from the Service container as well as labels 5 | 6 | if [[ "$DATA_VALIDATE_WAITTIME" == "" ]]; then 7 | DATA_VALIDATE_WAITTIME="10s" 8 | fi 9 | 10 | echo "Validate Triggered Script for $DATA_PROJECT.$DATA_STAGE.$DATA_SERVICE" 11 | echo "We are simply waiting for the passed time: $DATA_VALIDATE_WAITTIME" 12 | 13 | sleep "$DATA_VALIDATE_WAITTIME" 14 | 15 | if [[ "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" != "" ]]; then 16 | echo "And now we validate whether we can reach the deployment Url: $DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" 17 | wget "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" -q -O /dev/null 18 | 19 | if [[ "$?" != "0" ]]; then 20 | echo "wget returned $? - we retry once more!" 21 | sleep "$DATA_VALIDATE_WAITTIME" 22 | echo "Second attempt to validate deployment Url: $DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" 23 | wget "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" -q -O /dev/null 24 | 25 | echo "wget returned $?" 26 | fi 27 | fi -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/jmeter/jmeter.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: canarywait 5 | vuser: 1 6 | loopcount: 5 7 | thinktime: 250 8 | acceptederrorrate: 1.0 9 | script: jmeter/basiccheck.jmx 10 | - teststrategy: performance 11 | vuser: 10 12 | loopcount: 100 13 | thinktime: 250 14 | acceptederrorrate: 1.0 15 | script: jmeter/load.jmx -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/job/job.config: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | actions: 3 | - name: "Validate Deployment using a Python Script" 4 | events: 5 | - name: "sh.keptn.event.deployment.triggered" 6 | tasks: 7 | - name: "Run bash script" 8 | files: 9 | - /job/validate.triggered.py 10 | env: 11 | - name: SHKEPTNCONTEXT 12 | value: "$.shkeptncontext" 13 | valueFrom: event 14 | - name: SOURCE 15 | value: "$.source" 16 | valueFrom: event 17 | workingDir: "/keptn" 18 | image: "python:3.10" 19 | cmd: ["python3"] 20 | args: ["./job/validate.triggered.py"] -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/job/validate.triggered.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is a script that will be executed by the Keptn Generic Executor Service 4 | # It will be called with a couple of enviornment variables that are filled with Keptn Event Details, Env-Variables from the Service container as well as labels 5 | 6 | if [[ "$DATA_VALIDATE_WAITTIME" == "" ]]; then 7 | DATA_VALIDATE_WAITTIME="10s" 8 | fi 9 | 10 | echo "Validate Triggered Script for $DATA_PROJECT.$DATA_STAGE.$DATA_SERVICE" 11 | echo "We are simply waiting for the passed time: $DATA_VALIDATE_WAITTIME" 12 | 13 | sleep "$DATA_VALIDATE_WAITTIME" 14 | 15 | if [[ "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" != "" ]]; then 16 | echo "And now we validate whether we can reach the deployment Url: $DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" 17 | wget "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" -q -O /dev/null 18 | 19 | if [[ "$?" != "0" ]]; then 20 | echo "wget returned $? - we retry once more!" 21 | sleep "$DATA_VALIDATE_WAITTIME" 22 | echo "Second attempt to validate deployment Url: $DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" 23 | wget "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" -q -O /dev/null 24 | 25 | echo "wget returned $?" 26 | fi 27 | fi -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/prod.deployment.triggered.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "sh.keptn.event.prod.delivery.triggered", 3 | "shkeptnspecversion": "0.2.0", 4 | "specversion": "1.0", 5 | "source": "triggered-via-api", 6 | "contenttype": "application/json", 7 | "data": { 8 | "project": "delivery-rollout", 9 | "stage": "prod", 10 | "service": "simplenode", 11 | "labels": { 12 | "deployWith": "ArgoRollout", 13 | "buildId": "1.0.0", 14 | "owner": "Andi" 15 | }, 16 | "configurationChange": { 17 | "values": { 18 | "image": "docker.io/grabnerandi/simplenodeservice:1.0.0" 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/readme.md: -------------------------------------------------------------------------------- 1 | # Delivery Rollout Example 2 | 3 | This example uses Argo Rollouts for canary deployments of the simplenode node.js based microservice 4 | 5 | To onboard this project to your Keptn you can call 6 | 7 | ```console 8 | ./create-keptn-project-from-template.sh delivery-rollout andreas.grabner@dynatrace.com delivery-rollout 9 | ``` 10 | 11 | To trigger a new deployment you can send an event via the Keptn Swagger UI or via Keptn send event using the content of prod.deployment.triggered.json 12 | 13 | ```console 14 | keptn send event -f prod.deployment.triggered.json 15 | ``` -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/service_simplenode/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/delivery-rollout/service_simplenode/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/dynatrace/sli.yaml: -------------------------------------------------------------------------------- 1 | spec_version: '1.0' 2 | indicators: 3 | throughput: "metricSelector=builtin:service.requestCount.total:merge(\"dt.entity.service\"):sum&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 4 | error_rate: "metricSelector=builtin:service.errors.total.rate:merge(\"dt.entity.service\"):avg&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 5 | response_time_p50: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(50)&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 6 | response_time_p90: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(90)&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 7 | response_time_p95: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(95)&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 8 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://simplenode.REPLACE_KEPTN_PROJECT-prod.REPLACE_KEPTN_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/.helmignore: -------------------------------------------------------------------------------- 1 | 2 | # Patterns to ignore when building packages. 3 | # This supports shell glob matching, relative path matching, and 4 | # negation (prefixed with !). Only one pattern per line. 5 | .DS_Store 6 | # Common VCS dirs 7 | .git/ 8 | .gitignore 9 | .bzr/ 10 | .bzrignore 11 | .hg/ 12 | .hgignore 13 | .svn/ 14 | # Common backup files 15 | *.swp 16 | *.bak 17 | *.tmp 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: simplenode 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 6 | appVersion: 1.16.0 7 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/README.md: -------------------------------------------------------------------------------- 1 | # Delivering the example with a canary release using ArgoCD 2 | 3 | ## Install Argo Rollout 4 | 5 | You can install [Argo Rollouts](https://argoproj.github.io/argo-rollouts/concepts/#concepts) to your cluster by following the [documentation](https://argoproj.github.io/argo-rollouts/installation/#installation). 6 | 7 | For your convenience, the installation commands are given below : 8 | 9 | ``` 10 | kubectl create namespace argo-rollouts 11 | kubectl apply -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml 12 | ``` 13 | 14 | You can also install the [Argo Rollouts kubectl plugin](https://argoproj.github.io/argo-rollouts/installation/#kubectl-plugin-installation) : 15 | 16 | ``` 17 | curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64 18 | sudo chmod +x ./kubectl-argo-rollouts-linux-amd64 19 | sudo mv ./kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts 20 | kubectl argo rollouts version 21 | ``` 22 | 23 | ## Create a project 24 | 25 | ``` 26 | kubectl create ns delivery-simplenode-prod 27 | helm install hs-rollout . -n delivery-simplenode-prod 28 | ``` 29 | 30 | ## Find our current rollout with the command line 31 | 32 | ``` 33 | kubectl argo rollouts list rollouts -n delivery-simplenode-prod 34 | ``` 35 | 36 | ## Watch the current rollout on the command line 37 | 38 | ``` 39 | kubectl argo rollouts get rollout simplenode-prod -w -n delivery-simplenode-prod 40 | ``` 41 | 42 | ## Update the release in the values file 43 | 44 | ``` 45 | helm upgrade hs-rollout . -n delivery-simplenode-prod --set image.tag=2.0.0 46 | ``` 47 | 48 | ## Manually promote the rollout after the first canary steps 49 | 50 | ``` 51 | kubectl argo rollouts promote simplenode-prod -n delivery-simplenode-prod 52 | ``` 53 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/command.txt: -------------------------------------------------------------------------------- 1 | 2 | # Helm Service: Create NS and install chart! 3 | kubectl create ns delivery-rollout-prod 4 | helm upgrade --install simplenode . -n delivery-rollout-prod 5 | 6 | # Rollout: Validate that rollouts are listed! 7 | kubectl argo rollouts list rollouts -n delivery-rollout-prod 8 | 9 | # Rollout: Watch rollout status 10 | kubectl argo rollouts get rollout simplenode-prod -n delivery-rollout-prod -w 11 | 12 | 13 | kubectl argo rollouts promote simplenode-prod -n delivery-rollout-prod 14 | 15 | 16 | 17 | 18 | 19 | http://simplenode.delivery-rollout-prod.keptn.keptn08-agrabner.demo.keptn.sh/ 20 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "simplenode.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "simplenode.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "simplenode.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: simplenode-ingress 5 | annotations: 6 | cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | kubernetes.io/ingress.class: nginx 9 | spec: 10 | tls: 11 | - hosts: 12 | - {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 13 | secretName: {{ .Values.ingress.secretName }} 14 | rules: 15 | - host: {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 16 | http: 17 | paths: 18 | - path: / 19 | pathType: Prefix 20 | backend: 21 | service: 22 | name: {{ template "simplenode.fullname" . }} 23 | port: 24 | number: 80 25 | --- 26 | apiVersion: networking.k8s.io/v1 27 | kind: Ingress 28 | metadata: 29 | name: simplenode-preview-ingress 30 | annotations: 31 | cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} 32 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 33 | kubernetes.io/ingress.class: nginx 34 | spec: 35 | tls: 36 | - hosts: 37 | - {{ .Values.keptn.service }}-preview.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 38 | secretName: {{ .Values.ingress.secretName }} 39 | rules: 40 | - host: {{ .Values.keptn.service }}-preview.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 41 | http: 42 | paths: 43 | - path: / 44 | pathType: Prefix 45 | backend: 46 | service: 47 | name: {{ template "simplenode.fullname" . }}-preview 48 | port: 49 | number: 80 50 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: default-view 5 | namespace: {{ .Release.Namespace }} 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: view 10 | subjects: 11 | - kind: ServiceAccount 12 | name: default 13 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "simplenode.fullname" . }} 5 | labels: 6 | app: {{ template "simplenode.name" . }} 7 | chart: {{ template "simplenode.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: 8080 15 | protocol: TCP 16 | name: http 17 | port: 80 18 | type: ClusterIP 19 | selector: 20 | app: {{ template "simplenode.name" . }} 21 | release: {{ .Release.Name }} 22 | --- 23 | apiVersion: v1 24 | kind: Service 25 | metadata: 26 | name: {{ template "simplenode.fullname" . }}-preview 27 | labels: 28 | app: {{ template "simplenode.name" . }} 29 | chart: {{ template "simplenode.chart" . }} 30 | release: {{ .Release.Name }} 31 | heritage: {{ .Release.Service }} 32 | spec: 33 | type: {{ .Values.service.type }} 34 | ports: 35 | - port: {{ .Values.service.port }} 36 | targetPort: 8080 37 | protocol: TCP 38 | name: http 39 | port: 80 40 | selector: 41 | app: {{ template "simplenode.name" . }} 42 | release: {{ .Release.Name }} -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/helm/simplenode/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 5 6 | 7 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_INGRESS 14 | 15 | service: 16 | name: simplenode 17 | stage: prod 18 | type: ClusterIP 19 | port: 8080 20 | 21 | resources: {} 22 | # We usually recommend not to specify default resources and to leave this as a conscious 23 | # choice for the user. This also increases chances charts run on environments with little 24 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 25 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 26 | # limits: 27 | # cpu: 100m 28 | # memory: 128Mi 29 | # requests: 30 | # cpu: 100m 31 | # memory: 128Mi 32 | 33 | nodeSelector: {} 34 | 35 | tolerations: [] 36 | 37 | affinity: {} 38 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/locust/load.py: -------------------------------------------------------------------------------- 1 | from locust import HttpUser, between, task 2 | import uuid 3 | 4 | class SimpleNodeLocustUser(HttpUser): 5 | wait_time = between(5, 15) 6 | 7 | def on_start(self): 8 | self.script_name = "load.py" 9 | self.test_name = "SimpleNodeLocustUser" 10 | self.userId = str(uuid.uuid4()) 11 | 12 | def setDynatraceHeader(self, stepName): 13 | headerValue = "LSN=" + self.script_name + ";TSN=" + stepName + ";LTN=" + self.test_name + ";VU=" + self.userId 14 | self.client.headers = { "x-dynatrace-test" : headerValue } 15 | 16 | @task 17 | def index(self): 18 | self.setDynatraceHeader("Home") 19 | self.client.get("/") 20 | 21 | @task(3) 22 | def get_invoke(self): 23 | self.setDynatraceHeader("Invoke") 24 | self.client.get("/api/invoke?url=https://www.keptn.sh") 25 | 26 | @task 27 | def get_echo(self): 28 | self.setDynatraceHeader("Echo") 29 | self.client.get("/api/echo?text=my echo text from locust") 30 | 31 | @task 32 | def get_version(self): 33 | self.setDynatraceHeader("Version") 34 | self.client.get("/api/version") -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/locust/locust.conf: -------------------------------------------------------------------------------- 1 | locustfile = /locust/load.py 2 | headless = true 3 | users = 10 4 | run-time = 5m -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/locust/locust.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance 5 | script: /locust/load.py 6 | conf: /locust/locust.conf -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_prod/simplenode/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<600" 12 | warning: 13 | - criteria: 14 | - "<=800" 15 | - sli: throughput 16 | - sli: error_rate 17 | weight: 2 18 | pass: 19 | - criteria: 20 | - "<=1%" 21 | warning: 22 | - criteria: 23 | - "<=2%" 24 | - sli: response_time_p50 25 | - sli: response_time_p90 26 | pass: 27 | - criteria: 28 | - "<=500" 29 | warning: 30 | - criteria: 31 | - "<=600" 32 | total_score: 33 | pass: "90%" 34 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/dynatrace/projects/coreconfig/auto-tag/keptn-tagging.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "valueFormat": "{ProcessGroup:Environment:{{ .name }}}", 8 | "propagationTypes": [ 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "PROCESS_GROUP_CUSTOM_METADATA", 15 | "dynamicKey": { 16 | "source": "ENVIRONMENT", 17 | "key": "{{ .name }}" 18 | }, 19 | "type": "PROCESS_CUSTOM_METADATA_KEY" 20 | }, 21 | "comparisonInfo": { 22 | "type": "STRING", 23 | "operator": "EXISTS", 24 | "value": null, 25 | "negate": false, 26 | "caseSensitive": null 27 | } 28 | } 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/dynatrace/projects/coreconfig/auto-tag/tagging.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - keptn-stage-tag: "keptn-tagging.json" 3 | - keptn-service-tag: "keptn-tagging.json" 4 | - keptn-project-tag: "keptn-tagging.json" 5 | - keptn-deployment-tag: "keptn-tagging.json" 6 | 7 | keptn-stage-tag: 8 | - name: "keptn_stage" 9 | 10 | keptn-service-tag: 11 | - name: "keptn_service" 12 | 13 | keptn-project-tag: 14 | - name: "keptn_project" 15 | 16 | keptn-deployment-tag: 17 | - name: "keptn_deployment" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/dynatrace/sli.yaml: -------------------------------------------------------------------------------- 1 | spec_version: '1.0' 2 | indicators: 3 | throughput: "metricSelector=builtin:service.requestCount.total:merge(\"dt.entity.service\"):sum&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 4 | error_rate: "metricSelector=builtin:service.errors.total.rate:merge(\"dt.entity.service\"):avg&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 5 | response_time_p50: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(50)&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 6 | response_time_p90: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(90)&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 7 | response_time_p95: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(95)&entitySelector=type(SERVICE),tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE)" 8 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://simplenode.REPLACE_KEPTN_PROJECT-staging.REPLACE_KEPTN_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/.helmignore: -------------------------------------------------------------------------------- 1 | 2 | # Patterns to ignore when building packages. 3 | # This supports shell glob matching, relative path matching, and 4 | # negation (prefixed with !). Only one pattern per line. 5 | .DS_Store 6 | # Common VCS dirs 7 | .git/ 8 | .gitignore 9 | .bzr/ 10 | .bzrignore 11 | .hg/ 12 | .hgignore 13 | .svn/ 14 | # Common backup files 15 | *.swp 16 | *.bak 17 | *.tmp 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: simplenode 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 6 | appVersion: 1.16.0 7 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/README.md: -------------------------------------------------------------------------------- 1 | # Delivering the example with a canary release using ArgoCD 2 | 3 | ## Install Argo Rollout 4 | 5 | You can install [Argo Rollouts](https://argoproj.github.io/argo-rollouts/concepts/#concepts) to your cluster by following the [documentation](https://argoproj.github.io/argo-rollouts/installation/#installation). 6 | 7 | For your convenience, the installation commands are given below : 8 | 9 | ``` 10 | kubectl create namespace argo-rollouts 11 | kubectl apply -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml 12 | ``` 13 | 14 | You can also install the [Argo Rollouts kubectl plugin](https://argoproj.github.io/argo-rollouts/installation/#kubectl-plugin-installation) : 15 | 16 | ``` 17 | curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64 18 | sudo chmod +x ./kubectl-argo-rollouts-linux-amd64 19 | sudo mv ./kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts 20 | kubectl argo rollouts version 21 | ``` 22 | 23 | ## Create a project 24 | 25 | ``` 26 | kubectl create ns delivery-simplenode-prod 27 | helm install hs-rollout . -n delivery-simplenode-prod 28 | ``` 29 | 30 | ## Find our current rollout with the command line 31 | 32 | ``` 33 | kubectl argo rollouts list rollouts -n delivery-simplenode-prod 34 | ``` 35 | 36 | ## Watch the current rollout on the command line 37 | 38 | ``` 39 | kubectl argo rollouts get rollout simplenode-prod -w -n delivery-simplenode-prod 40 | ``` 41 | 42 | ## Update the release in the values file 43 | 44 | ``` 45 | helm upgrade hs-rollout . -n delivery-simplenode-prod --set image.tag=2.0.0 46 | ``` 47 | 48 | ## Manually promote the rollout after the first canary steps 49 | 50 | ``` 51 | kubectl argo rollouts promote simplenode-prod -n delivery-simplenode-prod 52 | ``` 53 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/command.txt: -------------------------------------------------------------------------------- 1 | 2 | # Helm Service: Create NS and install chart! 3 | kubectl create ns delivery-rollout-prod 4 | helm upgrade --install simplenode . -n delivery-rollout-prod 5 | 6 | # Rollout: Validate that rollouts are listed! 7 | kubectl argo rollouts list rollouts -n delivery-rollout-prod 8 | 9 | # Rollout: Watch rollout status 10 | kubectl argo rollouts get rollout simplenode-prod -n delivery-rollout-prod -w 11 | 12 | 13 | kubectl argo rollouts promote simplenode-prod -n delivery-rollout-prod 14 | 15 | 16 | 17 | 18 | 19 | http://simplenode.delivery-rollout-prod.keptn.keptn08-agrabner.demo.keptn.sh/ 20 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "simplenode.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "simplenode.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "simplenode.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: simplenode-ingress 5 | annotations: 6 | cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | kubernetes.io/ingress.class: nginx 9 | spec: 10 | tls: 11 | - hosts: 12 | - {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 13 | secretName: {{ .Values.ingress.secretName }} 14 | rules: 15 | - host: {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 16 | http: 17 | paths: 18 | - path: / 19 | pathType: Prefix 20 | backend: 21 | service: 22 | name: {{ template "simplenode.fullname" . }} 23 | port: 24 | number: 80 25 | --- 26 | apiVersion: networking.k8s.io/v1 27 | kind: Ingress 28 | metadata: 29 | name: simplenode-preview-ingress 30 | annotations: 31 | cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} 32 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 33 | kubernetes.io/ingress.class: nginx 34 | spec: 35 | tls: 36 | - hosts: 37 | - {{ .Values.keptn.service }}-preview.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 38 | secretName: {{ .Values.ingress.secretName }} 39 | rules: 40 | - host: {{ .Values.keptn.service }}-preview.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 41 | http: 42 | paths: 43 | - path: / 44 | pathType: Prefix 45 | backend: 46 | service: 47 | name: {{ template "simplenode.fullname" . }}-preview 48 | port: 49 | number: 80 50 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: default-view 5 | namespace: {{ .Release.Namespace }} 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: view 10 | subjects: 11 | - kind: ServiceAccount 12 | name: default 13 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "simplenode.fullname" . }} 5 | labels: 6 | app: {{ template "simplenode.name" . }} 7 | chart: {{ template "simplenode.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: 8080 15 | protocol: TCP 16 | name: http 17 | port: 80 18 | type: ClusterIP 19 | selector: 20 | app: {{ template "simplenode.name" . }} 21 | release: {{ .Release.Name }} 22 | --- 23 | apiVersion: v1 24 | kind: Service 25 | metadata: 26 | name: {{ template "simplenode.fullname" . }}-preview 27 | labels: 28 | app: {{ template "simplenode.name" . }} 29 | chart: {{ template "simplenode.chart" . }} 30 | release: {{ .Release.Name }} 31 | heritage: {{ .Release.Service }} 32 | spec: 33 | type: {{ .Values.service.type }} 34 | ports: 35 | - port: {{ .Values.service.port }} 36 | targetPort: 8080 37 | protocol: TCP 38 | name: http 39 | port: 80 40 | selector: 41 | app: {{ template "simplenode.name" . }} 42 | release: {{ .Release.Name }} -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/helm/simplenode/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_INGRESS 14 | 15 | service: 16 | name: simplenode 17 | stage: staging 18 | type: ClusterIP 19 | port: 8080 20 | 21 | resources: {} 22 | # We usually recommend not to specify default resources and to leave this as a conscious 23 | # choice for the user. This also increases chances charts run on environments with little 24 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 25 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 26 | # limits: 27 | # cpu: 100m 28 | # memory: 128Mi 29 | # requests: 30 | # cpu: 100m 31 | # memory: 128Mi 32 | 33 | nodeSelector: {} 34 | 35 | tolerations: [] 36 | 37 | affinity: {} 38 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/locust/load.py: -------------------------------------------------------------------------------- 1 | from locust import HttpUser, between, task 2 | import uuid 3 | 4 | class SimpleNodeLocustUser(HttpUser): 5 | wait_time = between(5, 15) 6 | 7 | def on_start(self): 8 | self.script_name = "load.py" 9 | self.test_name = "SimpleNodeLocustUser" 10 | self.userId = str(uuid.uuid4()) 11 | 12 | def setDynatraceHeader(self, stepName): 13 | headerValue = "LSN=" + self.script_name + ";TSN=" + stepName + ";LTN=" + self.test_name + ";VU=" + self.userId 14 | self.client.headers = { "x-dynatrace-test" : headerValue } 15 | 16 | @task 17 | def index(self): 18 | self.setDynatraceHeader("Home") 19 | self.client.get("/") 20 | 21 | @task(3) 22 | def get_invoke(self): 23 | self.setDynatraceHeader("Invoke") 24 | self.client.get("/api/invoke?url=https://www.keptn.sh") 25 | 26 | @task 27 | def get_echo(self): 28 | self.setDynatraceHeader("Echo") 29 | self.client.get("/api/echo?text=my echo text from locust") 30 | 31 | @task 32 | def get_version(self): 33 | self.setDynatraceHeader("Version") 34 | self.client.get("/api/version") -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/locust/locust.conf: -------------------------------------------------------------------------------- 1 | locustfile = /locust/load.py 2 | headless = true 3 | users = 10 4 | run-time = 5m -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/locust/locust.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance 5 | script: /locust/load.py 6 | conf: /locust/locust.conf -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/stage_staging/simplenode/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<600" 12 | warning: 13 | - criteria: 14 | - "<=800" 15 | - sli: throughput 16 | - sli: error_rate 17 | weight: 2 18 | pass: 19 | - criteria: 20 | - "<=1%" 21 | warning: 22 | - criteria: 23 | - "<=2%" 24 | - sli: response_time_p50 25 | - sli: response_time_p90 26 | pass: 27 | - criteria: 28 | - "<=500" 29 | warning: 30 | - criteria: 31 | - "<=600" 32 | total_score: 33 | pass: "90%" 34 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/staging.deployment.triggered.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "sh.keptn.event.staging.delivery.triggered", 3 | "shkeptnspecversion": "0.2.0", 4 | "specversion": "1.0", 5 | "source": "triggered-via-api", 6 | "contenttype": "application/json", 7 | "data": { 8 | "project": "REPLACE_KEPTN_PROJECT", 9 | "stage": "staging", 10 | "service": "simplenode", 11 | "labels": { 12 | "deployWith": "ArgoRollout", 13 | "buildId": "1.0.0", 14 | "owner": "Andi" 15 | }, 16 | "configurationChange": { 17 | "values": { 18 | "image": "docker.io/grabnerandi/simplenodeservice:1.0.0" 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /keptn_project_templates/delivery-rollout/viewsimplenodeapp.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 16 | 17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | dashboard: query 4 | attachRules: 5 | tagRule: 6 | - meTypes: 7 | - PROCESS_GROUP_INSTANCE 8 | tags: 9 | - context: CONTEXTLESS 10 | key: keptn_project 11 | value: $PROJECT 12 | - context: CONTEXTLESS 13 | key: keptn_service 14 | value: $SERVICE 15 | - context: CONTEXTLESS 16 | key: keptn_stage 17 | value: $STAGE -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/dynatrace/monaco.conf.yaml: -------------------------------------------------------------------------------- 1 | projects: 2 | - simplenode -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/jmeter/jmeter.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance_long 5 | vuser: 10 6 | loopcount: 2000 7 | thinktime: 250 8 | acceptederrorrate: 1.0 9 | script: jmeter/load.jmx 10 | - teststrategy: performance_100 11 | vuser: 100 12 | loopcount: 10 13 | thinktime: 250 14 | acceptederrorrate: 1.0 15 | script: jmeter/load.jmx 16 | - teststrategy: performance_50 17 | vuser: 50 18 | loopcount: 10 19 | thinktime: 250 20 | acceptederrorrate: 1.0 21 | script: jmeter/load.jmx 22 | - teststrategy: performance_10 23 | vuser: 50 24 | loopcount: 10 25 | thinktime: 250 26 | acceptederrorrate: 1.0 27 | script: jmeter/load.jmx 28 | - teststrategy: performance_quick 29 | vuser: 10 30 | loopcount: 100 31 | thinktime: 250 32 | acceptederrorrate: 1.0 33 | script: jmeter/load.jmx 34 | - teststrategy: performance_peak 35 | vuser: 10 36 | loopcount: 500 37 | thinktime: 250 38 | acceptederrorrate: 1.0 39 | script: jmeter/load.jmx 40 | - teststrategy: performance 41 | vuser: 10 42 | loopcount: 100 43 | thinktime: 250 44 | acceptederrorrate: 1.0 45 | script: jmeter/load.jmx -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/service_simplenode/charts/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | description: A Helm chart for Keptn 3 | name: keptn 4 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/service_simplenode/charts/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: default-view 5 | namespace: {{ .Release.Namespace }} 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: view 10 | subjects: 11 | - kind: ServiceAccount 12 | name: default 13 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/service_simplenode/charts/templates/services.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: simplenode 6 | spec: 7 | type: ClusterIP 8 | ports: 9 | - name: http 10 | port: 80 11 | protocol: TCP 12 | targetPort: 8080 13 | selector: 14 | app: simplenode -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/service_simplenode/charts/values.yaml: -------------------------------------------------------------------------------- 1 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 2 | replicaCount: 1 -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/service_simplenode/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/delivery-simplenode/service_simplenode/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: spec.keptn.sh/0.2.0 2 | kind: Shipyard 3 | metadata: 4 | name: "shipyard-delivery-simplenode" 5 | spec: 6 | stages: 7 | - name: dev 8 | sequences: 9 | - name: delivery 10 | tasks: 11 | - name: deployment 12 | properties: 13 | deploymentstrategy: direct 14 | - name: test 15 | properties: 16 | teststrategy: functional 17 | - name: evaluation 18 | - name: release 19 | - name: approval 20 | properties: 21 | pass: automatic 22 | warning: automatic 23 | - name: staging 24 | sequences: 25 | - name: delivery 26 | triggeredOn: 27 | - event: dev.delivery.finished 28 | tasks: 29 | - name: monaco 30 | - name: deployment 31 | properties: 32 | deploymentstrategy: direct 33 | - name: test 34 | properties: 35 | teststrategy: performance 36 | - name: evaluation 37 | - name: release 38 | - name: approval 39 | properties: 40 | pass: manual 41 | warning: manual 42 | - name: rollback 43 | triggeredOn: 44 | - event: staging.delivery.finished 45 | selector: 46 | match: 47 | result: "fail" 48 | tasks: 49 | - name: rollback 50 | - name: production 51 | sequences: 52 | - name: delivery 53 | triggeredOn: 54 | - event: staging.delivery.finished 55 | tasks: 56 | - name: monaco 57 | - name: deployment 58 | properties: 59 | deploymentstrategy: blue_green_service 60 | - name: test 61 | properties: 62 | teststrategy: performance 63 | - name: evaluation 64 | - name: release 65 | - name: rollback 66 | triggeredOn: 67 | - event: production.delivery.finished 68 | selector: 69 | match: 70 | result: "fail" 71 | tasks: 72 | - name: rollback -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/dashboard/qualitygatedb.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - staging_qualitygate_db: "qualitygatedb.json" 3 | 4 | staging_qualitygate_db: 5 | - owner: "REPLACE_OWNER_EMAIL" 6 | - keptnbridge: "http://REPLACE_KEPTN_BRIDGE/bridge" 7 | - name: "KQG;project={{ .Env.KEPTN_PROJECT }};service={{ .Env.KEPTN_SERVICE }};stage={{ .Env.KEPTN_STAGE }}" 8 | - project: "{{ .Env.KEPTN_PROJECT }}" 9 | - stage: "{{ .Env.KEPTN_STAGE }}" 10 | - service: "{{ .Env.KEPTN_SERVICE }}" 11 | - mzId: "{{ .Env.KEPTN_SERVICE }}/management-zone/management-zone-keptn-project-stage.id" 12 | - mzName: "{{ .Env.KEPTN_SERVICE }}/management-zone/management-zone-keptn-project-stage.name" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/management-zone/keptn-mz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "propagationTypes": [], 8 | "conditions": [ 9 | { 10 | "key": { 11 | "attribute": "SERVICE_TAGS" 12 | }, 13 | "comparisonInfo": { 14 | "type": "TAG", 15 | "operator": "EQUALS", 16 | "value": { 17 | "context": "CONTEXTLESS", 18 | "key": "keptn_project", 19 | "value": "{{ .project }}" 20 | }, 21 | "negate": false 22 | } 23 | }, 24 | { 25 | "key": { 26 | "attribute": "SERVICE_TAGS" 27 | }, 28 | "comparisonInfo": { 29 | "type": "TAG", 30 | "operator": "EQUALS", 31 | "value": { 32 | "context": "CONTEXTLESS", 33 | "key": "keptn_stage", 34 | "value": "{{ .stage }}" 35 | }, 36 | "negate": false 37 | } 38 | } 39 | ] 40 | } 41 | ], 42 | "dimensionalRules": [] 43 | } 44 | 45 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/management-zone/keptn-mz.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - management-zone-keptn-project-stage: "keptn-mz.json" 3 | 4 | management-zone-keptn-project-stage: 5 | - name: "Keptn: {{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_STAGE }}" 6 | - project: "{{ .Env.KEPTN_PROJECT }}" 7 | - stage: "{{ .Env.KEPTN_STAGE }}" 8 | - service: "{{ .Env.KEPTN_SERVICE }}" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/synthetic-monitor/synthetic.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - synthetic_http_prod_check: "synthetic_http.json" 3 | - synthetic_browser_prod_check: "synthetic_browser.json" 4 | 5 | synthetic_http_prod_check: 6 | - name: "HTTP Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 7 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} HTTP Check" 8 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_INGRESS" 9 | - project: "{{ .Env.KEPTN_PROJECT }}" 10 | - stage: "{{ .Env.KEPTN_STAGE }}" 11 | - service: "{{ .Env.KEPTN_SERVICE }}" 12 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC 13 | 14 | synthetic_browser_prod_check: 15 | - name: "Browser Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 16 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} Browser Check" 17 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_INGRESS" 18 | - project: "{{ .Env.KEPTN_PROJECT }}" 19 | - stage: "{{ .Env.KEPTN_STAGE }}" 20 | - service: "{{ .Env.KEPTN_SERVICE }}" 21 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/synthetic-monitor/synthetic_browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "frequencyMin": 5, 4 | "enabled": true, 5 | "type": "BROWSER", 6 | "createdFrom": "GUI", 7 | "script": { 8 | "type": "clickpath", 9 | "version": "1.0", 10 | "configuration": { 11 | "device": { 12 | "deviceName": "Desktop", 13 | "orientation": "landscape" 14 | } 15 | }, 16 | "events": [ 17 | { 18 | "type": "navigate", 19 | "description": "Loading of Simplenode Homepage", 20 | "url": "{{ .url }}", 21 | "wait": { 22 | "waitFor": "page_complete" 23 | } 24 | }, 25 | { 26 | "type": "click", 27 | "description": "Click on Invoke", 28 | "target": { 29 | "locators": [ 30 | { 31 | "type": "css", 32 | "value": "#Invoke" 33 | } 34 | ] 35 | }, 36 | "button": 0 37 | } 38 | ] 39 | }, 40 | "locations": [ 41 | "{{ .location }}" 42 | ], 43 | "anomalyDetection": { 44 | "outageHandling": { 45 | "globalOutage": true, 46 | "localOutage": false, 47 | "localOutagePolicy": { 48 | "affectedLocations": null, 49 | "consecutiveRuns": null 50 | }, 51 | "retryOnError": true 52 | }, 53 | "loadingTimeThresholds": { 54 | "enabled": false, 55 | "thresholds": [] 56 | } 57 | }, 58 | "tags": [ 59 | { "context" : "CONTEXTLESS", "key" : "{{ .project }}"}, 60 | { "context" : "CONTEXTLESS", "key" : "{{ .service }}"}, 61 | { "context" : "CONTEXTLESS", "key" : "{{ .stage }}"} 62 | ], 63 | "managementZones": [], 64 | "automaticallyAssignedApps": [ 65 | ], 66 | "manuallyAssignedApps": [ 67 | ], 68 | "keyPerformanceMetrics": { 69 | "loadActionKpm": "VISUALLY_COMPLETE", 70 | "xhrActionKpm": "VISUALLY_COMPLETE" 71 | }, 72 | "events": [ 73 | ] 74 | } -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/synthetic-monitor/synthetic_http.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "frequencyMin": 5, 4 | "enabled": true, 5 | "type": "HTTP", 6 | "createdFrom": "GUI", 7 | "script": { 8 | "version": "1.0", 9 | "requests": [ 10 | { 11 | "description": "{{ .description }}", 12 | "url": "{{ .url }}", 13 | "method": "GET", 14 | "validation": { 15 | "rules": [ 16 | { 17 | "value": ">=400", 18 | "passIfFound": false, 19 | "type": "httpStatusesList" 20 | } 21 | ], 22 | "rulesChaining": "or" 23 | }, 24 | "configuration": { 25 | "acceptAnyCertificate": true, 26 | "followRedirects": true 27 | } 28 | } 29 | ] 30 | }, 31 | "locations": [ 32 | "{{ .location }}" 33 | ], 34 | "anomalyDetection": { 35 | "outageHandling": { 36 | "globalOutage": true, 37 | "localOutage": false, 38 | "localOutagePolicy": { 39 | "affectedLocations": 1, 40 | "consecutiveRuns": 3 41 | } 42 | }, 43 | "loadingTimeThresholds": { 44 | "enabled": false, 45 | "thresholds": [ 46 | { 47 | "type": "TOTAL", 48 | "valueMs": 0 49 | } 50 | ] 51 | } 52 | }, 53 | "tags": [ 54 | { "context" : "CONTEXTLESS", "key" : "{{ .project }}"}, 55 | { "context" : "CONTEXTLESS", "key" : "{{ .service }}"}, 56 | { "context" : "CONTEXTLESS", "key" : "{{ .stage }}"} 57 | ], 58 | "managementZones": [], 59 | "automaticallyAssignedApps": [], 60 | "manuallyAssignedApps": [], 61 | "requests": [ 62 | { 63 | "name": "{{ .description }}", 64 | "sequenceNumber": 1 65 | } 66 | ] 67 | } -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_production/simplenode/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<600" 12 | warning: 13 | - criteria: 14 | - "<=800" 15 | - sli: throughput 16 | pass: 17 | - criteria: 18 | - ">4000" 19 | - sli: error_rate 20 | weight: 2 21 | pass: 22 | - criteria: 23 | - "<=1%" 24 | warning: 25 | - criteria: 26 | - "<=2%" 27 | - sli: response_time_p50 28 | - sli: response_time_p90 29 | pass: 30 | - criteria: 31 | - "<=500" 32 | warning: 33 | - criteria: 34 | - "<=600" 35 | total_score: 36 | pass: "90%" 37 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_staging/simplenode/dynatrace/projects/simplenode/dashboard/qualitygatedb.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - staging_qualitygate_db: "qualitygatedb.json" 3 | 4 | staging_qualitygate_db: 5 | - owner: "REPLACE_OWNER_EMAIL" 6 | - keptnbridge: "http://REPLACE_KEPTN_BRIDGE/bridge" 7 | - name: "KQG;project={{ .Env.KEPTN_PROJECT }};service={{ .Env.KEPTN_SERVICE }};stage={{ .Env.KEPTN_STAGE }}" 8 | - project: "{{ .Env.KEPTN_PROJECT }}" 9 | - stage: "{{ .Env.KEPTN_STAGE }}" 10 | - service: "{{ .Env.KEPTN_SERVICE }}" 11 | - mzId: "{{ .Env.KEPTN_SERVICE }}/management-zone/management-zone-keptn-project-stage.id" 12 | - mzName: "{{ .Env.KEPTN_SERVICE }}/management-zone/management-zone-keptn-project-stage.name" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_staging/simplenode/dynatrace/projects/simplenode/management-zone/keptn-mz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "propagationTypes": [], 8 | "conditions": [ 9 | { 10 | "key": { 11 | "attribute": "SERVICE_TAGS" 12 | }, 13 | "comparisonInfo": { 14 | "type": "TAG", 15 | "operator": "EQUALS", 16 | "value": { 17 | "context": "CONTEXTLESS", 18 | "key": "keptn_project", 19 | "value": "{{ .project }}" 20 | }, 21 | "negate": false 22 | } 23 | }, 24 | { 25 | "key": { 26 | "attribute": "SERVICE_TAGS" 27 | }, 28 | "comparisonInfo": { 29 | "type": "TAG", 30 | "operator": "EQUALS", 31 | "value": { 32 | "context": "CONTEXTLESS", 33 | "key": "keptn_stage", 34 | "value": "{{ .stage }}" 35 | }, 36 | "negate": false 37 | } 38 | } 39 | ] 40 | } 41 | ], 42 | "dimensionalRules": [] 43 | } 44 | 45 | -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_staging/simplenode/dynatrace/projects/simplenode/management-zone/keptn-mz.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - management-zone-keptn-project-stage: "keptn-mz.json" 3 | 4 | management-zone-keptn-project-stage: 5 | - name: "Keptn: {{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_STAGE }}" 6 | - project: "{{ .Env.KEPTN_PROJECT }}" 7 | - stage: "{{ .Env.KEPTN_STAGE }}" 8 | - service: "{{ .Env.KEPTN_SERVICE }}" -------------------------------------------------------------------------------- /keptn_project_templates/delivery-simplenode/stage_staging/simplenode/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<600" 12 | warning: 13 | - criteria: 14 | - "<=800" 15 | - sli: throughput 16 | pass: 17 | - criteria: 18 | - ">4000" 19 | - sli: error_rate 20 | weight: 2 21 | pass: 22 | - criteria: 23 | - "<=1%" 24 | warning: 25 | - criteria: 26 | - "<=2%" 27 | - sli: response_time_p50 28 | - sli: response_time_p90 29 | pass: 30 | - criteria: 31 | - "<=500" 32 | warning: 33 | - criteria: 34 | - "<=600" 35 | total_score: 36 | pass: "90%" 37 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/dynatrace-monaco/shipyard.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/dynatrace-monaco/shipyard.yaml -------------------------------------------------------------------------------- /keptn_project_templates/generic-automation/generic-executor/echo.triggered.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is a script that will be executed by the Keptn Generic Executor Service 4 | # It will be called with a couple of enviornment variables that are filled with Keptn Event Details, Env-Variables from the Service container as well as labels 5 | 6 | if [[ "$DATA_ECHO_MESSAGE" == "" ]]; then 7 | DATA_ECHO_MESSAGE="You didnt specify a message. So - I am just saying HI" 8 | fi 9 | 10 | echo "Echo Triggered Script for $DATA_PROJECT.$DATA_STAGE.$DATA_SERVICE" 11 | echo "-----------------------------------------------------------------" 12 | echo "Your message: $DATA_ECHO_MESSAGE" -------------------------------------------------------------------------------- /keptn_project_templates/generic-automation/generic-executor/getjoke.triggered.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is a script that will be executed by the Keptn Generic Executor Service 4 | # It will be called with a couple of enviornment variables that are filled with Keptn Event Details, Env-Variables from the Service container as well as labels 5 | 6 | echo "GetJoke Triggered Script for $DATA_PROJECT.$DATA_STAGE.$DATA_SERVICE" 7 | echo "-----------------------------------------------------------------" 8 | wget -O- "https://official-joke-api.appspot.com/random_joke" -------------------------------------------------------------------------------- /keptn_project_templates/generic-automation/service_default/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/generic-automation/service_default/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/generic-automation/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: spec.keptn.sh/0.2.0 2 | kind: Shipyard 3 | metadata: 4 | name: "shipyard-generic-automation" 5 | spec: 6 | stages: 7 | - name: dev 8 | sequences: 9 | - name: fun 10 | tasks: 11 | - name: getjoke 12 | - name: echo 13 | properties: 14 | message: Hello from your script -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | spec_version: '0.1.0' 2 | dashboard: query 3 | attachRules: 4 | tagRule: 5 | - meTypes: 6 | - SERVICE 7 | tags: 8 | - context: CONTEXTLESS 9 | key: $SERVICE -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/dynatrace/sli.yaml: -------------------------------------------------------------------------------- 1 | spec_version: '1.0' 2 | indicators: 3 | throughput: "metricSelector=builtin:service.requestCount.total:merge(\"dt.entity.service\"):sum&entitySelector=type(SERVICE),tag($SERVICE)" 4 | error_rate: "metricSelector=builtin:service.errors.total.count:merge(\"dt.entity.service\"):avg&entitySelector=type(SERVICE),tag($SERVICE)" 5 | response_time_p50: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(50)&entitySelector=type(SERVICE),tag($SERVICE)" 6 | response_time_p90: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(90)&entitySelector=type(SERVICE),tag($SERVICE)" 7 | response_time_p95: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(95)&entitySelector=type(SERVICE),tag($SERVICE)" 8 | -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/jmeter/jmeter.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance 5 | vuser: 100 6 | loopcount: 500 7 | script: jmeter/basicload.jmx 8 | thinktime: 250 9 | acceptederrorrate: 1.0 10 | - teststrategy: performance_light 11 | vuser: 50 12 | loopcount: 100 13 | thinktime: 250 14 | script: jmeter/basicload.jmx 15 | acceptederrorrate: 1.0 16 | - teststrategy: performance_withdtmint 17 | vuser: 100 18 | loopcount: 500 19 | script: jmeter/basicload_withdtmint.jmx 20 | thinktime: 250 21 | acceptederrorrate: 1.0 22 | - teststrategy: performance_light_withdtmint 23 | vuser: 50 24 | loopcount: 100 25 | thinktime: 250 26 | script: jmeter/basicload_withdtmint.jmx 27 | acceptederrorrate: 1.0 28 | -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/service_appundertest/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/performance-as-selfservice/service_appundertest/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/service_easytravel/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/performance-as-selfservice/service_easytravel/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "spec.keptn.sh/0.2.0" 2 | kind: "Shipyard" 3 | metadata: 4 | name: "shipyard-performance-as-selfservice" 5 | spec: 6 | stages: 7 | - name: "performance" 8 | sequences: 9 | - name: testing 10 | tasks: 11 | - name: test 12 | properties: 13 | teststrategy: performance 14 | - name: evaluation -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/stage_performance/appundertest/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: "1.0" 3 | comparison: 4 | aggregate_function: "avg" 5 | compare_with: "single_result" 6 | include_result_with_score: "pass" 7 | number_of_comparison_results: 1 8 | filter: 9 | objectives: 10 | - sli: "throughput" 11 | - sli: "response_time_p50" 12 | - sli: "response_time_p90" 13 | - sli: "response_time_p95" 14 | key_sli: false 15 | pass: 16 | - criteria: 17 | - "<600" 18 | warning: 19 | - criteria: 20 | - "<=800" 21 | weight: 1 22 | - sli: "error_rate" 23 | key_sli: false 24 | pass: 25 | - criteria: 26 | - "<5" 27 | total_score: 28 | pass: "90%" 29 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/stage_performance/easytravel/jmeter/easytravel-users.txt: -------------------------------------------------------------------------------- 1 | maria,maria 2 | afrida,afrida 3 | agnieszka,agnieszka 4 | aleksandra,aleksandra 5 | alex,alex 6 | amaor,amaor 7 | anna,anna 8 | annelien,annelien 9 | aoi,aoi 10 | armelle,armelle 11 | arrivaldi,arrivaldi 12 | ascon,ascon 13 | assefa,assefa 14 | baisakhi,baisakhi 15 | bankei,bankei 16 | barbara,barbara 17 | baudouin,baudouin 18 | bayu,bayu 19 | bian,bian 20 | carole,carole 21 | cory,cory 22 | daan,daan 23 | daisuke,daisuke 24 | dariusz,dariusz 25 | deepti,deepti 26 | demi,demi 27 | didier,didier 28 | ding,ding 29 | dominik,dominik 30 | donatien,donatien 31 | eduard,eduard 32 | edyta,edyta 33 | eka,eka 34 | fa,fa 35 | fildzhah,fildzhah 36 | geertruida,geertruida 37 | gerdi,gerdi 38 | greta,greta 39 | gretel,gretel 40 | gudrun,gudrun 41 | harihar,harihar 42 | henrik,henrik 43 | herold,herold 44 | himanshu,himanshu 45 | janet,janet 46 | jermaine,jermaine 47 | johanna,johanna 48 | kambiri,kambiri 49 | kenjiro,kenjiro 50 | khadija,khadija 51 | kumiko,kumiko 52 | kusuma,kusuma 53 | lazare,lazare 54 | lena,lena 55 | leng,leng 56 | loren,loren 57 | margarita,margarita 58 | mariusz,mariusz 59 | marlis,marlis 60 | maro,maro 61 | melisent,melisent 62 | mi,mi 63 | michael,michael 64 | monyyak,monyyak 65 | onaedo,onaedo 66 | onesime,onesime 67 | ou,ou 68 | patakin,patakin 69 | philipp,philipp 70 | piotr,piotr 71 | pururava,pururava 72 | qiang,qiang 73 | qiu,qiu 74 | rachel,rachel 75 | rafiki,rafiki 76 | randy,randy 77 | rashida,rashida 78 | rashidi,rashidi 79 | rofiqotul,rofiqotul 80 | roosevelt,roosevelt 81 | rui,rui 82 | sandrine,sandrine 83 | sha,sha 84 | sumi,sumi 85 | suprabha,suprabha 86 | sybylla,sybylla 87 | tami,tami 88 | tanak,tanak 89 | tomasz,tomasz 90 | trishanku,trishanku 91 | tubagus,tubagus 92 | usaku,usaku 93 | valerie,valerie 94 | wilhelmina,wilhelmina 95 | wit,wit 96 | wolfram,wolfram 97 | yasmina,yasmina 98 | yera,yera 99 | yosua,yosua 100 | zara,zara 101 | zarine,zarine 102 | -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/stage_performance/easytravel/jmeter/jmeter.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance 5 | vuser: 10 6 | loopcount: 50 7 | script: jmeter/easytravel-classic-random-book.jmx 8 | thinktime: 250 9 | acceptederrorrate: 1.0 10 | - teststrategy: performance_long 11 | vuser: 10 12 | loopcount: 200 13 | script: jmeter/easytravel-classic-random-book.jmx 14 | thinktime: 250 15 | acceptederrorrate: 1.0 -------------------------------------------------------------------------------- /keptn_project_templates/performance-as-selfservice/stage_performance/easytravel/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: "1.0" 3 | comparison: 4 | aggregate_function: "avg" 5 | compare_with: "single_result" 6 | include_result_with_score: "pass" 7 | number_of_comparison_results: 1 8 | filter: 9 | objectives: 10 | - sli: "throughput" 11 | - sli: "response_time_p50" 12 | - sli: "response_time_p90" 13 | - sli: "response_time_p95" 14 | key_sli: false 15 | pass: 16 | - criteria: 17 | - "<600" 18 | warning: 19 | - criteria: 20 | - "<=800" 21 | weight: 1 22 | - sli: "error_rate" 23 | key_sli: false 24 | pass: 25 | - criteria: 26 | - "<5" 27 | total_score: 28 | pass: "90%" 29 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | attachRules: 4 | tagRule: 5 | - meTypes: 6 | - PROCESS_GROUP_INSTANCE 7 | tags: 8 | - context: KUBERNETES 9 | key: "app.kubernetes.io/part-of" 10 | value: $PROJECT 11 | - context: KUBERNETES 12 | key: "app.kubernetes.io/name" 13 | value: $SERVICE 14 | - context: ENVIRONMENT 15 | key: DT_RELEASE_STAGE 16 | value: $STAGE -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/dynatrace/dynatrace.conf.yaml.default: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | attachRules: 4 | tagRule: 5 | - meTypes: 6 | - PROCESS_GROUP_INSTANCE 7 | tags: 8 | - context: CONTEXTLESS 9 | key: keptn_project 10 | value: $PROJECT 11 | - context: CONTEXTLESS 12 | key: keptn_service 13 | value: $SERVICE 14 | - context: CONTEXTLESS 15 | key: keptn_stage 16 | value: $STAGE -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/dynatrace/monaco.conf.yaml: -------------------------------------------------------------------------------- 1 | projects: 2 | - simplenode -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/service_tnt-XXX-svc/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/prod-delivery-simplenode/service_tnt-XXX-svc/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: spec.keptn.sh/0.2.0 2 | kind: Shipyard 3 | metadata: 4 | name: "two-stage-delivery" 5 | spec: 6 | stages: 7 | - name: staging 8 | sequences: 9 | # delivery: 10 | # will do deploy, then wait 6 minutes and evaluate. traffic for evaluation is from synthetic tests. if its good continues in production 11 | - name: delivery 12 | tasks: 13 | - name: monaco 14 | - name: deployment 15 | properties: 16 | deploymentstrategy: user_managed 17 | - name: evaluation 18 | triggeredAfter: "6m" 19 | properties: 20 | timeframe: "6m" 21 | # delivery_withtest: 22 | # will deploy, test (locust), evaluate. If its good continues in production. 23 | - name: delivery_withtest 24 | tasks: 25 | - name: monaco 26 | - name: deployment 27 | properties: 28 | deploymentstrategy: user_managed 29 | - name: test 30 | properties: 31 | teststrategy: performance 32 | - name: evaluation 33 | # just_delivery_withtest: 34 | # will only deploy, test and evaluate in staging without triggering a production sequence afterwards 35 | - name: just_delivery_withtest 36 | tasks: 37 | - name: monaco 38 | - name: deployment 39 | properties: 40 | deploymentstrategy: user_managed 41 | - name: test 42 | properties: 43 | teststrategy: performance 44 | - name: evaluation 45 | - name: production 46 | sequences: 47 | # delivery: 48 | # will deploy, then wait 6 minutes and evaluate. evaluation is based on synthetic tests setup through monaco 49 | - name: delivery 50 | triggeredOn: 51 | - event: staging.delivery.finished 52 | - event: staging.delivery_withtest.finished 53 | tasks: 54 | - name: approval 55 | properties: 56 | pass: automatic 57 | warning: manual 58 | - name: monaco 59 | - name: deployment 60 | properties: 61 | deploymentstrategy: user_managed 62 | - name: evaluation 63 | triggeredAfter: "6m" 64 | properties: 65 | timeframe: "6m" 66 | # rollback: 67 | # will rollback in case of an error of production deployment 68 | - name: rollback 69 | triggeredOn: 70 | - event: production.delivery.finished 71 | selector: 72 | match: 73 | result: failed 74 | tasks: 75 | - name: rollback 76 | - name: evaluation 77 | triggeredAfter: "6m" 78 | properties: 79 | timeframe: "6m" 80 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/calculated-metrics-service/calcslometric.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsmMetricKey": "{{ .metricKey }}", 3 | "name": "{{ .name }}", 4 | "enabled": true, 5 | "metricDefinition": { 6 | "metric": "REQUEST_COUNT", 7 | "requestAttribute": null 8 | }, 9 | "unit": "COUNT", 10 | "unitDisplayName": "", 11 | "entityId": null, 12 | "managementZones": [], 13 | "conditions": [ 14 | { 15 | "attribute": "SERVICE_TAG", 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "comparison": "EQUALS", 19 | "value": { 20 | "context": "ENVIRONMENT", 21 | "key": "DT_RELEASE_PRODUCT", 22 | "value": "delivery-demo" 23 | }, 24 | "values": null, 25 | "negate": false 26 | } 27 | }, 28 | { 29 | "attribute": "RESPONSE_TIME", 30 | "comparisonInfo": { 31 | "type": "NUMBER", 32 | "comparison": "LOWER_THAN_OR_EQUAL", 33 | "value": 500, 34 | "values": null, 35 | "negate": false 36 | } 37 | } 38 | ], 39 | "dimensionDefinition": { 40 | "name": "version", 41 | "dimension": "{Request:ApplicationReleaseVersion}", 42 | "placeholders": [], 43 | "topX": 10, 44 | "topXDirection": "DESCENDING", 45 | "topXAggregation": "SINGLE_VALUE" 46 | } 47 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/calculated-metrics-service/calctenantmetric.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - tenantfastercount: "calcslometric.json" 3 | - tenantrtbyversion: "calcversionmetric.json" 4 | 5 | tenantfastercount: 6 | - name: "Tenant.ResponseTime.Count.Faster500ms" 7 | - metricKey: "calc:service.tenant.responsetime.count.faster500ms" 8 | 9 | tenantrtbyversion: 10 | - name: "Tenant.ResponseTime.ByVersion" 11 | - metricKey: "calc:service.tenant.responsetime.byversion" 12 | 13 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/calculated-metrics-service/calcversionmetric.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsmMetricKey": "{{ .metricKey }}", 3 | "name": "{{ .name }}", 4 | "enabled": true, 5 | "metricDefinition": { 6 | "metric": "RESPONSE_TIME", 7 | "requestAttribute": null 8 | }, 9 | "unit": "MICRO_SECOND", 10 | "unitDisplayName": "", 11 | "entityId": null, 12 | "managementZones": [], 13 | "conditions": [ 14 | { 15 | "attribute": "SERVICE_TAG", 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "comparison": "TAG_KEY_EQUALS", 19 | "value": { 20 | "context": "ENVIRONMENT", 21 | "key": "DT_RELEASE_VERSION" 22 | }, 23 | "values": null, 24 | "negate": false 25 | } 26 | } 27 | ], 28 | "dimensionDefinition": { 29 | "name": "version", 30 | "dimension": "{Request:ApplicationReleaseVersion}", 31 | "placeholders": [], 32 | "topX": 10, 33 | "topXDirection": "DESCENDING", 34 | "topXAggregation": "SUM" 35 | } 36 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/conditional-naming-processgroup/namingrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "{{ .type }}", 3 | "nameFormat": "{ProcessGroup:KubernetesBasePodName}.{ProcessGroup:KubernetesNamespace}", 4 | "displayName": "{{ .name }}", 5 | "enabled": true, 6 | "rules": [ 7 | { 8 | "key": { 9 | "attribute": "PROCESS_GROUP_PREDEFINED_METADATA", 10 | "dynamicKey": "KUBERNETES_BASE_POD_NAME", 11 | "type": "PROCESS_PREDEFINED_METADATA_KEY" 12 | }, 13 | "comparisonInfo": { 14 | "type": "STRING", 15 | "operator": "EXISTS", 16 | "value": null, 17 | "negate": false, 18 | "caseSensitive": null 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/conditional-naming-processgroup/namingrules.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - pg_naming: "namingrules.json" 3 | 4 | pg_naming: 5 | - name: "k8s PG Naming Rule" 6 | - type: "PROCESS_GROUP" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/conditional-naming-service/namingrules.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "{{ .type }}", 3 | "nameFormat": "{ProcessGroup:KubernetesBasePodName}.{ProcessGroup:KubernetesNamespace}", 4 | "displayName": "{{ .name }}", 5 | "enabled": true, 6 | "rules": [ 7 | { 8 | "key": { 9 | "attribute": "PROCESS_GROUP_PREDEFINED_METADATA", 10 | "dynamicKey": "KUBERNETES_BASE_POD_NAME", 11 | "type": "PROCESS_PREDEFINED_METADATA_KEY" 12 | }, 13 | "comparisonInfo": { 14 | "type": "STRING", 15 | "operator": "EXISTS", 16 | "value": null, 17 | "negate": false, 18 | "caseSensitive": null 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/conditional-naming-service/namingrules.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - svc_naming: "namingrules.json" 3 | 4 | svc_naming: 5 | - name: "k8s SVC Naming Rule" 6 | - type: "SERVICE" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/management-zone/keptn-mz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "propagationTypes": [ 8 | "SERVICE_TO_HOST_LIKE", 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "SERVICE_TAGS" 15 | }, 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "operator": "EQUALS", 19 | "value": { 20 | "context": "ENVIRONMENT", 21 | "key": "DT_RELEASE_PRODUCT", 22 | "value": "{{ .project }}" 23 | }, 24 | "negate": false 25 | } 26 | }, 27 | { 28 | "key": { 29 | "attribute": "SERVICE_TAGS" 30 | }, 31 | "comparisonInfo": { 32 | "type": "TAG", 33 | "operator": "EQUALS", 34 | "value": { 35 | "context": "ENVIRONMENT", 36 | "key": "DT_RELEASE_STAGE", 37 | "value": "{{ .stage }}" 38 | }, 39 | "negate": false 40 | } 41 | } 42 | ] 43 | } 44 | ], 45 | "dimensionalRules": [] 46 | } 47 | 48 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/management-zone/keptn-mz.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - management-zone-keptn-project-stage: "keptn-mz.json" 3 | 4 | management-zone-keptn-project-stage: 5 | - name: "Keptn: {{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_STAGE }}" 6 | - project: "{{ .Env.KEPTN_PROJECT }}" 7 | - stage: "{{ .Env.KEPTN_STAGE }}" 8 | - service: "{{ .Env.KEPTN_SERVICE }}" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/synthetic-monitor/synthetic.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - synthetic_http_prod_check: "synthetic_http.json" 3 | - synthetic_browser_prod_check: "synthetic_browser.json" 4 | 5 | synthetic_http_prod_check: 6 | - name: "HTTP Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 7 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} HTTP Check" 8 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_PRODUCTION_INGRESS" 9 | - project: "{{ .Env.KEPTN_PROJECT }}" 10 | - stage: "{{ .Env.KEPTN_STAGE }}" 11 | - service: "{{ .Env.KEPTN_SERVICE }}" 12 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC 13 | 14 | synthetic_browser_prod_check: 15 | - name: "Browser Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 16 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} Browser Check" 17 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_PRODUCTION_INGRESS" 18 | - project: "{{ .Env.KEPTN_PROJECT }}" 19 | - stage: "{{ .Env.KEPTN_STAGE }}" 20 | - service: "{{ .Env.KEPTN_SERVICE }}" 21 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/synthetic-monitor/synthetic_browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "frequencyMin": 5, 4 | "enabled": true, 5 | "type": "BROWSER", 6 | "createdFrom": "GUI", 7 | "script": { 8 | "type": "clickpath", 9 | "version": "1.0", 10 | "configuration": { 11 | "device": { 12 | "deviceName": "Desktop", 13 | "orientation": "landscape" 14 | } 15 | }, 16 | "events": [ 17 | { 18 | "type": "navigate", 19 | "description": "Loading of Simplenode Homepage", 20 | "url": "{{ .url }}", 21 | "wait": { 22 | "waitFor": "page_complete" 23 | } 24 | }, 25 | { 26 | "type": "click", 27 | "description": "Click on Invoke", 28 | "target": { 29 | "locators": [ 30 | { 31 | "type": "css", 32 | "value": "#Invoke" 33 | } 34 | ] 35 | }, 36 | "button": 0 37 | } 38 | ] 39 | }, 40 | "locations": [ 41 | "{{ .location }}" 42 | ], 43 | "anomalyDetection": { 44 | "outageHandling": { 45 | "globalOutage": true, 46 | "localOutage": false, 47 | "localOutagePolicy": { 48 | "affectedLocations": null, 49 | "consecutiveRuns": null 50 | }, 51 | "retryOnError": true 52 | }, 53 | "loadingTimeThresholds": { 54 | "enabled": false, 55 | "thresholds": [] 56 | } 57 | }, 58 | "tags": [ 59 | { "context" : "CONTEXTLESS", "key" : "{{ .project }}"}, 60 | { "context" : "CONTEXTLESS", "key" : "{{ .service }}"}, 61 | { "context" : "CONTEXTLESS", "key" : "{{ .stage }}"} 62 | ], 63 | "managementZones": [], 64 | "automaticallyAssignedApps": [ 65 | ], 66 | "manuallyAssignedApps": [ 67 | ], 68 | "keyPerformanceMetrics": { 69 | "loadActionKpm": "VISUALLY_COMPLETE", 70 | "xhrActionKpm": "VISUALLY_COMPLETE" 71 | }, 72 | "events": [ 73 | ] 74 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/projects/simplenode/synthetic-monitor/synthetic_http.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "frequencyMin": 2, 4 | "enabled": true, 5 | "type": "HTTP", 6 | "createdFrom": "GUI", 7 | "script": { 8 | "version": "1.0", 9 | "requests": [ 10 | { 11 | "description": "{{ .description }}", 12 | "url": "{{ .url }}/api/invoke?url=https://github.com/keptn&sleep=1000", 13 | "method": "GET", 14 | "validation": { 15 | "rules": [ 16 | { 17 | "value": ">=400", 18 | "passIfFound": false, 19 | "type": "httpStatusesList" 20 | } 21 | ], 22 | "rulesChaining": "or" 23 | }, 24 | "configuration": { 25 | "acceptAnyCertificate": true, 26 | "followRedirects": true 27 | } 28 | } 29 | ] 30 | }, 31 | "locations": [ 32 | "{{ .location }}" 33 | ], 34 | "anomalyDetection": { 35 | "outageHandling": { 36 | "globalOutage": true, 37 | "localOutage": false, 38 | "localOutagePolicy": { 39 | "affectedLocations": 1, 40 | "consecutiveRuns": 3 41 | } 42 | }, 43 | "loadingTimeThresholds": { 44 | "enabled": false, 45 | "thresholds": [ 46 | { 47 | "type": "TOTAL", 48 | "valueMs": 0 49 | } 50 | ] 51 | } 52 | }, 53 | "tags": [ 54 | { "context" : "CONTEXTLESS", "key" : "{{ .project }}"}, 55 | { "context" : "CONTEXTLESS", "key" : "{{ .service }}"}, 56 | { "context" : "CONTEXTLESS", "key" : "{{ .stage }}"} 57 | ], 58 | "managementZones": [], 59 | "automaticallyAssignedApps": [], 60 | "manuallyAssignedApps": [], 61 | "requests": [ 62 | { 63 | "name": "{{ .description }}", 64 | "sequenceNumber": 1 65 | } 66 | ] 67 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/dynatrace/sli.yaml: -------------------------------------------------------------------------------- 1 | spec_version: '1.0' 2 | indicators: 3 | throughput: metricSelector=builtin:service.requestCount.total:merge("dt.entity.service"):sum&entitySelector=type(SERVICE),tag([Environment]DT_RELEASE_STAGE:$STAGE),tag([Kubernetes]app:$SERVICE) 4 | 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) 5 | 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) 6 | 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) 7 | 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) 8 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/tnt-XXX-svc/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://tnt-XXX-svc.REPLACE_KEPTN_PROJECT-production.REPLACE_KEPTN_PRODUCTION_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/tnt-XXX-svc/helm/tnt-XXX-svc/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: simplenode 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/tnt-XXX-svc/helm/tnt-XXX-svc/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_PRODUCTION_INGRESS 14 | class: nginx 15 | 16 | service: 17 | name: tnt-XXX-svc 18 | type: ClusterIP 19 | port: 8080 20 | targetPort: 8080 21 | 22 | resources: {} 23 | # We usually recommend not to specify default resources and to leave this as a conscious 24 | # choice for the user. This also increases chances charts run on environments with little 25 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 26 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 27 | # limits: 28 | # cpu: 100m 29 | # memory: 128Mi 30 | # requests: 31 | # cpu: 100m 32 | # memory: 128Mi 33 | 34 | nodeSelector: {} 35 | 36 | tolerations: [] 37 | 38 | affinity: {} 39 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_production/tnt-XXX-svc/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<=1000" 12 | warning: 13 | - criteria: 14 | - "<=1500" 15 | - sli: throughput 16 | - sli: error_rate 17 | weight: 2 18 | pass: 19 | - criteria: 20 | - "<=1" 21 | warning: 22 | - criteria: 23 | - "<=2" 24 | - sli: response_time_p50 25 | - sli: response_time_p90 26 | pass: 27 | - criteria: 28 | - "<=500" 29 | warning: 30 | - criteria: 31 | - "<=600" 32 | total_score: 33 | pass: "90%" 34 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/auto-tag/keptn-tagging.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "valueFormat": "{ProcessGroup:Environment:{{ .name }}}", 8 | "propagationTypes": [ 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "PROCESS_GROUP_CUSTOM_METADATA", 15 | "dynamicKey": { 16 | "source": "ENVIRONMENT", 17 | "key": "{{ .name }}" 18 | }, 19 | "type": "PROCESS_CUSTOM_METADATA_KEY" 20 | }, 21 | "comparisonInfo": { 22 | "type": "STRING", 23 | "operator": "EXISTS", 24 | "value": null, 25 | "negate": false, 26 | "caseSensitive": null 27 | } 28 | } 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/auto-tag/tagging.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - keptn-stage-tag: "keptn-tagging.json" 3 | - keptn-service-tag: "keptn-tagging.json" 4 | - keptn-project-tag: "keptn-tagging.json" 5 | - keptn-deployment-tag: "keptn-tagging.json" 6 | 7 | keptn-stage-tag: 8 | - name: "keptn_stage" 9 | 10 | keptn-service-tag: 11 | - name: "keptn_service" 12 | 13 | keptn-project-tag: 14 | - name: "keptn_project" 15 | 16 | keptn-deployment-tag: 17 | - name: "keptn_deployment" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/calculated-metrics-service/calctestmetric.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsmMetricKey": "{{ .metricKey }}", 3 | "name": "{{ .name }}", 4 | "enabled": true, 5 | "metricDefinition": { 6 | "metric": "{{ .metric }}", 7 | "requestAttribute": null 8 | }, 9 | "unit": "{{ .metricunit }}", 10 | "unitDisplayName": "", 11 | "entityId": null, 12 | "managementZones": [], 13 | "conditions": [ 14 | { 15 | "attribute": "SERVICE_REQUEST_ATTRIBUTE", 16 | "comparisonInfo": { 17 | "type": "STRING_REQUEST_ATTRIBUTE", 18 | "comparison": "EXISTS", 19 | "value": null, 20 | "values": null, 21 | "negate": false, 22 | "requestAttribute": "TSN", 23 | "caseSensitive": false, 24 | "matchOnChildCalls": false, 25 | "source": null 26 | } 27 | }, 28 | { 29 | "attribute": "SERVICE_TAG", 30 | "comparisonInfo": { 31 | "type": "TAG", 32 | "comparison": "EQUALS", 33 | "value": { 34 | "context": "ENVIRONMENT", 35 | "key": "DT_RELEASE_PRODUCT", 36 | "value": "delivery-demo" 37 | }, 38 | "values": null, 39 | "negate": false 40 | } 41 | } 42 | ], 43 | "dimensionDefinition": { 44 | "name": "Test Step", 45 | "dimension": "{RequestAttribute:TSN}", 46 | "placeholders": [], 47 | "topX": 10, 48 | "topXDirection": "DESCENDING", 49 | "topXAggregation": "{{ .topxaggregate }}" 50 | } 51 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/calculated-metrics-service/caltestmetric.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - testcpu: "calctestmetric.json" 3 | - testfailurerate: "calctestmetric.json" 4 | - testresponsetime: "calctestmetric.json" 5 | 6 | testcpu: 7 | - name: "Test Step CPU" 8 | - metricKey: "calc:service.teststepcpu" 9 | - metric: "CPU_TIME" 10 | - metricunit: "MICRO_SECOND" 11 | - topxaggregate: "SUM" 12 | 13 | testfailurerate: 14 | - name: "Test Step Failure Rate" 15 | - metricKey: "calc:service.teststepfailurerate" 16 | - metric: "FAILURE_RATE" 17 | - metricunit: "PERCENT" 18 | - topxaggregate: "OF_INTEREST_RATIO" 19 | 20 | testresponsetime: 21 | - name: "Test Step Response Time" 22 | - metricKey: "calc:service.teststepresponsetime" 23 | - metric: "RESPONSE_TIME" 24 | - metricunit: "MICRO_SECOND" 25 | - topxaggregate: "SUM" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/management-zone/keptn-mz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "propagationTypes": [ 8 | "SERVICE_TO_HOST_LIKE", 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "SERVICE_TAGS" 15 | }, 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "operator": "EQUALS", 19 | "value": { 20 | "context": "CONTEXTLESS", 21 | "key": "keptn_project", 22 | "value": "{{ .project }}" 23 | }, 24 | "negate": false 25 | } 26 | }, 27 | { 28 | "key": { 29 | "attribute": "SERVICE_TAGS" 30 | }, 31 | "comparisonInfo": { 32 | "type": "TAG", 33 | "operator": "EQUALS", 34 | "value": { 35 | "context": "CONTEXTLESS", 36 | "key": "keptn_stage", 37 | "value": "{{ .stage }}" 38 | }, 39 | "negate": false 40 | } 41 | } 42 | ] 43 | } 44 | ], 45 | "dimensionalRules": [] 46 | } 47 | 48 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/management-zone/keptn-mz.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - management-zone-keptn-project-stage: "keptn-mz.json" 3 | - management-zone-keptn-service: "keptn-service-mz.json" 4 | 5 | management-zone-keptn-project-stage: 6 | - name: "Keptn: {{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_STAGE }}" 7 | - project: "{{ .Env.KEPTN_PROJECT }}" 8 | - stage: "{{ .Env.KEPTN_STAGE }}" 9 | - service: "{{ .Env.KEPTN_SERVICE }}" 10 | 11 | management-zone-keptn-service: 12 | - name: "Tenant: {{ .Env.KEPTN_SERVICE }}" 13 | - service: "{{ .Env.KEPTN_SERVICE }}" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/management-zone/keptn-service-mz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "propagationTypes": [ 8 | "SERVICE_TO_HOST_LIKE", 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "SERVICE_TAGS" 15 | }, 16 | "comparisonInfo": { 17 | "type": "TAG", 18 | "operator": "EQUALS", 19 | "value": { 20 | "context": "KUBERNETES", 21 | "key": "app.kubernetes.io/name", 22 | "value": "{{ .service }}" 23 | }, 24 | "negate": false 25 | } 26 | } 27 | ] 28 | }, 29 | { 30 | "type": "HTTP_MONITOR", 31 | "enabled": true, 32 | "propagationTypes": [], 33 | "conditions": [ 34 | { 35 | "key": { 36 | "attribute": "HTTP_MONITOR_TAGS", 37 | "type": "STATIC" 38 | }, 39 | "comparisonInfo": { 40 | "type": "TAG", 41 | "operator": "TAG_KEY_EQUALS", 42 | "value": { 43 | "context": "CONTEXTLESS", 44 | "key": "{{ .service }}" 45 | }, 46 | "negate": false 47 | } 48 | } 49 | ] 50 | }, 51 | { 52 | "type": "BROWSER_MONITOR", 53 | "enabled": true, 54 | "propagationTypes": [], 55 | "conditions": [ 56 | { 57 | "key": { 58 | "attribute": "BROWSER_MONITOR_TAGS", 59 | "type": "STATIC" 60 | }, 61 | "comparisonInfo": { 62 | "type": "TAG", 63 | "operator": "TAG_KEY_EQUALS", 64 | "value": { 65 | "context": "CONTEXTLESS", 66 | "key": "{{ .service }}" 67 | }, 68 | "negate": false 69 | } 70 | } 71 | ] 72 | } 73 | ], 74 | "dimensionalRules": [] 75 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/request-attributes/attribute.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "enabled": true, 4 | "dataType": "STRING", 5 | "dataSources": [ 6 | { 7 | "enabled": true, 8 | "source": "REQUEST_HEADER", 9 | "valueProcessing": { 10 | "splitAt": "", 11 | "trim": false, 12 | "extractSubstring": { 13 | "position": "BETWEEN", 14 | "delimiter": "{{ .delimiter }}", 15 | "endDelimiter": ";" 16 | } 17 | }, 18 | "parameterName": "x-dynatrace-test", 19 | "capturingAndStorageLocation": "CAPTURE_AND_STORE_ON_SERVER" 20 | } 21 | ], 22 | "normalization": "ORIGINAL", 23 | "aggregation": "FIRST", 24 | "confidential": false, 25 | "skipPersonalDataMasking": false 26 | } -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/request-attributes/attribute.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - lsn-tag: "attribute.json" 3 | - ltn-tag: "attribute.json" 4 | - tsn-tag: "attribute.json" 5 | 6 | lsn-tag: 7 | - name: "LSN" 8 | - delimiter: "LSN=" 9 | 10 | ltn-tag: 11 | - name: "LTN" 12 | - delimiter: "LTN=" 13 | 14 | tsn-tag: 15 | - name: "TSN" 16 | - delimiter: "TSN=" 17 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/projects/simplenode/synthetic-monitor/synthetic.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - synthetic_http_prod_check: "synthetic_http.json" 3 | 4 | synthetic_http_prod_check: 5 | - name: "HTTP Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 6 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} HTTP Check" 7 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_STAGING_INGRESS" 8 | - project: "{{ .Env.KEPTN_PROJECT }}" 9 | - stage: "{{ .Env.KEPTN_STAGE }}" 10 | - service: "{{ .Env.KEPTN_SERVICE }}" 11 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/dynatrace/sli.yaml: -------------------------------------------------------------------------------- 1 | spec_version: "1.0" 2 | indicators: 3 | throughput: "metricSelector=builtin:service.requestCount.total:merge(\"dt.entity.service\"):sum&entitySelector=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),type(SERVICE)" 4 | error_rate: "metricSelector=builtin:service.errors.total.rate:merge(\"dt.entity.service\"):avg&entitySelector=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),type(SERVICE)" 5 | response_time_p50: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(50)&entitySelector=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),type(SERVICE)" 6 | response_time_p90: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(90)&entitySelector=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),type(SERVICE)" 7 | response_time_p95: "metricSelector=builtin:service.response.time:merge(\"dt.entity.service\"):percentile(95)&entitySelector=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),type(SERVICE)" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://tnt-XXX-svc.REPLACE_KEPTN_PROJECT-staging.REPLACE_KEPTN_STAGING_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/helm/tnt-XXX-svc/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: simplenode 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/helm/tnt-XXX-svc/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_STAGING_INGRESS 14 | class: nginx 15 | 16 | service: 17 | name: tnt-XXX-svc 18 | type: ClusterIP 19 | port: 8080 20 | targetPort: 8080 21 | 22 | resources: {} 23 | # We usually recommend not to specify default resources and to leave this as a conscious 24 | # choice for the user. This also increases chances charts run on environments with little 25 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 26 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 27 | # limits: 28 | # cpu: 100m 29 | # memory: 128Mi 30 | # requests: 31 | # cpu: 100m 32 | # memory: 128Mi 33 | 34 | nodeSelector: {} 35 | 36 | tolerations: [] 37 | 38 | affinity: {} 39 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/locust/load.py: -------------------------------------------------------------------------------- 1 | from locust import HttpUser, between, task 2 | import uuid 3 | 4 | class SimpleNodeLocustUser(HttpUser): 5 | wait_time = between(5, 15) 6 | 7 | def on_start(self): 8 | self.script_name = "load.py" 9 | self.test_name = "SimpleNodeLocustUser" 10 | self.userId = str(uuid.uuid4()) 11 | 12 | def setDynatraceHeader(self, stepName): 13 | headerValue = "LSN=" + self.script_name + ";TSN=" + stepName + ";LTN=" + self.test_name + ";VU=" + self.userId 14 | self.client.headers = { "x-dynatrace-test" : headerValue } 15 | 16 | @task 17 | def index(self): 18 | self.setDynatraceHeader("Home") 19 | self.client.get("/") 20 | 21 | @task(3) 22 | def get_invoke(self): 23 | self.setDynatraceHeader("Invoke") 24 | self.client.get("/api/invoke?url=https://www.keptn.sh") 25 | 26 | @task 27 | def get_echo(self): 28 | self.setDynatraceHeader("Echo") 29 | self.client.get("/api/echo?text=my echo text from locust") 30 | 31 | @task 32 | def get_version(self): 33 | self.setDynatraceHeader("Version") 34 | self.client.get("/api/version") -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/locust/locust.conf: -------------------------------------------------------------------------------- 1 | locustfile = /locust/load.py 2 | headless = true 3 | users = 10 4 | run-time = 5m -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/locust/locust.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance 5 | script: /locust/load.py 6 | conf: /locust/locust.conf -------------------------------------------------------------------------------- /keptn_project_templates/prod-delivery-simplenode/stage_staging/tnt-XXX-svc/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<=1000" 12 | warning: 13 | - criteria: 14 | - "<=1500" 15 | - sli: throughput 16 | - sli: error_rate 17 | weight: 2 18 | pass: 19 | - criteria: 20 | - "<=1" 21 | warning: 22 | - criteria: 23 | - "<=2" 24 | - sli: response_time_p50 25 | - sli: response_time_p90 26 | pass: 27 | - criteria: 28 | - "<=500" 29 | warning: 30 | - criteria: 31 | - "<=600" 32 | total_score: 33 | pass: "90%" 34 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/service_jenkins/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/prod-devopstools/service_jenkins/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/service_keptnwebservice/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/prod-devopstools/service_keptnwebservice/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: spec.keptn.sh/0.2.0 2 | kind: Shipyard 3 | metadata: 4 | name: "keptn web service delivery" 5 | spec: 6 | stages: 7 | - name: production 8 | sequences: 9 | - name: delivery 10 | tasks: 11 | - name: deployment 12 | properties: 13 | deploymentstrategy: user_managed -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/stage_production/jenkins/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://jenkins.REPLACE_KEPTN_PROJECT-production.REPLACE_KEPTN_PRODUCTION_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/stage_production/jenkins/helm/jenkins/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: keptnwebservice 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/stage_production/jenkins/helm/jenkins/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/keptnwebservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_PRODUCTION_INGRESS 14 | class: nginx 15 | 16 | service: 17 | name: keptnwebservice 18 | type: ClusterIP 19 | port: 8080 20 | targetPort: 8080 21 | 22 | resources: {} 23 | # We usually recommend not to specify default resources and to leave this as a conscious 24 | # choice for the user. This also increases chances charts run on environments with little 25 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 26 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 27 | # limits: 28 | # cpu: 100m 29 | # memory: 128Mi 30 | # requests: 31 | # cpu: 100m 32 | # memory: 128Mi 33 | 34 | nodeSelector: {} 35 | 36 | tolerations: [] 37 | 38 | affinity: {} 39 | -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/stage_production/keptnwebservice/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://keptnwebservice.REPLACE_KEPTN_PROJECT-production.REPLACE_KEPTN_PRODUCTION_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/stage_production/keptnwebservice/helm/keptnwebservice/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: keptnwebservice 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/prod-devopstools/stage_production/keptnwebservice/helm/keptnwebservice/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/keptnwebservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_PRODUCTION_INGRESS 14 | class: nginx 15 | 16 | service: 17 | name: keptnwebservice 18 | type: ClusterIP 19 | port: 8080 20 | targetPort: 8080 21 | 22 | resources: {} 23 | # We usually recommend not to specify default resources and to leave this as a conscious 24 | # choice for the user. This also increases chances charts run on environments with little 25 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 26 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 27 | # limits: 28 | # cpu: 100m 29 | # memory: 128Mi 30 | # requests: 31 | # cpu: 100m 32 | # memory: 128Mi 33 | 34 | nodeSelector: {} 35 | 36 | tolerations: [] 37 | 38 | affinity: {} 39 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/podtato-head/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: helloservice 5 | namespace: prometheus-qg-quality-gate 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: helloservice 11 | template: 12 | metadata: 13 | labels: 14 | app: helloservice 15 | spec: 16 | terminationGracePeriodSeconds: 5 17 | containers: 18 | - name: server 19 | image: ghcr.io/podtato-head/podtatoserver:v0.1.1 20 | imagePullPolicy: Always 21 | ports: 22 | - containerPort: 9000 23 | env: 24 | - name: PORT 25 | value: "9000" 26 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/podtato-head/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: helloservice 5 | namespace: prometheus-qg-quality-gate 6 | spec: 7 | selector: 8 | app: helloservice 9 | ports: 10 | - name: http 11 | port: 80 12 | protocol: TCP 13 | targetPort: 9000 14 | type: ClusterIP 15 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/podtato-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: podtato-ingress 5 | annotations: 6 | cert-manager.io/cluster-issuer: issuer.placeholder-issuer 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | kubernetes.io/ingress.class: nginx 9 | spec: 10 | tls: 11 | - hosts: 12 | - "domain.placeholder" 13 | secretName: keptn-tls 14 | rules: 15 | - host: "domain.placeholder" 16 | http: 17 | paths: 18 | - path: / 19 | pathType: Prefix 20 | backend: 21 | service: 22 | name: helloservice 23 | port: 24 | number: 80 25 | 26 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/prometheus-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: prometheus-ingress 5 | annotations: 6 | cert-manager.io/cluster-issuer: issuer.placeholder-issuer 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | kubernetes.io/ingress.class: nginx 9 | spec: 10 | tls: 11 | - hosts: 12 | - "domain.placeholder" 13 | secretName: keptn-tls 14 | rules: 15 | - host: "domain.placeholder" 16 | http: 17 | paths: 18 | - path: / 19 | pathType: Prefix 20 | backend: 21 | service: 22 | name: prometheus-server 23 | port: 24 | number: 80 25 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/service_helloservice/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/prometheus-qg/service_helloservice/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "spec.keptn.sh/0.2.0" 2 | kind: "Shipyard" 3 | metadata: 4 | name: "shipyard-quality-gates" 5 | spec: 6 | stages: 7 | - name: "quality-gate" -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/sli-secret.yaml: -------------------------------------------------------------------------------- 1 | url: http://prometheus-server.prometheus.svc.cluster.local:80 2 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/stage_quality-gate/helloservice/prometheus/sli.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '1.0' 3 | indicators: 4 | http_response_time_seconds_main_page_sum: sum(rate(http_server_request_duration_seconds_sum{method="GET",route="/",status_code="200",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS])/rate(http_server_request_duration_seconds_count{method="GET",route="/",status_code="200",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS])) 5 | failing_request: promhttp_metric_handler_requests_total{code!="200",job="$SERVICE-$PROJECT-$STAGE"} 6 | http_requests_total_sucess: http_requests_total{status="success"} 7 | go_routines: go_goroutines{job="$SERVICE-$PROJECT-$STAGE"} 8 | request_throughput: sum(rate(http_requests_total{status="success"}[$DURATION_SECONDS])) 9 | response_time_p95: histogram_quantile(0.95, sum(rate(http_server_request_duration_seconds_bucket{job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS])) by (le)) 10 | -------------------------------------------------------------------------------- /keptn_project_templates/prometheus-qg/stage_quality-gate/helloservice/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: http_response_time_seconds_main_page_sum 9 | pass: 10 | - criteria: 11 | - "<=1" 12 | warning: 13 | - criteria: 14 | - "<=0.5" 15 | - sli: request_throughput 16 | pass: 17 | - criteria: 18 | - ">=-80%" 19 | - sli: go_routines 20 | pass: 21 | - criteria: 22 | - "<=100" 23 | - sli: response_time_p95 24 | total_score: 25 | pass: "90%" 26 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | spec_version: '0.1.0' 2 | dashboard: query 3 | attachRules: 4 | tagRule: 5 | - meTypes: 6 | - SERVICE 7 | tags: 8 | - context: CONTEXTLESS 9 | key: keptn_service 10 | value: $SERVICE 11 | - context: CONTEXTLESS 12 | key: keptn_managed -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/dynatrace/monaco.conf.yaml: -------------------------------------------------------------------------------- 1 | projects: 2 | - quality-gate 3 | - coreconfig -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/service_demo/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/quality-gate-dynatrace/service_demo/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "spec.keptn.sh/0.2.0" 2 | kind: "Shipyard" 3 | metadata: 4 | name: "shipyard-quality-gates" 5 | spec: 6 | stages: 7 | - name: "quality-gate" 8 | sequences: 9 | - name: evaluation 10 | tasks: 11 | - name: monaco 12 | - name: evaluation 13 | - name: simple_evaluation 14 | tasks: 15 | - name: evaluation -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/shipyard_simple.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "spec.keptn.sh/0.2.0" 2 | kind: "Shipyard" 3 | metadata: 4 | name: "shipyard-quality-gates-simple" 5 | spec: 6 | stages: 7 | - name: "quality-gate" -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/stage_quality-gate/dynatrace/projects/coreconfig/auto-tag/keptn-tagging.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "valueFormat": "{ProcessGroup:Environment:{{ .name }}}", 8 | "propagationTypes": [ 9 | "SERVICE_TO_PROCESS_GROUP_LIKE" 10 | ], 11 | "conditions": [ 12 | { 13 | "key": { 14 | "attribute": "PROCESS_GROUP_CUSTOM_METADATA", 15 | "dynamicKey": { 16 | "source": "ENVIRONMENT", 17 | "key": "{{ .name }}" 18 | }, 19 | "type": "PROCESS_CUSTOM_METADATA_KEY" 20 | }, 21 | "comparisonInfo": { 22 | "type": "STRING", 23 | "operator": "EXISTS", 24 | "value": null, 25 | "negate": false, 26 | "caseSensitive": null 27 | } 28 | } 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/stage_quality-gate/dynatrace/projects/coreconfig/auto-tag/tagging.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - keptn-stage-tag: "keptn-tagging.json" 3 | - keptn-service-tag: "keptn-tagging.json" 4 | - keptn-project-tag: "keptn-tagging.json" 5 | - keptn-deployment-tag: "keptn-tagging.json" 6 | 7 | keptn-stage-tag: 8 | - name: "keptn_stage" 9 | 10 | keptn-service-tag: 11 | - name: "keptn_service" 12 | 13 | keptn-project-tag: 14 | - name: "keptn_project" 15 | 16 | keptn-deployment-tag: 17 | - name: "keptn_deployment" -------------------------------------------------------------------------------- /keptn_project_templates/quality-gate-dynatrace/stage_quality-gate/dynatrace/projects/quality-gate/dashboard/qgdashboard.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - qualitygatedashboard: "qgdashboard.json" 3 | 4 | qualitygatedashboard: 5 | - name: "KQG;project={{ .Env.KEPTN_PROJECT }};service={{ .Env.KEPTN_SERVICE }};stage={{ .Env.KEPTN_STAGE }}" 6 | - project: "{{ .Env.KEPTN_PROJECT }}" 7 | - stage: "{{ .Env.KEPTN_STAGE }}" 8 | - service: "{{ .Env.KEPTN_SERVICE }}" 9 | - owner: "${OWNER_EMAIL}" 10 | - keptnbridge: "http://REPLACE_KEPTN_BRIDGE/bridge" 11 | - owner: "REPLACE_OWNER_EMAIL" -------------------------------------------------------------------------------- /keptn_project_templates/release-validation-simplenode/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | dashboard: query 4 | attachRules: 5 | tagRule: 6 | - meTypes: 7 | - PROCESS_GROUP_INSTANCE 8 | tags: 9 | - context: KUBERNETES 10 | key: "app.kubernetes.io/name" 11 | value: $SERVICE 12 | - context: ENVIRONMENT 13 | key: DT_RELEASE_STAGE 14 | value: $STAGE -------------------------------------------------------------------------------- /keptn_project_templates/release-validation-simplenode/service_tnt-XXX-svc/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/release-validation-simplenode/service_tnt-XXX-svc/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/release-validation-simplenode/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "spec.keptn.sh/0.2.0" 2 | kind: "Shipyard" 3 | metadata: 4 | name: "shipyard-quality-gate" 5 | spec: 6 | stages: 7 | - name: "production" -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/dynatrace/dynatrace.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | attachRules: 4 | tagRule: 5 | - meTypes: 6 | - PROCESS_GROUP_INSTANCE 7 | tags: 8 | - context: CONTEXTLESS 9 | key: keptn_project 10 | value: $PROJECT 11 | - context: CONTEXTLESS 12 | key: keptn_service 13 | value: $SERVICE 14 | - context: CONTEXTLESS 15 | key: keptn_stage 16 | value: $STAGE -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/dynatrace/monaco.conf.yaml: -------------------------------------------------------------------------------- 1 | projects: 2 | - simplenode -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/jmeter/jmeter.conf.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | workloads: 4 | - teststrategy: performance_long 5 | vuser: 10 6 | loopcount: 2000 7 | thinktime: 250 8 | acceptederrorrate: 1.0 9 | script: jmeter/load.jmx 10 | - teststrategy: performance_100 11 | vuser: 100 12 | loopcount: 10 13 | thinktime: 250 14 | acceptederrorrate: 1.0 15 | script: jmeter/load.jmx 16 | - teststrategy: performance_50 17 | vuser: 50 18 | loopcount: 10 19 | thinktime: 250 20 | acceptederrorrate: 1.0 21 | script: jmeter/load.jmx 22 | - teststrategy: performance_10 23 | vuser: 50 24 | loopcount: 10 25 | thinktime: 250 26 | acceptederrorrate: 1.0 27 | script: jmeter/load.jmx 28 | - teststrategy: performance_quick 29 | vuser: 10 30 | loopcount: 100 31 | thinktime: 250 32 | acceptederrorrate: 1.0 33 | script: jmeter/load.jmx 34 | - teststrategy: performance_peak 35 | vuser: 10 36 | loopcount: 500 37 | thinktime: 250 38 | acceptederrorrate: 1.0 39 | script: jmeter/load.jmx 40 | - teststrategy: performance 41 | vuser: 10 42 | loopcount: 100 43 | thinktime: 250 44 | acceptederrorrate: 1.0 45 | script: jmeter/load.jmx -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/service_simplenode/servicedir.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/keptn_project_templates/two-stage-delivery-simplenode/service_simplenode/servicedir.txt -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/shipyard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: spec.keptn.sh/0.2.0 2 | kind: Shipyard 3 | metadata: 4 | name: "shipyard-two-stage-fast-delivery" 5 | spec: 6 | stages: 7 | - name: staging 8 | sequences: 9 | - name: delivery 10 | tasks: 11 | - name: deployment 12 | properties: 13 | deploymentstrategy: user_managed 14 | - name: test 15 | properties: 16 | teststrategy: functional 17 | - name: production 18 | sequences: 19 | - name: delivery 20 | triggeredOn: 21 | - event: staging.delivery.finished 22 | tasks: 23 | - name: monaco 24 | - name: deployment 25 | properties: 26 | deploymentstrategy: user_managed 27 | - name: test 28 | properties: 29 | teststrategy: functional 30 | - name: evaluation -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/management-zone/keptn-mz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "rules": [ 4 | { 5 | "type": "SERVICE", 6 | "enabled": true, 7 | "propagationTypes": [], 8 | "conditions": [ 9 | { 10 | "key": { 11 | "attribute": "SERVICE_TAGS" 12 | }, 13 | "comparisonInfo": { 14 | "type": "TAG", 15 | "operator": "EQUALS", 16 | "value": { 17 | "context": "CONTEXTLESS", 18 | "key": "keptn_project", 19 | "value": "{{ .project }}" 20 | }, 21 | "negate": false 22 | } 23 | }, 24 | { 25 | "key": { 26 | "attribute": "SERVICE_TAGS" 27 | }, 28 | "comparisonInfo": { 29 | "type": "TAG", 30 | "operator": "EQUALS", 31 | "value": { 32 | "context": "CONTEXTLESS", 33 | "key": "keptn_stage", 34 | "value": "{{ .stage }}" 35 | }, 36 | "negate": false 37 | } 38 | } 39 | ] 40 | } 41 | ], 42 | "dimensionalRules": [] 43 | } 44 | 45 | -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/management-zone/keptn-mz.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - management-zone-keptn-project-stage: "keptn-mz.json" 3 | 4 | management-zone-keptn-project-stage: 5 | - name: "Keptn: {{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_STAGE }}" 6 | - project: "{{ .Env.KEPTN_PROJECT }}" 7 | - stage: "{{ .Env.KEPTN_STAGE }}" 8 | - service: "{{ .Env.KEPTN_SERVICE }}" -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/synthetic-monitor/synthetic.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | - synthetic_http_prod_check: "synthetic_http.json" 3 | - synthetic_browser_prod_check: "synthetic_browser.json" 4 | 5 | synthetic_http_prod_check: 6 | - name: "HTTP Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 7 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} HTTP Check" 8 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_INGRESS" 9 | - project: "{{ .Env.KEPTN_PROJECT }}" 10 | - stage: "{{ .Env.KEPTN_STAGE }}" 11 | - service: "{{ .Env.KEPTN_SERVICE }}" 12 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC 13 | 14 | synthetic_browser_prod_check: 15 | - name: "Browser Check - {{ .Env.KEPTN_PROJECT }}.{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_STAGE }}" 16 | - description: "{{ .Env.KEPTN_PROJECT }} {{ .Env.KEPTN_SERVICE }} {{ .Env.KEPTN_STAGE }} Browser Check" 17 | - url: "http://{{ .Env.KEPTN_SERVICE }}.{{ .Env.KEPTN_PROJECT }}-{{ .Env.KEPTN_STAGE }}.REPLACE_KEPTN_INGRESS" 18 | - project: "{{ .Env.KEPTN_PROJECT }}" 19 | - stage: "{{ .Env.KEPTN_STAGE }}" 20 | - service: "{{ .Env.KEPTN_SERVICE }}" 21 | - location: "REPLACE_SYNTHETIC_LOCATION" # Frankfurt (AWS) would be GEOLOCATION-45AB48D9D6925ECC -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/synthetic-monitor/synthetic_browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "frequencyMin": 5, 4 | "enabled": true, 5 | "type": "BROWSER", 6 | "createdFrom": "GUI", 7 | "script": { 8 | "type": "clickpath", 9 | "version": "1.0", 10 | "configuration": { 11 | "device": { 12 | "deviceName": "Desktop", 13 | "orientation": "landscape" 14 | } 15 | }, 16 | "events": [ 17 | { 18 | "type": "navigate", 19 | "description": "Loading of Simplenode Homepage", 20 | "url": "{{ .url }}", 21 | "wait": { 22 | "waitFor": "page_complete" 23 | } 24 | }, 25 | { 26 | "type": "click", 27 | "description": "Click on Invoke", 28 | "target": { 29 | "locators": [ 30 | { 31 | "type": "css", 32 | "value": "#Invoke" 33 | } 34 | ] 35 | }, 36 | "button": 0 37 | } 38 | ] 39 | }, 40 | "locations": [ 41 | "{{ .location }}" 42 | ], 43 | "anomalyDetection": { 44 | "outageHandling": { 45 | "globalOutage": true, 46 | "localOutage": false, 47 | "localOutagePolicy": { 48 | "affectedLocations": null, 49 | "consecutiveRuns": null 50 | }, 51 | "retryOnError": true 52 | }, 53 | "loadingTimeThresholds": { 54 | "enabled": false, 55 | "thresholds": [] 56 | } 57 | }, 58 | "tags": [ 59 | { "context" : "CONTEXTLESS", "key" : "{{ .project }}"}, 60 | { "context" : "CONTEXTLESS", "key" : "{{ .service }}"}, 61 | { "context" : "CONTEXTLESS", "key" : "{{ .stage }}"} 62 | ], 63 | "managementZones": [], 64 | "automaticallyAssignedApps": [ 65 | ], 66 | "manuallyAssignedApps": [ 67 | ], 68 | "keyPerformanceMetrics": { 69 | "loadActionKpm": "VISUALLY_COMPLETE", 70 | "xhrActionKpm": "VISUALLY_COMPLETE" 71 | }, 72 | "events": [ 73 | ] 74 | } -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/dynatrace/projects/simplenode/synthetic-monitor/synthetic_http.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .name }}", 3 | "frequencyMin": 5, 4 | "enabled": true, 5 | "type": "HTTP", 6 | "createdFrom": "GUI", 7 | "script": { 8 | "version": "1.0", 9 | "requests": [ 10 | { 11 | "description": "{{ .description }}", 12 | "url": "{{ .url }}", 13 | "method": "GET", 14 | "validation": { 15 | "rules": [ 16 | { 17 | "value": ">=400", 18 | "passIfFound": false, 19 | "type": "httpStatusesList" 20 | } 21 | ], 22 | "rulesChaining": "or" 23 | }, 24 | "configuration": { 25 | "acceptAnyCertificate": true, 26 | "followRedirects": true 27 | } 28 | } 29 | ] 30 | }, 31 | "locations": [ 32 | "{{ .location }}" 33 | ], 34 | "anomalyDetection": { 35 | "outageHandling": { 36 | "globalOutage": true, 37 | "localOutage": false, 38 | "localOutagePolicy": { 39 | "affectedLocations": 1, 40 | "consecutiveRuns": 3 41 | } 42 | }, 43 | "loadingTimeThresholds": { 44 | "enabled": false, 45 | "thresholds": [ 46 | { 47 | "type": "TOTAL", 48 | "valueMs": 0 49 | } 50 | ] 51 | } 52 | }, 53 | "tags": [ 54 | { "context" : "CONTEXTLESS", "key" : "{{ .project }}"}, 55 | { "context" : "CONTEXTLESS", "key" : "{{ .service }}"}, 56 | { "context" : "CONTEXTLESS", "key" : "{{ .stage }}"} 57 | ], 58 | "managementZones": [], 59 | "automaticallyAssignedApps": [], 60 | "manuallyAssignedApps": [], 61 | "requests": [ 62 | { 63 | "name": "{{ .description }}", 64 | "sequenceNumber": 1 65 | } 66 | ] 67 | } -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://simplenode.REPLACE_KEPTN_PROJECT-production.REPLACE_KEPTN_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/helm/simplenode/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: simplenode 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/helm/simplenode/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: {{ .Values.keptn.service }}-ingress 5 | annotations: 6 | cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | kubernetes.io/ingress.class: nginx 9 | spec: 10 | tls: 11 | - hosts: 12 | - {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 13 | secretName: {{ .Values.ingress.secretName }} 14 | rules: 15 | - host: {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 16 | http: 17 | paths: 18 | - path: / 19 | pathType: Prefix 20 | backend: 21 | service: 22 | name: {{ .Values.keptn.service }} 23 | port: 24 | number: {{ .Values.service.port }} -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/helm/simplenode/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: default-view 5 | namespace: {{ .Release.Namespace }} 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: view 10 | subjects: 11 | - kind: ServiceAccount 12 | name: default 13 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/helm/simplenode/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.keptn.service }} 5 | spec: 6 | type: {{ .Values.service.type }} 7 | ports: 8 | - name: http 9 | port: {{ .Values.service.port }} 10 | protocol: TCP 11 | targetPort: {{ .Values.service.targetPport }} 12 | selector: 13 | app: {{ .Values.keptn.service }} -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/helm/simplenode/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_INGRESS 14 | 15 | service: 16 | name: simplenode 17 | stage: staging 18 | type: ClusterIP 19 | port: 8080 20 | targetPort: 8080 21 | 22 | resources: {} 23 | # We usually recommend not to specify default resources and to leave this as a conscious 24 | # choice for the user. This also increases chances charts run on environments with little 25 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 26 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 27 | # limits: 28 | # cpu: 100m 29 | # memory: 128Mi 30 | # requests: 31 | # cpu: 100m 32 | # memory: 128Mi 33 | 34 | nodeSelector: {} 35 | 36 | tolerations: [] 37 | 38 | affinity: {} 39 | -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_production/simplenode/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<600" 12 | warning: 13 | - criteria: 14 | - "<=800" 15 | - sli: throughput 16 | pass: 17 | - criteria: 18 | - ">4000" 19 | - sli: error_rate 20 | weight: 2 21 | pass: 22 | - criteria: 23 | - "<=1%" 24 | warning: 25 | - criteria: 26 | - "<=2%" 27 | - sli: response_time_p50 28 | - sli: response_time_p90 29 | pass: 30 | - criteria: 31 | - "<=500" 32 | warning: 33 | - criteria: 34 | - "<=600" 35 | total_score: 36 | pass: "90%" 37 | warning: "75%" -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/helm/endpoints.yaml: -------------------------------------------------------------------------------- 1 | #deploymentURIsLocal: 2 | # - "" # e.g. http://my-service.sockshop-dev:8080 3 | deploymentURIsPublic: 4 | - "http://simplenode.REPLACE_KEPTN_PROJECT-staging.REPLACE_KEPTN_INGRESS:80/" -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/helm/simplenode/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: simplenode 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/helm/simplenode/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: {{ .Values.keptn.service }}-ingress 5 | annotations: 6 | cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | kubernetes.io/ingress.class: nginx 9 | spec: 10 | tls: 11 | - hosts: 12 | - {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 13 | secretName: {{ .Values.ingress.secretName }} 14 | rules: 15 | - host: {{ .Values.keptn.service }}.{{ .Values.keptn.project }}-{{ .Values.keptn.stage }}.{{ .Values.ingress.ingressHost }} 16 | http: 17 | paths: 18 | - path: / 19 | pathType: Prefix 20 | backend: 21 | service: 22 | name: {{ .Values.keptn.service }} 23 | port: 24 | number: {{ .Values.service.port }} -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/helm/simplenode/templates/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: default-view 5 | namespace: {{ .Release.Namespace }} 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: ClusterRole 9 | name: view 10 | subjects: 11 | - kind: ServiceAccount 12 | name: default 13 | namespace: {{ .Release.Namespace }} -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/helm/simplenode/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.keptn.service }} 5 | spec: 6 | type: {{ .Values.service.type }} 7 | ports: 8 | - name: http 9 | port: {{ .Values.service.port }} 10 | protocol: TCP 11 | targetPort: {{ .Values.service.targetPport }} 12 | selector: 13 | app: {{ .Values.keptn.service }} -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/helm/simplenode/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for helm-guestbook. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: docker.io/grabnerandi/simplenodeservice:1.0.0 8 | pullPolicy: Always 9 | 10 | ingress: 11 | clusterIssuer: issuer.letsencrypt 12 | secretName: keptn-tls 13 | ingressHost: REPLACE_KEPTN_INGRESS 14 | 15 | service: 16 | name: simplenode 17 | stage: staging 18 | type: ClusterIP 19 | port: 8080 20 | targetPort: 8080 21 | 22 | resources: {} 23 | # We usually recommend not to specify default resources and to leave this as a conscious 24 | # choice for the user. This also increases chances charts run on environments with little 25 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 26 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 27 | # limits: 28 | # cpu: 100m 29 | # memory: 128Mi 30 | # requests: 31 | # cpu: 100m 32 | # memory: 128Mi 33 | 34 | nodeSelector: {} 35 | 36 | tolerations: [] 37 | 38 | affinity: {} 39 | -------------------------------------------------------------------------------- /keptn_project_templates/two-stage-delivery-simplenode/stage_staging/simplenode/slo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | spec_version: '0.1.0' 3 | comparison: 4 | compare_with: "single_result" 5 | include_result_with_score: "pass" 6 | aggregate_function: avg 7 | objectives: 8 | - sli: response_time_p95 9 | pass: 10 | - criteria: 11 | - "<600" 12 | warning: 13 | - criteria: 14 | - "<=800" 15 | - sli: throughput 16 | pass: 17 | - criteria: 18 | - ">4000" 19 | - sli: error_rate 20 | weight: 2 21 | pass: 22 | - criteria: 23 | - "<=1%" 24 | warning: 25 | - criteria: 26 | - "<=2%" 27 | - sli: response_time_p50 28 | - sli: response_time_p90 29 | pass: 30 | - criteria: 31 | - "<=500" 32 | warning: 33 | - criteria: 34 | - "<=600" 35 | total_score: 36 | pass: "90%" 37 | warning: "75%" -------------------------------------------------------------------------------- /kubectl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keptn-sandbox/keptn-on-k3s/c945234404648f7103b2ebca82e1d5aa918c30ab/kubectl -------------------------------------------------------------------------------- /performance.testing.triggered.placeholder.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "project": "$PROJECT", 4 | "stage": "$STAGE", 5 | "service": "$SERVICE", 6 | "labels": { 7 | "user" : "$USER", 8 | "buildId" : "$VERSION" 9 | }, 10 | "test": { 11 | "teststrategy": "$TESTSTRATEGY" 12 | }, 13 | "deployment": { 14 | "deploymentURIsPublic": [ 15 | "$URL" 16 | ] 17 | } 18 | }, 19 | "source": "my-automation-script", 20 | "specversion": "1.0", 21 | "type": "sh.keptn.event.$STAGE.testing.triggered", 22 | "shkeptnspecversion": "0.2.0" 23 | } -------------------------------------------------------------------------------- /trigger.performance.testing.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PROJECT=$1 4 | STAGE=$2 5 | SERVICE=$3 6 | TESTSTRATEGY=$4 7 | URL=${5//\//\\/} 8 | VERSION=$6 9 | USER=$7 10 | 11 | if [[ -z "$VERSION" ]]; then 12 | VERSION="1.0" 13 | fi 14 | 15 | if [[ -z "$USER" ]]; then 16 | USER="noname" 17 | fi 18 | 19 | if [[ -z "$PROJECT" || -z "$STAGE" || -z "$SERVICE" || -z "$URL" || -z "$TESTSTRATEGY" ]]; then 20 | echo "Please specify project, stage, service, test strategy and URL. Optionally specify your version and user:" 21 | echo "Usage: $0 PROJECT STAGE SERVICE TESTSTRATEGY URL [VERSION] [USER]" 22 | echo "Example: $0 perfservice performance simplenodeservice performance http://YOURURL 1.1 Andi" 23 | exit 1 24 | fi 25 | 26 | # Generate a temp file with replaced placeholders 27 | inputfile="performance.testing.triggered.placeholder.json" 28 | tmpfile="performance.testing.triggered.placeholder.tmp" 29 | 30 | if [ -f $tmpfile ] ; then 31 | rm -f $tmpfile 32 | fi 33 | 34 | sed -e "s/\$PROJECT/$PROJECT/" -e "s/\$STAGE/$STAGE/" -e "s/\$SERVICE/$SERVICE/" -e "s/\$TESTSTRATEGY/$TESTSTRATEGY/" -e "s/\$USER/$USER/" -e "s/\$VERSION/$VERSION/" -e "s/\$URL/$URL/" $inputfile >> $tmpfile 35 | 36 | # now lets execute the keptn command 37 | keptn send event --file=$tmpfile 38 | --------------------------------------------------------------------------------