Giter VIP home page Giter VIP logo

cube's Introduction

What this?

Cube is a Kubernetes backend for Cloud Foundry. It syncs CF apps to a kube backend in exactly the same way that the diego nsync component works, except using OCI images and Kube deployments.

But there's more!

Cube exports staged CF images as docker images. So you can schedule them however you'd like. And separately it gives you the nice integrated cf push flow, with CF Apps mapped directly to kube Deployment objects. In other words it decouples buildpack staging and stateless-multitenant-app running.

But there's more!

Cube uses a little abstraction library, "OPI", which means it's not actually a Kube backend at all: it's a generic backend for any scheduler! This means it can schedule to diego/kube/swarm and whatever else is cool next year.

It uses the diego abstractions -- LRPs and Tasks -- in order to support generic orchestrators.

An experimental BOSH release for this is available at https://github.com/andrew-edgar/cube-release

y tho, y?

Partly a fun experiment, partly a proof of concept. Scheduling is increasingly commodotised, it makes sense to ask how easy/hard it'd be to abstract our way out of it now.

What components?

Cube has the following components, the first two are available as subcommands of the cube binary:

  • Sink provides a convergence loop that pulls desired apps from the Cloud Controller and creates corresponding Kubernetes resources. It relies on the Registry to serve OCI images for droplets, and OPI to abstract the communication with Kube. (Example: cube sink --ccApi <api url> --ccPass <internal admin user password>)
  • Registry is an OCI registry vending images based on droplets. Eventually this would be nice to move in to Cloud Controller. (Example: cube registry --rootfs </path/to/rootfs.tar>)
  • OPI or the "orchestrator provider interface" provides a declarative abstraction over multiple schedulers inspired by Diego's LRP/Task model and Bosh's CPI concept.
  • St8ge (not implemented yet) implements Staging by running Kubernetes/OPI one-off tasks

Tell me more 'bout OPI

The really great thing about Diego is the high level abstractions above the level of containers and pods. Specifically, these are LRPs and Tasks. Actually, LRPs and Tasks are most of what you need to build both a PaaS and quite a lot of other things. And they're cross-cutting concepts that map nicely to all current orchestrators (for example to LRPs/Tasks directly in Diego, to Deployments/One-Off Tasks in Kube, and to Services and Containers in Swarm).

One of the great things about Bosh is the CPI abstraction that lets it work on any IaaS. But so far Cloud Foundry has been tightly coupled to one specific Orchestrator (Diego). This was fine for fast iteration, but now orchestration is increasingly commodotised it makes a lot of sense to abstract ourselves away from the details of scheduling so an operator can use whatever orchestrator he or she wants and higher level systems can support all of them for free.

OPI uses the LRP/Task abstractions to do that.

cube's People

Contributors

julz avatar smoser-ibm avatar

Watchers

 avatar  avatar

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.