All Projects → cds-snc → kubernetes-branch-review

cds-snc / kubernetes-branch-review

Licence: MIT License
🚟 Review clusters of GitHub pull requests / Examen des groupes de demandes de tirage de GitHub

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HCL
1544 projects

Projects that are alternatives of or similar to kubernetes-branch-review

hacktoberfest 2021
Solve the given questions, and submit a PR.💬 Make sure you submit the solution in the correct folder. ✔
Stars: ✭ 44 (+100%)
Mutual labels:  digitalocean, review
zabbix-review-export-import
Clone of zabbix-review-export with added import object(s) feature
Stars: ✭ 36 (+63.64%)
Mutual labels:  review
cluster-api-provider-digitalocean
The DigitalOcean provider implementation of the Cluster Management API
Stars: ✭ 85 (+286.36%)
Mutual labels:  digitalocean
open-gat
Open source software for geographic transport data analysis and planning
Stars: ✭ 80 (+263.64%)
Mutual labels:  review
graphite-cli
Graphite's CLI makes creating and submitting stacked changes easy.
Stars: ✭ 125 (+468.18%)
Mutual labels:  review
md2review
a converter from Markdown into Re:VIEW, using redcarpet
Stars: ✭ 74 (+236.36%)
Mutual labels:  review
phoenix example
An example Phoenix app with one-click deployments to different cloud services.
Stars: ✭ 62 (+181.82%)
Mutual labels:  digitalocean
code-review
Um projeto onde você pode enviar seu código fonte para outras pessoas te ajudarem a melhorar
Stars: ✭ 84 (+281.82%)
Mutual labels:  review
Gauntlet
🔖 Guides, Articles, Podcasts, Videos and Notes to Build Reliable Large-Scale Distributed Systems.
Stars: ✭ 336 (+1427.27%)
Mutual labels:  digitalocean
hacktoberfest2021
Make your first PR. A beginner friendly repository made specifically for open source beginners. Add any program under any language (it can be anything from a simple program to a complex data structure algorithm). Happy coding...
Stars: ✭ 41 (+86.36%)
Mutual labels:  digitalocean
DigitalOcean-Spaces-Sync
This WordPress plugin syncs your media library with DigitalOcean Spaces Container.
Stars: ✭ 46 (+109.09%)
Mutual labels:  digitalocean
img ai app boilerplate
An image classification app boilerplate to serve your deep learning models asap!
Stars: ✭ 27 (+22.73%)
Mutual labels:  digitalocean
hacktoberfest20
Participate in Hacktoberfest by contributing to any Open Source project on GitHub! Here is a starter project for first-time contributors. #hacktoberfest20. Don’t forget to read the README.md for guidance.
Stars: ✭ 18 (-18.18%)
Mutual labels:  digitalocean
doclt
Digital Ocean Command Line Tool
Stars: ✭ 43 (+95.45%)
Mutual labels:  digitalocean
digitalocean-helper-bot
用 telegram bot 管理 Digital Ocean 账号
Stars: ✭ 24 (+9.09%)
Mutual labels:  digitalocean
Aspect-Based-Sentiment-Analysis
A python program that implements Aspect Based Sentiment Analysis classification system for SemEval 2016 Dataset.
Stars: ✭ 57 (+159.09%)
Mutual labels:  review
hacktoberfest2019
A repository for hacktoberfest 2019 [ Not counting towards hacktoberfest contribution ]
Stars: ✭ 12 (-45.45%)
Mutual labels:  digitalocean
vps
A laravel 5 package to easily create and maintain vps on digital ocean
Stars: ✭ 59 (+168.18%)
Mutual labels:  digitalocean
karmahub
Compares the amount of issues and pull requests you created with the amount of comments and code reviews you did.
Stars: ✭ 17 (-22.73%)
Mutual labels:  review
pkgreviewr
R package to facilitate rOpenSci package reviews.
Stars: ✭ 35 (+59.09%)
Mutual labels:  review

Kubernetes branch review

Phase Maintainability Total alerts

This tool is a proof-of-concept, do not use for important workloads

Purpose

The purpose of this tool is to create Kubernetes review (also known as staging) applications that reflect the code on a Git branch using an isolated Kubernetes cluster. This allows you to test and review your application in an interactive environment without solely relying on interpreting the code changes in a branch. We also want all this information to be easily accessible through GitHub.

It will show up something like this in your UI:

Screenshot

How do I use this?

All you need is to include an elenchos.json configuration file (See Configuration below) in your repositories root and install the GitHub application found here: Coming soon!

You also need to use Kustomize to create a specific overlay for your staging clusters that work on our cloud provider of choice which is currently: Digital Ocean

Configuration

To ensure the application works you need to provide two pieces of information:

  • An object of all your docker files in a key -> value format representing name -> location in relation to the root of your repository.
  • The location of the Kustomize overlay you want to apply.

Your file might look something like this:

{
  "dockerfiles": {
    "cdssnc/etait-ici": "."
  },
  "overlay": "manifests/overlays/elenchos"
}

How is this different to the X other review workflows that exist out there?

At this point in time most review solutions take one of two approaches:

  1. They only allow you to review one component of your application. For example Heroku review apps, allows you to easily build and show the UI of your application by adapting your app to their deploy process. This works great if you only want to test one part of your app, but does not allow you to deploy multiple components like a database or anything else you would expect to find in a Kubernetes cluster.

  2. They make use of existing cluster infrastructure to deploy a "staging cluster". This is a great solution that allows you to test all the components of your app, but what happens if you have three or four Git branches on the go? You have the same application living on the same cluster four times, which brings it's own host of problems.

Our approach

We always dreamed of having a process similar to Heroku review apps, where each branch gets it's own isolated instance and deployment - however, the cluster creation time on cloud providers made user experience terrible. This has changed recently and we are able to deploy a review cluster within five minutes of opening a new pull request.

Workflow

Pull requests in GitHub have three stages in their life-cycle:

  • Opened
  • Updated
  • Closed

As a result we have broken down how the code handles each of these events:

Opened
  1. User creates new pull request
  2. Application requests a new cluster instance is created
  3. Application retrieves cluster credentials
  4. Application checks out code from GitHub
  5. Application builds all docker files locally with the new code
  6. Application pushes docker files to repository
  7. Kustomize applies the new images on the overlay
  8. Kubectl deploys the new overlay
  9. A new load balancer is created and we wait for the IP
  10. Application posts IP and success state back to GitHub
Updated
  1. User updates pull request
  2. Application retrieves cluster credentials
  3. Application checks out code from GitHub
  4. Application builds all docker files locally with the new code
  5. Application pushes docker files to repository
  6. Kustomize applies the new images on the overlay
  7. Kubectl deploys the new overlay
  8. Application posts success state back to GitHub
Closed
  1. Application deletes all local checked out code
  2. Application deletes all docker images
  3. Application deletes load balancer
  4. Application deletes cluster
  5. Application notifies GitHub.

Here is a diagram of the same information:

Elenchos-work-flow

Implementation

The application runs on Google GKE.

Questions?

Please contact us through any of the multiple ways listed on our website.

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].