zladovan / sbt-nomic   0.2.1

Apache License 2.0 GitHub

Sbt plugin for nomic - applications deployer for hadoop ecosystem

Scala versions: 2.12
sbt plugins: 1.0

sbt-nomic

Build Status Download

Sbt plugin for Nomic - applications deployer for hadoop ecosystem.

With sbt-nomic plugin it is possible to generate and control deployment of nomic boxes right from sbt build.

Setup

Declaring plugin

Nomic plugin is published for sbt 0.13.6 and sbt 1.0.4.

Create file project/nomic.sbt under base directory with following content:

addSbtPlugin("com.zlad" % "sbt-nomic" % "0.2.2")

Configure nomic

To use controller tasks you need to have local installation of nomic. Follow instructions in Nomic documentation.

Ensure you have added directory with nomic executable to PATH on your operating system.

Usage

After declaring plugin you can start use two types of tasks - controller and generator. They share some common settings.

name in nomic := "simple-workflow" // default to name.value
version in nomic := "1.0.0" // default to version.value

In the simplest usecase you can specify nomic box as a text

nomicDescribe :=
  """
    |name = 'simple-workflow'
    |version = '1.0.0'
    |
    |hdfs {
    |   resource "workflow.xml"
    |}
  """.stripMargin

Add some file, e.g. from project resources

mappings in nomic ++= resourceDirectory.value / "workflow.xml" pair flat

Finally deploy your box to hdfs from commandline

sbt nomicInstall

Generator

TODO

Controller

There are few tasks which result in calling nomic commands from command line. They can be used to control deployment of nomic box(es) from build. See Nomic documentation for details.

  • nomicInstall - nomic install ${path to target/nomic}
  • nomicRemove - nomic remove $group:$name:*
  • nomicUpgrade - shorthand for calling nomicRemove and nomicInstall
  • nomicList - nomic list
  • nomicConfig - nomic conf