Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quickstart/automated-operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ keptn add-resource --project=$PROJECT --service=$SERVICE --stage=production --re
wait_for_deployment_in_namespace "job-executor-service" "keptn"

print_headline "Simulate Alert (Problem)"
echo -e "{\"type\": \"sh.keptn.event.production.remediation.triggered\",\"specversion\":\"1.0\",\"source\":\"https:\/\/github.com\/keptn\/keptn\/prometheus-service\",\"id\": \"f2b878d3-03c0-4e8f-bc3f-454bc1b3d79d\", \"time\": \"2019-06-07T07:02:15.64489Z\", \"contenttype\": \"application\/json\", \"data\": {\"project\": \"podtatohead\",\"stage\": \"production\",\"service\": \"helloservice\",\"problem\": { \"problemTitle\": \"out_of_memory\",\"rootCause\": \"Response time degradation\"}}}" > remediation_trigger.json | keptn send event -f remediation_trigger.json
echo -e "{\"type\": \"sh.keptn.event.production.remediation.triggered\",\"specversion\":\"1.0\",\"source\":\"https:\/\/github.com\/keptn-contrib\/prometheus-service\",\"id\": \"f2b878d3-03c0-4e8f-bc3f-454bc1b3d79d\", \"time\": \"2019-06-07T07:02:15.64489Z\", \"contenttype\": \"application\/json\", \"data\": {\"project\": \"podtatohead\",\"stage\": \"production\",\"service\": \"helloservice\",\"problem\": { \"problemTitle\": \"out_of_memory\",\"rootCause\": \"Response time degradation\"}}}" > remediation_trigger.json | keptn send event -f remediation_trigger.json

print_headline "Have a look at the Keptn Bridge and explore the demo project"

Expand Down
4 changes: 2 additions & 2 deletions quickstart/demo/jmeter/jmeter.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
spec_version: '0.1.0'
workloads:
- teststrategy: performance
vuser: 35
loopcount: 600
vuser: 30
loopcount: 150
script: jmeter/load.jmx
acceptederrorrate: 1.0
- teststrategy: performance_light
Expand Down
6 changes: 3 additions & 3 deletions quickstart/demo/prometheus/sli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
spec_version: '1.0'
indicators:
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]))
failing_request: promhttp_metric_handler_requests_total{code!="200",job="$SERVICE-$PROJECT-$STAGE"}
http_requests_total_sucess: http_requests_total{status="success"}
failing_request: promhttp_metric_handler_requests_total{code!="200",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS]
http_requests_total_sucess: http_requests_total{status="success",job="$SERVICE-$PROJECT-$STAGE"}
go_routines: go_goroutines{job="$SERVICE-$PROJECT-$STAGE"}
request_throughput: sum(rate(http_requests_total{status="success"}[2m]))
request_throughput: sum(rate(http_requests_total{status="success",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS]))
4 changes: 2 additions & 2 deletions quickstart/demo/slo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ objectives:
key_sli: true
pass:
- criteria:
- "<=90"
- "<=30"
- sli: failing_request
displayName: "Failing Requests"
pass:
- criteria:
- "< 10"
total_score:
pass: "90%"
warning: "75%"
warning: "75%"
14 changes: 8 additions & 6 deletions quickstart/multistage-delivery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set -e

PROJECT="podtatohead"
SERVICE="helloservice"
IMAGE="docker.io/jetzlstorfer/helloserver"
VERSION=0.1.1
SLOW_VERSION=0.1.2
IMAGE="ghcr.io/podtato-head/podtatoserver"
VERSION=v0.1.1
SLOW_VERSION=v0.1.2

#source <(curl -s https://raw.githubusercontent.com/keptn/keptn/0.8.5/test/utils.sh)

Expand Down Expand Up @@ -123,6 +123,8 @@ kubectl create ns monitoring
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install prometheus prometheus-community/prometheus --namespace monitoring --wait

verify_test_step $? "Install prometheus failed"

kubectl apply -f - <<EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -148,8 +150,8 @@ verify_test_step $? "Applying Ingress for Prometheus failed"
echo "Prometheus is available at http://prometheus.$INGRESS_IP.nip.io:$INGRESS_PORT "

print_headline "Setting up Prometheus integration"
kubectl apply -f https://raw.githubusercontent.com/keptn-contrib/prometheus-service/release-0.7.0/deploy/role.yaml -n monitoring
kubectl apply -f https://raw.githubusercontent.com/keptn-contrib/prometheus-service/release-0.7.0/deploy/service.yaml
kubectl apply -f https://raw.githubusercontent.com/keptn-contrib/prometheus-service/release-0.7.1/deploy/role.yaml -n monitoring
kubectl apply -f https://raw.githubusercontent.com/keptn-contrib/prometheus-service/release-0.7.1/deploy/service.yaml

promsecretdata="url: http://prometheus-server.monitoring.svc.cluster.local:80"
echo "kubectl create secret generic -n keptn prometheus-credentials-$PROJECT --from-literal=prometheus-credentials=$promsecretdata"
Expand Down Expand Up @@ -218,4 +220,4 @@ echo "Learn more at https://keptn.sh/docs/0.9.x/manage/git_upstream/ "
echo "You can run a new delivery sequence with the following command"
echo "keptn trigger delivery --project=$PROJECT --service=$SERVICE --image=$IMAGE --tag=$VERSION"
echo "or by deploying a slow version that will not pass the quality gate"
echo "keptn trigger delivery --project=$PROJECT --service=$SERVICE --image=$IMAGE --tag=$SLOW_VERSION"
echo "keptn trigger delivery --project=$PROJECT --service=$SERVICE --image=$IMAGE --tag=$SLOW_VERSION"