kep • tn
Definition of keptn
Benefit of Keptn for different personas
Developers
to focus on code instead of writing tons of configuration files
DevOps
to focus on tools instead of building complex pipelines
SREs
to automate processes instead of manually handling issues
Just download the Keptn CLI
curl -sL https://get.keptn.sh | sudo -E bash
And deploy Keptn on your Kubernetes cluster
keptn install [--use-case=continuous-delivery]
Keptn will be installed with its control-plane for quality gates and automated operations. If the --use-case
flag is set, the services for continuous delivery will be installed too.
Define your delivery process using a shipyard file and create a new project using your shipyard.yaml file:
keptn create project sockshop
--shipyard=./shipyard.yaml
stages:
- name: "dev"
deployment_strategy: "direct"
test_strategy: "functional"
- name: "staging"
approval_strategy:
pass: "automatic"
warning: "manual"
deployment_strategy: "blue_green_service"
test_strategy: "performance"
- name: "production"
approval_strategy:
pass: "manual"
warning: "manual"
deployment_strategy: "blue_green_service"
remediation_strategy: "automated"
Just onboard a service by providing an initial minimal set of Helm charts allowing to deploy your service
Your service will be onboarded automatically. Keptn will create the proper Helm charts and Istio configuration behind the scenes. All configuration is stored GitOps-style in a Git repository, which you can link to any upstream repository.
keptn onboard service carts
--project=sockshop --chart=./carts
New workflows in Keptn are triggered by sending a new-artifact event either via the CLI or the Keptn API. You can easily add this your Continuous Integration scripts.
keptn send event new-artifact --project=sockshop
--service=carts-db --image=mongo
Keptn will then start the deployment automatically, following the strategy defined in the shipyard file. After the deployment, Keptn starts the tests, evaluates the quality gates, and in case of a problem, Keptn rolls back the last changes.
Keptn traces every event and all resulting actions and provides real-time tracing information and a powerful API enabling full visibility of every deployment and operations triggered via Keptn.
Provide a remediation file as part of your
deployment or service onboarding enabling
automatically executing remediation workflows
apiVersion: spec.keptn.sh/0.1.4
kind: Remediation
metadata:
name: serviceXYZ-remediation
spec:
remediations:
- problemType: Response time degradation
actionsOnOpen:
- name: Scaling ReplicaSet by 1
description: Scales the ReplicaSet of a Deployment
action: scaling
value: "1"
- name: Toogle feature flag
action: featuretoggle
description: Toggles feature flag EnablePromotion
value:
EnablePromotion: off
keptn add-resource --project=sockshop
--service=carts --stage=production
--resource=remediation.yaml
--resourceUri=remediation.yaml
Remediation command
{
"type": "sh.keptn.events.problem",
"shkeptncontext":
"08735340-6f9e-4b32-97ff-3b6c292bc509",
"data": {
"ImpactedEntity": "carts-primary",
"ProblemTitle": "cpu_usage_sockshop_carts",
"State": "OPEN"
},
}
keptn send event --file=problem.json
Whether you are an end useror you want to participate in the project, we’d love to hear from you! You can find more information about how to reach us in the Keptn community repo or just ping us via Slack.
Be part of the movement and participate in our public community meetings every other Thursday!