typesafehub / sbt-conductr

Typesafe ConductR plugin for sbt
Other
29 stars 22 forks source link

Use conductr-cli commands #127

Closed markusjura closed 8 years ago

markusjura commented 8 years ago

The conductr-cli and sbt-conductr using the exact same commands to communicate with the ConductR cluster. However, both libraries do not share any code so far. This PR removes the sbt-conductr implementation of the conduct commands and instead calls the conductr-cli.

Pros

Cons

Changes

markusjura commented 8 years ago

Added the issue https://github.com/sbt/sbt-conductr/issues/128 to update the README and provide sbt scripted tests.

markusjura commented 8 years ago

Note that conduct load without any further argument, displays the usage from the conductr-cli. Same counts for all other commands which expect an additional argument. Of course the usage information are also displayed when using the options -h or --help.

Example

> conduct load
usage: conduct load [-h] [-i IP] [-p PORT] [-v] [-q] [--long-ids]
                    [--api-version {1,2}] [--settings-dir CLI_SETTINGS_DIR]
                    [--custom-settings-file CUSTOM_SETTINGS_FILE]
                    [--custom-plugins-dir CUSTOM_PLUGINS_DIR]
                    [--resolve-cache-dir RESOLVE_CACHE_DIR] [--wait-timeout]
                    [--no-wait]
                    bundle [configuration]

positional arguments:
  bundle                The path to the bundle
  configuration         The optional configuration for the bundle

optional arguments:
  -h, --help            show this help message and exit
  -i IP, --ip IP        The optional ConductR IP, defaults to one of the value
                        in this order:$CONDUCTR_IP orIP address of the docker
                        VM or`127.0.0.1`
  -p PORT, --port PORT  The optional ConductR port, defaults to $CONDUCTR_PORT
                        or `9005`
  -v, --verbose         Print JSON response to the command
  -q                    Prints affected bundle id on screen if enabled
  --long-ids            Print long Bundle IDs
  --api-version {1,2}   Sets which ConductR api version to be used
  --settings-dir CLI_SETTINGS_DIR
                        Directory where ConductR CLI settings are stored,
                        defaults to /Users/mj/.conductr
  --custom-settings-file CUSTOM_SETTINGS_FILE
                        Configuration where custom settings for ConductR CLI
                        are stored in HOCON format,defaults to
                        /Users/mj/.conductr/settings.conf
  --custom-plugins-dir CUSTOM_PLUGINS_DIR
                        Directory where custom plugins for ConductR CLI are
                        stored, defaults to /Users/mj/.conductr/plugins
  --resolve-cache-dir RESOLVE_CACHE_DIR
                        Directory where resolved bundles are cached, defaults
                        to /Users/mj/.conductr/cache
  --wait-timeout        Timeout in seconds waiting for bundle scale to be
                        achieved in conduct run, or bundle to be stopped in
                        conduct stop, defaults to
  --no-wait             Disables waiting for bundle scale to be achieved in
                        conduct run, or bundle to be stopped in conduct stop,
                        defaults to