Latest version

Orchestra

Orchestra is an Open Source Continuous Integration / Continuous Deployment server as a library running on Kubernetes.
It leverages Kubernetes concepts such as Jobs or Secrets, and configuration as code in Scala to take the most of compile time type safety and compatibility with Scala or Java libraries.

Key features:

  • Configured completely via code which can be version controlled
  • Fully scalable
  • Highly Available
  • Extendable via any Scala/Java libraries

Quick start

Installation

project/plugins.sbt:

addSbtPlugin("com.drivetribe" % "sbt-orchestra" % "<latest version>")

build.sbt:

lazy val orchestration = OrchestraProject("orchestration", file("orchestration"))
  .settings(
    libraryDependencies ++= Seq(
      "com.drivetribe" %%% "orchestra-github" % orchestraVersion, // Optional Github plugin
      "com.drivetribe" %%% "orchestra-cron" % orchestraVersion, // Optional Cron plugin
      "com.drivetribe" %% "orchestra-lock" % orchestraVersion // Optional Lock plugin
    )
  )
lazy val orchestrationJVM = orchestration.jvm
lazy val orchestrationJS = orchestration.js

Hello World example

Given the above installation, here is a minimal project with one Hello World job:

orchestration/src/main/scala/Orchestration.scala:

import com.drivetribe.orchestra._
import com.drivetribe.orchestra.AsyncDsl._
import com.drivetribe.orchestra.board._
import com.drivetribe.orchestra.job.JobRunner
import com.drivetribe.orchestra.model._

object Orchestration extends Orchestra with UI {
  lazy val board = Folder("Orchestra")(helloJob)
  lazy val jobRunners = Set(helloJobRunner)
  
  lazy val helloJob = Job[() => Unit](JobId("helloWorld"), "Hello World")()
  lazy val helloJobRunner = JobRunner(helloJob) { implicit workDir => () =>
    println("Hello World")
  }
}

See example projects

Deployment on Kubernetes with Minikube

Assuming that you are in one of the example projects (or in your own project), here is how to deploy on Kubernetes with Minikube:

minikube start                            # Start Minikube
eval `minikube docker-env`                # Make docker use the docker engine of Minikube
sbt orchestrationJVM/Docker/publishLocal  # Publish the docker artifact
kubectl apply -f ../kubernetes-dev        # Apply the deployement to Kubernetes
kubectl proxy                             # Proxy the Kubernetes api

Visit Orchestra on https://127.0.0.1:8001/api/v1/namespaces/orchestra/services/orchestration:http/proxy.
You can troubleshoot any deployment issue with minikube dashboard.

Documentation

Find all the documentation on https://drivetribe.github.io/orchestra/

Related projects