Run your project using Conductr Sandbox

ConductR is a solution for managing Lightbend Reactive Platform applications across a cluster of machines. It is reactive from the ground up thus enabling operations to provide the resiliency required to unleash the full benefits of the Lightbend Reactive Platform in their organization.

Conductr is suitable for running microservices in a cluster. Conductr comes with a sandbox where we can test our project locally.

Now we will see how to run your project in the conduct sandbox.

Prerequisite

Install conduct-cli which is used to communicate with the ConductR cluster:

sudo pip3 install conductr-cli

Adding sbt-conductr plugin

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

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

Create and Run your Bundle on Conductr Sandbox

Enter into sbt command terminal and then follow these steps:

Step 1) Start Conductr sandbox :

sandbox run 2.1.12 -n 3 -–feature visualization

The above command will start a virtual sandbox environment in local system.

conduct info

conduct info will give you the conductr cluster info.

Step 2) Move to our project

project <project-impl>

Step 3) Create the bundle for the project :

bundle:dist

This will create the bundle(in zip format) that will be later loaded to the conductr sandbox.

Step 4) Load your bundle

conduct load <click tab>

Step 5) Run your project

conduct run <project-impl>

check your conductr to see the running services:

conduct info

Step 6) To see the project’s log:

conduct logs -n 100 <bundle-id>

Step 7) To Stop and unload the running Service

conduct stop <project-impl>

conduct unload <project-impl>

Step 8) To Stop the sandbox completely

sandbox stop

Conductr also provide pre-configured bundles for cassandra, elasticsearch, zookeeper etc that we can use it directly if needed.

It also provides a visualisation tool that we can use to see all running services. It looks like this:

visualizer_simple

Thanks for reading…!!

Reference:

Lightbend ConductR – Lagom Doc

Lightbend ConductR


knoldus-advt-sticker

Written by 

I am a Software Consultant at Knoldus Inc. I am a Scala Enthusiast. I am familiar with Object Oriented Programming Paradigms, and has also worked upon .NET based technologies. Aside from being a programmer, I am familiar with NoSQL database technologies such like Cassandra. I also worked on Lagom microservice architecture.

Leave a Reply

%d bloggers like this: