GithubHelp home page GithubHelp logo

argocd-keptn-demo's Introduction

Argo CD and Keptn Demo for ArgoCon 2024

This is the companion demo for the ArgoCon 2024 talk Why is it taking that long? Shining the light on Application Syncs in Argo with Keptn

Watch the recording of the talk on the CNCF YouTube Channel

The goal of this demo is to show how Keptn creates OpenTelemetry traces and prometheus metrics to provide observability driven answers to questions like:

  • How many applications and workloads are getting deployed?
  • How long do deployments take and whats the success rate?
  • Whats the root cause of slow or failing deployments?

This demo installs ArgoCD which then installs a set of platform tools such as OpenTelemetry, Jaeger, Grafana, Keptn and some demo apps to demo the observability insights Keptn provides. Here is a screenshot showing one of the apps shown in ArgoCD and the corresponding OpenTelemetry trace that gives insights into what the K8s Pod Scheduler did to fulfill the deployment request!

ArgoCD showing Podtatehead application

Jaeger OpenTelemetry Trace in Grafana for the same application

Grafana dashboard with some deployment metrics and access to traces

Bootstrapping Argo CD

kind create cluster --config kind-cluster.yaml
kubectl apply -k argocd
kubectl apply -f apps.yaml

Once everything is up & running you can deploy the extra demo apps

kubectl apply -f simplenodeapp.yaml
kubectl apply -f podtatoheadapp.yaml

This example includes a devcontainer configuration, allowing you to automatically create an environment for testing using the VSCode Dev Containers extension or GitHub Codespaces.

Accessing the Argo CD UI

Navigate to https://localhost:8080/ on the machine with the kind cluster running.

Get the generated admin password.

argocd admin initial-password -n argocd

Or:

cat ~/argo-cd-admin-password.txt

Or:

ARGOCDPWD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
echo $ARGOCDPWD

Accessing the Grafana UI

Navigate to https://localhost:8082/ on the machine with the kind cluster running (the dev container also forwards this port).

The username and password are admin.

Clean Up

kind delete cluster --name argocd-keptn

Examples

Keptn has created a resource called a KeptnApp to track your application. The name of which is based on the part-of label.

$ kubectl -n demo get keptnapp
NAME           AGE
keptndemoapp   3m20s

Keptn also creates a new application version every time you increment the version label.

The PHASE will change as the deployment progresses. A successful deployment is shown as PHASE=Completed

$ kubectl -n demo get keptnappversion
NAME                          APPNAME        VERSION   PHASE
keptndemoapp-0.0.1-6b86b273   keptndemoapp   0.0.1     Completed
keptndemoapp-0.0.2-d4735e3a   keptndemoapp   0.0.2     Completed

Keptn is generating DORA metrics and OpenTelemetry traces for your deployments.

These metrics are exposed via the Keptn lifecycle operator /metrics endpoint on port 2222.

To see these raw metrics:

SERVICE=$(kubectl get svc -l control-plane=lifecycle-operator -A -ojsonpath="{.items[0].metadata.name}")
kubectl -n keptn-lifecycle-toolkit-system port-forward svc/$SERVICE 8081:2222

Access metrics in Prometheus format on http://localhost:8081/metrics

Look for metrics starting with keptn_

More demo apps

You can deploy two additional demo applications provided by this repository Simplenode (single node.js based microservice) and Podtatohead (the sample app of TAG AppDelivery)

kubectl apply -f simplenodeapp.yaml
kubectl apply -f podtatoheadapp.yaml

additional screenshots from this demo

argocd-keptn-demo's People

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.