Giter VIP home page Giter VIP logo

gepp's Introduction

GEPP - Developer's Helper to K8s

GEPP takes your app and Dockerize it, sets up a Kubernetes cluster and runs your app in it, configure K8s resources and produce Terraform file for Azure deployments, and more! All are happening in seconds!

GEPP Demo

How and Why

Requirements:

  • Running Docker
  • main.py file
  • app variable for WYSGI

Run:

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/project -e PROJECT_NAME=${PWD##*/} guray/gepp:0.1-alpha5

GEPP provides developers to easily run their apps as containerized apps in Kubernetes. Here is what it is aiming:

  • You run the tool in a directory with Python/Go/NodeJS code
  • It will generate a Dockerfile depending on the framework your code uses
  • It will generate YAMLs for Kubernetes deployment, pod autoscaling, service definitions (it will ask some questions like service type) + ingress
  • (optional) It can generate a plan for Terraform for your cloud provider for a K8s cluster and deploying your app (in JSON, using tfcdk)
  • (optional) It will insert environment variable, secretmap, configmaps to the generated YAML (interactively asks) - WIP
  • (optional) It can get storageclasses from your cluster and define some storage and insert it to your YAML - WIP
  • (optional) It can generate servicemonitor and podmonitor YAML files for Prometheus operator - WIP
  • (optional) It can generate network policies for some of the network providers - WIP

It is mostly a repetitive task to Dockerize your project and generating YAMLs that look like ones in other projects/microservices. In addition to replaying the same steps, it may easily consume a lot of time to set up to Dockerize your app, write YAMLs for Kubernetes deployment(and define resources), configure autoscheduler, write Ingress manifests for L7 routing/LB, create Kubernetes services etc. After all of these, you should deploy a Kubernetes cluster, either locally or on a remote target; than connect to it, upload & deploy your app.

GEPP is being developed to shorten these procedures to a fully(or mostly) automatic, yet useful process. Just run gepp inside a directory and wait for your localhost-port pair to connect your app.

For interactively using GEPP run gepp -i or gepp --interactive. (Currently works for only additional ports)

You will find Dockerfile, .dockerignore, Kubernetes YAMLS, AKS definition for deploying it with Terraform in your directory.

Status

Currently, it is in 0.1-alpha stage. It should work without any problems but has not tested in wild, nor all the intended features has been implemented yet. If you are encountering a problem, please open an issue.

PR's are more than welcome!

The proposal of this project consists of these steps:

  • Auto detect Flask or other frameworks
  • Generate Dockerfile if not exists
  • Create Deployment YAML
  • Create autoscaler YAML
  • Create service (type optional, clusterip default)
  • Create ingress definition (optional)
  • Deploy to K8s (optional)
  • Test with port-forward
  • Generate Terraform file for K8s integration + GKE/AWS/Azure/...
  • Ask secret usage, getting names from K8s (optional)
  • Ask disk type, size, mountpoint (optional)
  • Create local cluster with kind/minikube/k3d and deploy the app onto it
  • Use skaffold/telepresence to provide a complete dev environment
  • Get status, logs, metrics
  • Ask metric exports
  • Re-running should be possible, and it should check the YAMLs and other files to be idempotent

gepp's People

Contributors

berkguzel avatar curefatih avatar gurayops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gepp's Issues

image tag

Hi,
I am getting a error for a basic flask app after that section.

Deploying apps to Kubernetes
   - Creating a temp container with kubectl.. 

ERROR

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.35/containers/create

Also there are some errors i have, one of them is below.

docker.errors.ImageNotFound: 404 Client Error: Not Found ("No such image: guray/gepp-kubectl:v1.18.6")

I checked image from dockerhub and image was tagged with guray/gepp-kubectl:v1.19.0. Is that could be the reason why i had the error?

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.