All Projects → hasura → Gitkube

hasura / Gitkube

Licence: apache-2.0
Build and deploy docker images to Kubernetes using git push

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Gitkube

Cml
♾️ CML - Continuous Machine Learning | CI/CD for ML
Stars: ✭ 2,843 (-21.46%)
Mutual labels:  developer-tools, ci-cd
variants
A command-line tool to setup deployment variants for iOS and Android, alongside a working CI/CD setup.
Stars: ✭ 23 (-99.36%)
Mutual labels:  continuous-deployment, ci-cd
Kubefwd
Bulk port forwarding Kubernetes services for local development.
Stars: ✭ 2,713 (-25.06%)
Mutual labels:  developer-tools, k8s
Fabric8 Platform
Generates the distribution of the fabric8 microservices platform
Stars: ✭ 105 (-97.1%)
Mutual labels:  developer-tools, ci-cd
kong-map
Kongmap is a free visualization tool which allows you to view and edit configurations of your Kong API Gateway Clusters, including Routes, Services, and Plugins/Policies. The tool is being offered for installation via Docker and Kubernetes at this time.
Stars: ✭ 60 (-98.34%)
Mutual labels:  ci-cd, k8s
Carvel Kwt
Kubernetes Workstation Tools CLI
Stars: ✭ 119 (-96.71%)
Mutual labels:  developer-tools, k8s
cloud-s4-sdk-pipeline
The Cloud SDK pipeline uses the Cloud SDK continuous delivery server for building, checking, and deploying extension applications. Projects based on the SAP Cloud SDK archetype will automatically use this pipeline.
Stars: ✭ 65 (-98.2%)
Mutual labels:  continuous-deployment, ci-cd
Git Push Deploy
Simple Automated CI/CD Pipeline for GitHub and GitLab Projects
Stars: ✭ 21 (-99.42%)
Mutual labels:  continuous-deployment, ci-cd
cloud-s4-sdk-pipeline-docker
The Cloud SDK continuous delivery infrastructure makes heavy use of docker images. This are the docker sources of these images.
Stars: ✭ 13 (-99.64%)
Mutual labels:  continuous-deployment, ci-cd
jam-stack-box
Your own self hosted continuous deployment solution for JAM Stack websites.
Stars: ✭ 25 (-99.31%)
Mutual labels:  continuous-deployment, ci-cd
Buildhelpers
Helper functions for PowerShell CI/CD scenarios
Stars: ✭ 174 (-95.19%)
Mutual labels:  continuous-deployment, ci-cd
Serverless Plugin Canary Deployments
Canary deployments for your Serverless application
Stars: ✭ 283 (-92.18%)
Mutual labels:  continuous-deployment, ci-cd
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (-95.3%)
Mutual labels:  continuous-deployment, ci-cd
Fabric8
fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
Stars: ✭ 1,783 (-50.75%)
Mutual labels:  developer-tools, ci-cd
Origin
Conformance test suite for OpenShift
Stars: ✭ 8,046 (+122.27%)
Mutual labels:  continuous-deployment, ci-cd
actions
Set of actions for implementing CI/CD with werf and GitHub Actions
Stars: ✭ 67 (-98.15%)
Mutual labels:  ci-cd, k8s
Gocd
Main repository for GoCD - Continuous Delivery server
Stars: ✭ 6,314 (+74.42%)
Mutual labels:  continuous-deployment, ci-cd
Agola
Agola: CI/CD Redefined
Stars: ✭ 783 (-78.37%)
Mutual labels:  continuous-deployment, ci-cd
www.go.cd
Github pages repo
Stars: ✭ 39 (-98.92%)
Mutual labels:  continuous-deployment, ci-cd
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (-98.98%)
Mutual labels:  continuous-deployment, ci-cd

Gitkube Logo

Gitkube

Gitkube is a tool for building and deploying Docker images on Kubernetes using git push.

After a simple initial setup, users can simply keep git push-ing their repos to build and deploy to Kubernetes automatically.

GoDoc

Gitkube

When should I use gitkube?

  1. Ideal for development where you can push your WIP branch to the cluster to test.
  2. Reference implementation for writing git-based automation on your server. Fork this repo and create your own CRD + controller + git remote hook that can do things on the Kubernetes cluster.

Features:

  • No dependencies except native tooling (git, kubectl)
  • Plug and play installation
  • Simple public key based authentication
  • RBAC ready - Control access to git remotes using RBAC
  • Support for namespace based multi-tenancy - Remotes can only deploy to their own namespace
  • No assumptions about repository structure

Getting started

Gitkube will run on any Kubernetes vendor/distribution AS IS. In case you find any difficulties in the setup, please comment on #33

Install gitkube

Using kubectl
kubectl create -f https://raw.githubusercontent.com/hasura/gitkube/master/manifests/gitkube-setup.yaml

#expose gitkubed service
kubectl --namespace kube-system expose deployment gitkubed --type=LoadBalancer --name=gitkubed
Using gitkube CLI (DEPRECATED)
  1. Install Gitkube CLI:

    • Linux/MacOS
    curl https://raw.githubusercontent.com/hasura/gitkube/master/gimme.sh | bash
    scoop install gitkube

    Or download the latest release and add it to your PATH.

  2. Use Gitkube CLI to install Gitkube on the cluster:

    gitkube install

Workflow

  • Local dev: User creates a base git repo for the application with Dockerfile and K8s deployment
  • Setting Remote: User defines a spec for Remote containing the rules for git push
  • Deploying application: Once a Remote is setup, application can be deployed to K8s using git push <remote> master

Local dev

User should have a git repo with source code and a Dockerfile. User should also create a base K8s deployment for the application.

Setting Remote

A Remote resource consists of 3 parts:

  1. authorizedKeys: List of ssh-keys for authorizing git push.
  2. registry: Details of docker registry where images are pushed post-build.
  3. deployments: Spec for building docker image and updating corresponding K8s deployment.

Here is a typical spec for a Remote:

apiVersion: gitkube.sh/v1alpha1
kind: Remote
metadata:
  name: sampleremote
  namespace: default
spec:

# Insert ssh-keys for allowing users to git push
  authorizedKeys:
  - "ssh-rsa your-ssh-public-key"

# Provide registry details: https://github.com/hasura/gitkube/blob/master/docs/registry.md
  registry:
    url: "docker.io/user"
    credentials:
      secretRef: regsecret                # Name of docker-registry secret

# Define deployment rules
  deployments:
  - name: www                             # Name of K8s deployment which is updated on git push
    containers: 
    - name: www                           # Name of container in the deployment which is built during git push
      path: example/www                   # Docker build context path in the git repo
      dockerfile: example/www/Dockerfile  # Location of Dockerfile for the source code

Deploying application

Once a Remote is created, it gets a git remote URL which you can find in its status spec

$ kubectl get remote sampleremote -o yaml
...
status:
  remoteUrl: ssh://[email protected]/~/git/default-sampleremote
  remoteUrlDesc: ""

Add the generated remoteUrl in git

$ git remote add sampleremote ssh://[email protected]/~/git/default-sampleremote

And finally, git push

$ git push sampleremote master

More examples

Follow this example repo for more workflows with gitkube.

How it works

Gitkube has three components:

  1. Remote: Custom resource defined by a K8s CRD
  2. gitkube-controller: Controller that manages Remote objects and propogates changes to gitkubed
  3. gitkubed: Git host that builds docker image from the repo and rolls out deployment

High-level architecture

Architecture

Contributing

Gitkube is an open source project licensed under Apache License 2.0

Contributions are welcome.

Community and Support

Maintainers

This project has come out of the work at hasura.io. Current maintainers @Tirumarai, @shahidh_k.

Follow @gitkube to stay updated.

Gitkube logo concept and design by Samudra Gupta.

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