All Projects → stefanprodan → gitops-app-distribution

stefanprodan / gitops-app-distribution

Licence: Apache-2.0 license
GitOps workflow for managing app delivery on multiple clusters

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to gitops-app-distribution

gitops-helm-workshop
Progressive Delivery for Kubernetes with Flux, Helm, Linkerd and Flagger
Stars: ✭ 59 (+168.18%)
Mutual labels:  linkerd, gitops, progressive-delivery, flagger, fluxcd
Flagger
Progressive delivery Kubernetes operator (Canary, A/B Testing and Blue/Green deployments)
Stars: ✭ 3,337 (+15068.18%)
Mutual labels:  linkerd, istio, gitops, progressive-delivery
k8s-flagger-istio-flux
Blue Green deployment with Flagger, Flux and Istio
Stars: ✭ 39 (+77.27%)
Mutual labels:  istio, flagger
meshery-operator
The service mesh operator.
Stars: ✭ 41 (+86.36%)
Mutual labels:  linkerd, istio
examples
Examples to demonstrate how to use PipeCD
Stars: ✭ 21 (-4.55%)
Mutual labels:  istio, kustomize
learn-layer5
A sample application for learning how to service mesh and for validating SMI conformance
Stars: ✭ 43 (+95.45%)
Mutual labels:  linkerd, istio
gitops-k8s
Declarative pull-based GitOps repository representing the state of a Kubernetes cluster
Stars: ✭ 82 (+272.73%)
Mutual labels:  istio, gitops
service-mesh-labs
Lab scenarios for learning how to service mesh.
Stars: ✭ 22 (+0%)
Mutual labels:  linkerd, istio
gitops-playground
Reproducible infrastructure to showcase GitOps workflows and evaluate different GitOps Operators on Kubernetes
Stars: ✭ 77 (+250%)
Mutual labels:  gitops, fluxcd
rules gitops
This repository contains rules for continuous, GitOps driven Kubernetes deployments.
Stars: ✭ 112 (+409.09%)
Mutual labels:  gitops, kustomize
iter8-analytics
AI-engine that powers Iter8
Stars: ✭ 16 (-27.27%)
Mutual labels:  istio, progressive-delivery
Flux
Successor: https://github.com/fluxcd/flux2 — The GitOps Kubernetes operator
Stars: ✭ 6,688 (+30300%)
Mutual labels:  gitops, kustomize
flux-kustomize-example
Flux v1: Example of Flux using manifest generation with Kustomize
Stars: ✭ 71 (+222.73%)
Mutual labels:  gitops, kustomize
Kubernetes-and-Cloud-Native-Associate-KCNA
Useful notes for the KCNA - Kubernetes and Cloud Native Associate
Stars: ✭ 162 (+636.36%)
Mutual labels:  istio, gitops
gitops-build-lib
Jenkins pipeline shared library for automating deployments via GitOps
Stars: ✭ 23 (+4.55%)
Mutual labels:  gitops, fluxcd
htk8s
HTPC services running on Kubernetes
Stars: ✭ 69 (+213.64%)
Mutual labels:  gitops, kustomize
big-bang
Big Bang is a declarative, continuous delivery tool for core DoD hardened and approved packages into a Kubernetes cluster.
Stars: ✭ 55 (+150%)
Mutual labels:  kustomize, fluxcd
Book k8sInfra
< 컨테이너 인프라 환경 구축을 위한 쿠버네티스/도커 >
Stars: ✭ 176 (+700%)
Mutual labels:  gitops, kustomize
monokle
🧐 Monokle streamlines the process of creating, analyzing, and deploying Kubernetes configurations by providing a unified visual tool for authoring YAML manifests, validating policies, and managing live clusters.
Stars: ✭ 795 (+3513.64%)
Mutual labels:  gitops, kustomize
meshery
Meshery, the cloud native manager
Stars: ✭ 1,587 (+7113.64%)
Mutual labels:  linkerd, istio

gitops-app-distribution

As a software vendor I want to distribute my application in a reliable manner to service providers that will host the app on their own Kubernetes clusters e.g. EKS, AKS/Linkerd, GKE/Istio.

The application is composed of several containerized micro-services: frontend, backend, cache and database. Each micro-service receives periodically updates via container image releases and configuration changes. These updates should be tested in isolation with automated e2e testing. Once the updates are made available to service providers, the release on production clusters should be gated by conformance tests.

In order to ensure that the service providers SLAs are not being broken by new releases, the release process will expose a micro-service new version to live traffic in a progressive manner, while measuring the service level objectives (SLOs) like availability, error rate percentage and average response time. If a drop in performance is noticed during the SLOs analysis, the release will be automatically rolled back with minimum impact to end-users.

Service providers should have the option to customize the app to fit their SLAs e.g. set different resources requests and limits, tweak the auto-scaling thresholds or manual approval of canary releases.

Technical solution:

  • create a repository with the manifests required to distribute the app on Kubernetes
  • create a dedicated distribution for each service provider environment type
  • use Kustomize to build each environment type (distribution) while keeping the YAML duplication at minimum
  • use GitHub Actions and Kubernetes Kind to validate changes
  • use Flux to distribute changes on the service providers clusters
    • reconcile a target cluster with an app distribution
    • monitor the base distribution and update the target cluster on spec changes
  • use Flagger to automate the production releases on the service providers clusters
    • run conformance tests before exposing an updated micro-service to live traffic
    • run canary style deployments with progressive traffic shifting for frontend and backend micro-services
    • run blue/green style deployments for cache and database micro-services

Distribution

GitOps

A service provider will use Kustomize and FluxCD to deploy the app on production clusters.

Git repository structure:

app/
├── .flux.yaml
└── kustomization.yaml

The service provider will use one of the distributions as the kustomization base: dist//app-kubernetes or dist//app-istio or dist//app-linkerd.

kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: app
bases:
  - github.com/stefanprodan/gitops-app-distribution/dist//app-istio?ref=1.0.0

The service provider can further customize the application installation, for example on an Istio cluster, the ingress could be replaced with Istio Gateway and on a Linkerd cluster the ingress could be replaced with Gloo.

.flux.yaml

version: 1
commandUpdated:
  generators:
    - command: kustomize build .

Change management

Let's assume the vendor wants to release a new frontend version that requires configuration changes as well as a container image update.

Vendor workflow:

  • the frontend team releases a new container image tagged frontend:v2.0.0
  • the frontend teams creates a PR with the frontend image tag and configuration file changes
  • the PR is being validated in CI with e2e tests for all distributions (Kubernetes, Istio, Linkerd)
  • the PR is merged into master followed by a GitHub release e.g. 1.1.0

Service provider workflow:

  • the provider is notified about the update
  • the provider create a PR on one of the production cluster git repos and changes the base to dist//app-istio?ref=1.1.0
  • the PR is being validated in CI with e2e tests for the Istio distribution
  • the PR is merged into master
  • Flux detects the changes in git and fetches the upstream manifests
  • Flux applies the kustomization on the cluster
  • Flagger detects that the frontend image and configuration file has changed
  • Flagger runs the conformance tests for the frontend micro-service
  • Flagger starts to gradually shift traffic towards the new frontend version
  • Flagger runs the canary analysis and validates the service level objectives (SLOs)
  • Flagger promotes the new frontend version by upgrading the config and rolling the v2 image in production
  • Flagger notifies the service provider on Slack or MS Teams that frontend was updated
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].