Skip to content

Commit

Permalink
initial commit for 0.14.1
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Grabner <[email protected]>
  • Loading branch information
grabnerandi committed Apr 4, 2022
1 parent 2808946 commit aae49bd
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ If you navigate to this repository because you are part of a **Cloud Automation
| [@grabnerandi](https://github.com/grabnerandi) | [release-0.11.0](https://github.com/keptn-sandbox/keptn-on-k3s/tree/release-0.11.0) | 0.11.0 | Updates to Keptn 0.11.x |
| [@grabnerandi](https://github.com/grabnerandi) | [release-0.12.0](https://github.com/keptn-sandbox/keptn-on-k3s/tree/release-0.12.0) | 0.12.0 | Updates to Keptn 0.12.x |
| [@grabnerandi](https://github.com/grabnerandi) | [release-0.13.1](https://github.com/keptn-sandbox/keptn-on-k3s/tree/release-0.13.1) | 0.13.1 | Updates to Keptn 0.13.1 |
| [@grabnerandi](https://github.com/grabnerandi) | [release-0.13.4](https://github.com/keptn-sandbox/keptn-on-k3s/tree/release-0.13.4) | 0.13.4 | Updates to Keptn 0.13.4 + adding Job Executor|
| [@grabnerandi](https://github.com/grabnerandi) | [release-0.13.4](https://github.com/keptn-sandbox/keptn-on-k3s/tree/release-0.13.4) | 0.13.4 | Updates to Keptn 0.13.4 + adding Job Executor |
| [@grabnerandi](https://github.com/grabnerandi) | [release-0.14.1](https://github.com/keptn-sandbox/keptn-on-k3s/tree/release-0.14.1) | 0.13.4 | Updates to Keptn 0.14.1|

This repo automates the installation of [Keptn's](https://keptn.sh) Control Plane, Delivery or Execution. For that it will automatically install a [k3s](https://k3s.io).
This is your fastest way to explore the following use cases:
Expand Down Expand Up @@ -73,7 +74,7 @@ sudo wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64

git clone https://github.com/keptn-sandbox/keptn-on-k3s
cd keptn-on-k3s
git checkout release-0.13.4
git checkout release-0.14.1
```

### Currently tested on:
Expand Down
6 changes: 3 additions & 3 deletions install-keptn-on-k3s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eu

# Keptn Version Information
KEPTNVERSION=${KEPTNVERSION:-0.13.4}
KEPTNVERSION=${KEPTNVERSION:-0.14.1}
KEPTN_TYPE="controlplane"
KEPTN_DELIVERYPLANE=false
KEPTN_EXECUTIONPLANE=false
Expand Down Expand Up @@ -39,10 +39,10 @@ KEPTN_EXECUTION_PLANE_PROJECT_FILTER=${KEPTN_EXECUTION_PLANE_PROJECT_FILTER:-""}
# # PROM_SLI_SERVICE_VERSION="release-0.3.0" <<-- has been merged with the prometheus service
DT_SERVICE_VERSION="0.22.0"
# DT_SLI_SERVICE_VERSION="release-0.12.0" <<-- has been merged with dynatrace-service!
JOBEEXECUTOR_SERVICE_VERSION="0.1.8-next.2"
JOBEEXECUTOR_SERVICE_VERSION="0.1.8"
GENERICEXEC_SERVICE_VERSION="release-0.8.4"
MONACO_SERVICE_VERSION="release-0.9.1" # migratetokeptn08
ARGO_SERVICE_VERSION="release-0.8.4" # updates/finalize08
ARGO_SERVICE_VERSION="release-0.9.2" # updates/finalize08
LOCUST_SERVICE_VERSION="release-0.1.5"

# Dynatrace Credentials
Expand Down
20 changes: 20 additions & 0 deletions keptn_project_templates/delivery-rollout/job/job.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v2
actions:
- name: "Validate Deployment using a Python Script"
events:
- name: "sh.keptn.event.deployment.triggered"
tasks:
- name: "Run bash script"
files:
- /job/validate.triggered.py
env:
- name: SHKEPTNCONTEXT
value: "$.shkeptncontext"
valueFrom: event
- name: SOURCE
value: "$.source"
valueFrom: event
workingDir: "/keptn"
image: "python:3.10"
cmd: ["python3"]
args: ["./job/validate.triggered.py"]
27 changes: 27 additions & 0 deletions keptn_project_templates/delivery-rollout/job/validate.triggered.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# This is a script that will be executed by the Keptn Generic Executor Service
# 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

if [[ "$DATA_VALIDATE_WAITTIME" == "" ]]; then
DATA_VALIDATE_WAITTIME="10s"
fi

echo "Validate Triggered Script for $DATA_PROJECT.$DATA_STAGE.$DATA_SERVICE"
echo "We are simply waiting for the passed time: $DATA_VALIDATE_WAITTIME"

sleep "$DATA_VALIDATE_WAITTIME"

if [[ "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" != "" ]]; then
echo "And now we validate whether we can reach the deployment Url: $DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0"
wget "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" -q -O /dev/null

if [[ "$?" != "0" ]]; then
echo "wget returned $? - we retry once more!"
sleep "$DATA_VALIDATE_WAITTIME"
echo "Second attempt to validate deployment Url: $DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0"
wget "$DATA_DEPLOYMENT_DEPLOYMENTURISPUBLIC_0" -q -O /dev/null

echo "wget returned $?"
fi
fi

0 comments on commit aae49bd

Please sign in to comment.