Deploying The Lagom Service On ConductR

In the previous blog, we have discussed how to create a Lagom service based architecture with a beautiful word count example. One can refer to the below link-

In this blog we will discuss now how we can deploy the Lagom service on conductR.

What is ConductR?

As described by lightbend –
“” ConductR is a “batteries included” approach to managing distributed systems. No more cobbling together of service gateways, service locators, consolidated logging, monitoring and so forth. All of these essential items and more are included with ConductR. In fact we want ConductR to be to operations what Play and Lagom are to developers; we want operations to be productive so that they can concentrate on keeping their business customers happy. “”

For more information on conductR refer :-

The Below Mentioned Steps Will Create A ConductR Cluster And Will Deploy The Lagom Service .


Docker (when using Docker based bundles) – Download the docker from <Here>

sbt  where( sbt is our interactive build tool. )

conductr-cli Download from <Here>

The conductr-cli is used to communicate with the ConductR cluster.

Adding sbt-conductr plugin

sbt-conductr is a sbt plugin that provides commands in sbt to produce a ConductR bundle , start and stop a local ConductR cluster and manage a ConductR cluster within a sbt session

– To use sbt-conductr for your project add the plugin to your project/plugins.sbt:

addSbtPlugin(“com.lightbend.conductr” % “sbt-conductr” % “2.3.0”)

– If your project is using Lagom 1.2.x or a previous version use:

addSbtPlugin(“com.lightbend.conductr” % “sbt-conductr” % “2.2.6”)

Your External Cassandra and kafka should be running and IP-Address should be mentioned in the application.conf file in helloworld-producer-impl and helloworld-consumer-impl , if running on other than local host .

Steps to load the services : –

Step 1) Start Conductr using sandbox : –

Enter into sbt command terminal and type the below command : –

sandbox run 2.0.0 –feature visualization

This will start single node cluster with visualization enabled on ip :

*Note : Make sure your conductr is started and your HAProxy server is started while looking into logs . Also your docker services is accessible to sandbox .

conduct info

Using this command will gives you the conductr cluster info .

Step 2) on the same sbt terminal type your project name

project helloworld-producer-impl

( The code is present in the previous blog as mentioned above or one can directly refer the link –

Step 3) Create the bundle for the project :


Step 4) Load your bundle .

conduct load /home/knoldus/workstation/lagom-spike/helloworld-producer-impl/target/bundle/

Step 5) Run your project

conduct run helloworld-producer-impl

check your conductr : –

conduct info

Note* : You will be having 4 services running till now .

Step 6) Similarly create and load the bundle for helloworld-consumer-impl project

project helloworld-consumer-impl

( The code is present in the previous blog as mentioned above or one can directly refer the link –


conduct load /home/knoldus/workstation/lagom-spike/helloworld-consumer-impl/target/bundle/

conduct run helloworld-consumer-impl

Now Both your lagom Service are deployed on conduct-r , now you can hit the route as mentioned on below link : –

Below is the screen-shot of visualizer showing the services running : –


To Stop the Loaded Service

conduct stop helloworld-producer-impl

conduct stop helloworld-producer-impl

To Stop the sandbox completely

sandbox stop

In this article we have seen how to deploy the lagom service on conductR on local sandbox. In our next upcoming blog we will deploy our lagom services on DCOS enabled with conductR.


This entry was posted in Scala. Bookmark the permalink.

One Response to Deploying The Lagom Service On ConductR

  1. Pingback: Automatic Deployment Of Lagom Service On ConductR On DCOS | Knoldus

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s