Coder Social home page Coder Social logo

jenspinney / eirini Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudfoundry/eirini

0.0 0.0 0.0 105.15 MB

Pluggable container orchestration for Cloud Foundry, and a Kubernetes backend

License: Apache License 2.0

Go 99.26% Dockerfile 0.14% Shell 0.60%

eirini's Introduction

Build Status

What is Eirini?

Eirini is a Kubernetes backend for Cloud Foundry. It deploys CF apps to a kube backend, using OCI images and Kube deployments.

Eirini gives you the nice integrated cf push flow, with CF Apps mapped directly to kube StatefulSet. In other words it decouples buildpack staging and stateless-multitenant-app running.

Since scheduling is increasingly commoditized, Eirini provides an "Orchestrator Provider Interface (OPI)" layer, that abstracts away orchestration from Cloud Foundry's control plane. This means Eirini is not solely a Kube backend at all, but that it is a generic backend for any scheduler! This means it could schedule to Diego, Kube, Swarm and other orchestration providers, as long as there is an implementation of the OPI layer for the target platform.

To offer a generic orchestrator interface, Eirini uses the Diego abstractions of LRPs and Tasks to capture Cloud Foundry's notion of long running processes and one-off tasks.

Deployment instructions are available at: cloudfoundry-incubator/eirini-release

Eirini Components

Eirini has the following components, the first two are available as subcommands of the eirini binary:

  • Bifrost converts and transfers cloud controller app specific requests to OPI specific objects and runs them in Kubernetes. It relies on the bits-service to serve OCI images for droplets, and OPI to abstract the communication with Kube.
  • 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.
  • Stager implements staging by running Kubernetes/OPI one-off tasks

Orchestrator Provider Interface (OPI)

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

One of the great things about BOSH is the CPI abstraction that lets it work on any IaaS. Cloud Foundry however, has been tightly coupled to one specific Orchestrator (Diego).

Currently Eirini strictly provides a Kubernetes implementation of the OPI. However, this can be easily extended to support other orchestration platforms.

Configuring OPI with Cloud Foundry and Kubernetes

In order to start OPI with the Kubernetes orchestration backend, you need to call the connect command and provide an OPI config YAML file:

$ opi connect --config path/to/config.yml

opi:
  kube_namespace: "the kubernetes namespace used by the cf deployment"
  kube_endpoint: "the kubernetes endpoint where to schedule workload to"
  api_endpoint: "the CF API endpoint (eg. api.bosh-lite.com)"
  cf_username: "cf admin user"
  cf_password: "cf admin password"
  external_eirini_address: "the external eirini address"
  stager_image_tag: "The tag of the recipe image, which is used to stage an app. If empty, latest is used."

Development

Eirini is a Golang project. You can simply go get the code and start development by running tests:

$ go get code.cloudfoundry.org/eirini
$ cd $GOPATH/src/code.cloudfoundry.org/eirini
$ cd bifrost # select the package to test
$ ginkgo

For details on how you can contribute to the Eirini project, please read the CONTRIBUTING document.

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.