Lightbend Orchestration is no longer actively developed and will reach its End of Life on April 15, 2020.
To setup your project, include and enable the sbt-reactive-app plugin.
At this time, the following technologies are supported:
- Akka 2.5 or later
- Lagom 1.4 or later
- Play 2.6 or later
Before explaining the configuration in detail, let’s take a look at steps needed to use Lightbend Orchestration in an existing project. We’ve provided an example Lagom application: lagom-java-chirper-tooling-example. It’s a small Twitter clone utilising a microservices architecture and event sourcing.
To use it with Lightbend Orchestration, follow these steps:
1) Add the plugin to your project’s
addSbtPlugin("com.lightbend.rp" % "sbt-reactive-app" % "1.7.3")
2) Enable it for each subproject which will get packaged into a Docker image. When using Lagom those are service impl projects, as well as any frontends that you have. Don’t enable it for the api projects, those only define service interfaces and do not produce any executables. In our case this can be done by adding
SbtReactiveAppPlugin to the
enablePlugins() call in
build.sbt file. It should look like this:
lazy val friendImpl = project("friend-impl") .enablePlugins(LagomJava, SbtReactiveAppPlugin) ...
Refer to Manual Configuration for other available settings.
In addition to
friend-impl shown above, enable the plugin for
3) Enable the service locator module by adding a line to
play.modules.enabled += "com.lightbend.rp.servicediscovery.lagom.javadsl.ServiceLocatorModule"
Again, we need to repeat it for all service subprojects, so make sure to also add this line to
application.conf files in
front-end. Now you’re ready to check if plugin is set up correctly! Try running this in your terminal:
Now that your project is setup, you can use sbt to build Docker images and publish them to your local registry:
sbt docker:publishLocal docker images
Later in the documentation we’ll cover how you can then generate Kubernetes and DC/OS configuration from these Docker images.
The following feature is currently only available for Kubernetes.
Lightbend Orchestration provides an sbt task,
rpDeploy minikube, that makes it easy for developers to deploy their application to their own local Kubernetes cluster.
The following command will build and deploy all of your services into your local Kubernetes cluster. You’ll need to ensure that the following software is installed:
- Minikube v0.25.0 or later (Verify with
- reactive-cli 1.1.0 or later (Verify with
After installing the requisite software, run the following commands:
minikube start --memory 6000 sbt "rpDeploy minikube" echo "http://$(minikube ip)"
Now you should be able to open the printed URL in your browser and try out the Chirper application. Later in the documentation we’ll cover how you can use these same tools in a production setting, covering deployment to both Kubernetes and DC/OS.