hasura / gitkube

Build and deploy docker images to Kubernetes using git push
Apache License 2.0
3.81k stars 207 forks source link

Auto-detect base image to use if no Dockerfile is found #84

Open sr229 opened 6 years ago

sr229 commented 6 years ago

Summary

In layman's terms: It should be able to allow developers to git push to a gitkube-enabled cluster without a Dockerfile - or so called the "Heroku-style" deployment.

Intro

Heroku's architecture is composed of a dedicated builder for the source, where your project requires a Procfile to determine processes to execute, and a declarative app manifest that includes all the required dependencies and postinstall scripts that the builder will run.

Heroku builds an app using an approach called a Stack-Buildpack approach, whereas:

But in the case for gitkube, we do not need to implement the same flow as Heroku since we can take advantage of the rich Docker ecosystem in Kubernetes.

Process flow

Once the remote recieves the source from the push, it should be able to detect the dockerfile and the manifest, but we should look on two situations:

Conclusion

This is not intended to replace how gitkube currently works, rather, it is a enhancement on the current flow, and it allows migrating users from Heroku to their own provisioned Kubernetes cluster.

Feel free to extend this as well, as I only accounted for cases on migrating users from heroku.

blopker commented 6 years ago

Dokku uses https://github.com/gliderlabs/herokuish to run the build packs. Could be an interesting combination with this project.