Giter Club home page Giter Club logo

sbt-conductr's Introduction

sbt-conductr

Build Status

sbt-conductr is an sbt plugin provides commands that communicate with ConductR from within an sbt session. It can also be used in conjunction with sbt-bundle to deploy your application or service to ConductR without leaving the comforts of sbt.

Usage

sbt-conductr is enabled by simply declaring its dependency:

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("com.typesafe.conductr" % "sbt-conductr" % "1.2.1")

The plugin has no requirements for other plugins to be enabled.

The IP address of the ConductR host is automatically retrieved and used if:

  • ConductR is running on the same host inside a docker container. The ConductR address is set to http://{docker-host-ip}:9005.
  • ConductR is running on the same host. The ConductR address is set to http://{hostname}:9005.

In other scenarios it is necessary yo set the address to the ConductR control server manually, e.g. if ConductR is running on 192.168.59.103:9005 you will issue the following command from the sbt console:

controlServer 192.168.59.103:9005

This then sets the sbt session up to subsequently communicate with the ConductR at 192.168.59.103 on port 9005. You may type commands such as:

conduct info

...which will obtain information on the ConductR cluster.

If you have sbt-bundle enabled e.g.:

lazy val root = (project in file(".")).enablePlugins(JavaAppPackaging)

You can then produce a bundle by typing:

bundle:dist

...and then load the bundle by typing:

conduct load <HIT THE TAB KEY AND THEN RETURN>

Using the tab completion feature of sbt will produce a URI representing the location of the last distribution produced by the native packager.

Hitting return will cause the bundle to be uploaded. On successfully uploading the bundle the plugin will report the BundleId to use for subsequent commands on that bundle.

Configuration

When loading a bundle you can also load configuration if there is any e.g.:

configuration:dist

...and then hit the tab key after specifying the bundle for conduct load.

Retrieve logs and events

The log messages and events of a particular bundle can be displayed with the commands:

conduct logs my-bundle
conduct events my-bundle

Make sure that your logging infrastructure is up an running. Otherwise the command will timeout:

[trace] Stack trace suppressed: run last conductr-service-lookup/*:conduct for the full output.
[error] (conductr-service-lookup/*:conduct) java.util.concurrent.TimeoutException: Futures timed out after [5 seconds]
[error] Total time: 5 s, completed Sep 28, 2015 11:40:47 AM

With sbt-conductr-sandbox you can start the default logging infrastructure during ConductR cluster startup easily:

sandbox run --withFeatures logging
conduct logs my-bundle

Give the logging infrastructure enough time to start before entering the logs or events command.

Settings

The following sbt-conductr commands are available:

Property Description
conduct help Get usage information of the conduct command
conduct info Gain information on the cluster
conduct load Loads a bundle and an optional configuration to the ConductR
conduct run Runs a bundle given a bundle id with an optional absolute scale value specified with --scale
conduct stop Stops all executions of a bundle given a bundle id
conduct unload Unloads a bundle entirely (requires that the bundle has stopped executing everywhere)
conduct logs Retrieves log messages of a given bundle
conduct events Retrieves events of a given bundle

In addition the following settings are available:

Property Description
conductrApiVersion The api version to use when communicating with ConductR. Defaults to 1 which is required by ConductR 1.0.

© Typesafe Inc., 2014-2015

sbt-conductr's People

Contributors

huntc avatar hseeberger avatar markusjura avatar 2m avatar eed3si9n avatar ktoso avatar fsat avatar rkuhn avatar

Watchers

James Cloos avatar  avatar

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.