From 9def3da85fb371e5402a2b9e9b515c18c391a6a6 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Tue, 9 Jan 2024 22:10:13 -0800 Subject: [PATCH 01/10] docs: analysis for non-k8s deploymens Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 116 +++++++++++++++++++++++------ 1 file changed, 93 insertions(+), 23 deletions(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index f136973ab9..600dc7228d 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -1,29 +1,44 @@ -# Keptn - Kubernetes +# Keptn for non-Kubernetes deployments -Keptn Tasks running on a Kubernetes cluster -can be triggered for [workloads](https://kubernetes.io/docs/concepts/workloads/) and applications -that are deployed outside of Kubernetes. -For example, Keptn could trigger load and performance tests -for an application that is deployed on a virtual machine. - -To do this: +Keptn can interact with deployments that are not running on Kubernetes +even though Keptn mainly targets Kubernetes deployments. +The following functionality is available for deployments not on Kubernetes: -- [Install Keptn on a Kubernetes cluster](#install-keptn-on-a-kubernetes-cluster) -- [Create a KeptnTaskDefinition](#create-a-keptntaskdefinition) -- [Create and apply a KeptnTask](#create-and-apply-a-keptntask) -- [Re-run the KeptnTask](#re-run-the-keptntask) +- [Run Keptn tasks](#run-keptntask-for-a-deployment-not-on-kubernetes) +- [Run Keptn analysis](#run-keptn-analysis-for-a-deployment-not-on-kubernetes) -## Install Keptn on a Kubernetes cluster - -You must set up a Kubernetes cluster and -[install](../installation/index.md#basic-installation) +To use either of these features, +you must set up a Kubernetes cluster and +[install](../installation/_index.md#basic-installation) Keptn on it, but this can be a very lightweight, single-node KinD cluster; see [Create local Kubernetes cluster](../installation/k8s.md#create-local-kubernetes-cluster). -Keptn only triggers on-demand `KeptnTask` resources +Keptn only runs on-demand `KeptnTask` and `KeptnAnaylsis` resources so resource utilization is minimal. -## Create a KeptnTaskDefinition +## Run KeptnTask for a deployment not on Kubernetes + +Keptn tasks running on a Kubernetes cluster can be triggered for +[workloads](https://kubernetes.io/docs/concepts/workloads/) +and applications that are deployed outside of Kubernetes. +For example, Keptn can run (or "trigger") +load and performance tests +for an application that is deployed on a virtual machine. +It does this by specifing a container image that should be executed. +You specify the container in a `KeptnTaskDefinition` resource; see +[Deployment tasks](../guides/tasks.md) for more information. +The `KeptnTask` runs as a Kubernetes +[job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) +on the cluster where Keptn is installed. + +To implement this, install Keptn on a Kubernetes cluster +as described above, then:: + +- [Create a KeptnTaskDefinition](#create-a-keptntaskdefinition) +- [Create and apply a KeptnTask](#create-and-apply-a-keptntask) +- [Re-run the KeptnTask](#re-run-the-keptntask) + +### Create a KeptnTaskDefinition When you have Keptn installed, create a YAML file that defines what you want to execute @@ -58,11 +73,14 @@ See [Runners and containers](../guides/tasks.md#runners-and-containers) for more information. -## Create and apply a KeptnTask +### Create and apply a KeptnTask You must manually create the [KeptnTask](../reference/crd-reference/task.md) resource. -In the standard operating mode, when Keptn is managing [workloads](https://kubernetes.io/docs/concepts/workloads/), +In the standard operating mode, +when Keptn is managing +[workloads](https://kubernetes.io/docs/concepts/workloads/) +for deploymens running on Kubernetes, the creation of the `KeptnTask` resource is automatic. Moreover, each time you want to execute a `KeptnTask`, @@ -96,7 +114,10 @@ You can then apply this YAML file with the following command: kubectl apply -f test-task.yaml -n my-keptn-annotated-namespace ``` -Applying this file causes Keptn to create a Job and a Pod +Applying this file causes Keptn to create a Kubernetes +[job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) +and a Kubernetes +[pod](https://kubernetes.io/docs/concepts/workloads/pods/) and run the executables defined in the associated `KeptnTaskDefinition` resource. @@ -107,7 +128,9 @@ kubectl get keptntasks -n my-keptn-annotated-namespace kubectl get pods -n my-keptn-annotated-namespace ``` -## Re-run the KeptnTask +See the + +### Re-run the KeptnTask For subsequent KeptnTask runs, the `KeptnTask` name and version fields must be unique, @@ -134,8 +157,55 @@ spec: workloadVersion: "1.0.1" ``` -You can then apply this file with the following command: +Use the following command to apply this resource: ```shell kubectl apply -f test-task-2.yaml -n my-keptn-annotated-namespace ``` + +See the +[Deployment tasks](../guides/tasks.md) +guide and associated reference pages +for more information about running Keptn tasks +with deployments that do not run on Kubernetes. + +## Run Keptn analysis for a deployment not on Kubernetes + +The Keptn analyses feature +analyzes Service Level Objectives (SLOs) +based on Service Level Inputs (SLIs). +It can apply weights to reach a composite score +about the health of the deployment, +similar to what the Keptn v1 quality gates provided. +The data used can come from multiple instances +of multiple data providers +(such as Prometheus, Dynatrace, and DataDog). + +A Keptn analysis can be run for any application running anywhere +as long Keptn can access a monitoring provider endpoint +that serves metrics for the application. +You can point to multiple instances of the supported monitoring providers +(Prometheus, Dynatrace, Datadog, and dql) +so the application itself can run anywhere, + +To implement a Keptn analysis for your deployment: + +- Create a `KeptnMetricProvider` resource + for each data source to be used for your analysis. + This specifies the URL for the data source, + assigns a `name` that Keptn uses to reference that provider, + and can define a secret for the data provider if necessary. + +- Create `ValueTemplate` resources for each SLI + and `AnalysisDefinition` resources for each SLO + to be used in your analysis + +- Create and apply an `Analysis` resource + to define each specific analysis you want to run. + +See the +[Analysis](../guides/slo.md) +guide and the +[Analyzing Application Performance with Keptn](https://keptn.sh/latest/blog/2023/12/19/analyzing-application-performance-with-keptn/) +blog +for more details and examples for the Keptn analysis feature. From 8f741decfe1440468296851cbfc74e3db738d497 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Tue, 9 Jan 2024 22:26:44 -0800 Subject: [PATCH 02/10] link to the non-k8s page from Migration Guide Signed-off-by: Meg McRoberts --- docs-new/docs/migrate/strategy.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs-new/docs/migrate/strategy.md b/docs-new/docs/migrate/strategy.md index eeda538279..712220a1f7 100644 --- a/docs-new/docs/migrate/strategy.md +++ b/docs-new/docs/migrate/strategy.md @@ -1,12 +1,5 @@ # Migration strategy -> **Note** -This section is under development. -Information that is published here has been reviewed for technical accuracy -but the format and content is still evolving. -We hope you will contribute your experiences -and questions that you have. - Before you begin the migration project, we suggest that you run through the exercises in [Getting started](../getting-started/index.md) @@ -30,6 +23,12 @@ Much of the logic and functionality of your Keptn v1 projects can be migrated to Keptn but must be rewritten to utilize Keptn components. +Keptn targets deployments that run on Kubernetes +but some Keptn functionality can be used with deployments +that do not run on Kubernetes. See +[Keptn for non-Kubernetes deployments](../use-cases/non-k8s.md) +for details. + Some key points: * Keptn uses native Kubernetes CRDs From d07003c0d6b0545989aaaf254ce2e49016de77dc Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Tue, 9 Jan 2024 22:38:08 -0800 Subject: [PATCH 03/10] fix typos Signed-off-by: Meg McRoberts --- docs-new/docs/migrate/strategy.md | 3 ++- docs-new/docs/use-cases/non-k8s.md | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs-new/docs/migrate/strategy.md b/docs-new/docs/migrate/strategy.md index 712220a1f7..2536b74aa4 100644 --- a/docs-new/docs/migrate/strategy.md +++ b/docs-new/docs/migrate/strategy.md @@ -25,7 +25,8 @@ but must be rewritten to utilize Keptn components. Keptn targets deployments that run on Kubernetes but some Keptn functionality can be used with deployments -that do not run on Kubernetes. See +that do not run on Kubernetes. +See [Keptn for non-Kubernetes deployments](../use-cases/non-k8s.md) for details. diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index 600dc7228d..1566111b54 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -9,11 +9,11 @@ The following functionality is available for deployments not on Kubernetes: To use either of these features, you must set up a Kubernetes cluster and -[install](../installation/_index.md#basic-installation) +[install](../installation/index.md#basic-installation) Keptn on it, but this can be a very lightweight, single-node KinD cluster; see [Create local Kubernetes cluster](../installation/k8s.md#create-local-kubernetes-cluster). -Keptn only runs on-demand `KeptnTask` and `KeptnAnaylsis` resources +Keptn only runs on-demand `KeptnTask` and `KeptnAnalysis` resources so resource utilization is minimal. ## Run KeptnTask for a deployment not on Kubernetes @@ -24,7 +24,7 @@ and applications that are deployed outside of Kubernetes. For example, Keptn can run (or "trigger") load and performance tests for an application that is deployed on a virtual machine. -It does this by specifing a container image that should be executed. +It does this by specifying a container image that should be executed. You specify the container in a `KeptnTaskDefinition` resource; see [Deployment tasks](../guides/tasks.md) for more information. The `KeptnTask` runs as a Kubernetes @@ -80,7 +80,7 @@ You must manually create the In the standard operating mode, when Keptn is managing [workloads](https://kubernetes.io/docs/concepts/workloads/) -for deploymens running on Kubernetes, +for deployments running on Kubernetes, the creation of the `KeptnTask` resource is automatic. Moreover, each time you want to execute a `KeptnTask`, From f22024cc38a0687141d09b6632504d7271945cfe Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Wed, 10 Jan 2024 15:40:14 -0800 Subject: [PATCH 04/10] Update docs-new/docs/use-cases/non-k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: Florian Bacher Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index 1566111b54..1752d3dd76 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -23,7 +23,9 @@ Keptn tasks running on a Kubernetes cluster can be triggered for and applications that are deployed outside of Kubernetes. For example, Keptn can run (or "trigger") load and performance tests -for an application that is deployed on a virtual machine. +for an application that is deployed on a virtual machine, +or any other environment, as long as it can be reached +by the container running the KeptnTask. It does this by specifying a container image that should be executed. You specify the container in a `KeptnTaskDefinition` resource; see [Deployment tasks](../guides/tasks.md) for more information. From 1b26ede28a756494aae5181fbd72cc36d70cde66 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Wed, 10 Jan 2024 15:41:21 -0800 Subject: [PATCH 05/10] Update docs-new/docs/use-cases/non-k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: Florian Bacher Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index 1752d3dd76..1c54d1cc90 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -188,7 +188,7 @@ as long Keptn can access a monitoring provider endpoint that serves metrics for the application. You can point to multiple instances of the supported monitoring providers (Prometheus, Dynatrace, Datadog, and dql) -so the application itself can run anywhere, +so the application itself can run anywhere. To implement a Keptn analysis for your deployment: From bbf6eb57794d76271733ca56a16d6fc7996c5fe2 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Wed, 10 Jan 2024 15:42:14 -0800 Subject: [PATCH 06/10] Update docs-new/docs/use-cases/non-k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: Florian Bacher Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index 1c54d1cc90..db9af7483c 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -199,7 +199,7 @@ To implement a Keptn analysis for your deployment: and can define a secret for the data provider if necessary. - Create `ValueTemplate` resources for each SLI - and `AnalysisDefinition` resources for each SLO + and an `AnalysisDefinition` resource that contains all SLOs to be used in your analysis - Create and apply an `Analysis` resource From 220f60f5f1036193f2be93f09a064e304f205828 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Wed, 10 Jan 2024 15:43:28 -0800 Subject: [PATCH 07/10] Update docs-new/docs/use-cases/non-k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: Florian Bacher Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index db9af7483c..424c22cbad 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -198,7 +198,7 @@ To implement a Keptn analysis for your deployment: assigns a `name` that Keptn uses to reference that provider, and can define a secret for the data provider if necessary. -- Create `ValueTemplate` resources for each SLI +- Create `AnalysisValueTemplate` resources for each SLI and an `AnalysisDefinition` resource that contains all SLOs to be used in your analysis From 649b489c755b03127922e0777f1d641539d60772 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Wed, 10 Jan 2024 21:57:34 -0800 Subject: [PATCH 08/10] Flo comments & other fixes Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index 424c22cbad..fd3454e203 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -38,7 +38,6 @@ as described above, then:: - [Create a KeptnTaskDefinition](#create-a-keptntaskdefinition) - [Create and apply a KeptnTask](#create-and-apply-a-keptntask) -- [Re-run the KeptnTask](#re-run-the-keptntask) ### Create a KeptnTaskDefinition @@ -118,8 +117,6 @@ kubectl apply -f test-task.yaml -n my-keptn-annotated-namespace Applying this file causes Keptn to create a Kubernetes [job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) -and a Kubernetes -[pod](https://kubernetes.io/docs/concepts/workloads/pods/) and run the executables defined in the associated `KeptnTaskDefinition` resource. @@ -130,12 +127,8 @@ kubectl get keptntasks -n my-keptn-annotated-namespace kubectl get pods -n my-keptn-annotated-namespace ``` -See the - -### Re-run the KeptnTask - For subsequent KeptnTask runs, -the `KeptnTask` name and version fields must be unique, +the values of the `KeptnTask` `name` and `version` fields must be unique, so copy the `KeptnTask` yaml file you have and update the `metadata.name` field. From 6ad7296182c24fde3998d96aad6c145f51ba96be Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Thu, 11 Jan 2024 23:15:55 -0800 Subject: [PATCH 09/10] Update docs-new/docs/use-cases/non-k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com> Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index fd3454e203..7d7da1df70 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -168,7 +168,7 @@ with deployments that do not run on Kubernetes. The Keptn analyses feature analyzes Service Level Objectives (SLOs) -based on Service Level Inputs (SLIs). +based on Service Level Indicators (SLIs). It can apply weights to reach a composite score about the health of the deployment, similar to what the Keptn v1 quality gates provided. From b95d5650b40d79ef155ec4c2f789fedf89cf4144 Mon Sep 17 00:00:00 2001 From: Meg McRoberts Date: Fri, 12 Jan 2024 01:05:35 -0800 Subject: [PATCH 10/10] Update docs-new/docs/use-cases/non-k8s.md Signed-off-by: Meg McRoberts meg.mcroberts@dynatrace.com Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com> Signed-off-by: Meg McRoberts --- docs-new/docs/use-cases/non-k8s.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs-new/docs/use-cases/non-k8s.md b/docs-new/docs/use-cases/non-k8s.md index 7d7da1df70..b48137df76 100644 --- a/docs-new/docs/use-cases/non-k8s.md +++ b/docs-new/docs/use-cases/non-k8s.md @@ -171,7 +171,8 @@ analyzes Service Level Objectives (SLOs) based on Service Level Indicators (SLIs). It can apply weights to reach a composite score about the health of the deployment, -similar to what the Keptn v1 quality gates provided. +similar to what the metrics evaluations of the +Keptn v1 quality gates feature provided. The data used can come from multiple instances of multiple data providers (such as Prometheus, Dynatrace, and DataDog).