Closed markusjura closed 8 years ago
Added the issue https://github.com/sbt/sbt-conductr/issues/128 to update the README and provide sbt scripted
tests.
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
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 theconductr-cli
.Pros
conduct load
,conduct run
, etc. are waiting now until the bundle has been loaded / started (current logic from conductr-cli)conduct load
can now resolve bundles from bintray (current logic from conductr-cli)Cons
conductr-cli
need to be installed to usesbt-conductr
Changes
ConductRKeys
have been removed. Instead the CLI options should be used. Note that if no option is set then the default from theconductr-cli
is used:controlServer
conductrConnectTimeout
conductrLoadTimeout
-.conductrRequestTimeout
conductrControlServerUrl
conductrLoggingQueryUrl
conductrApiVersion
conduct services
command has been addedconduct load --help
conductr-cli
have been added tosbt-conductr
as well (e.g.--verbose
,--long-ids
)conduct <command> <positional args> <optional args>
toconduct <command> <optional args> <positional args>
. Exampleconduct run --verbose --scale 2 my-bundle
. Note that the auto completion for a bundle (conduct run, stop, etc.) and for bundle files (conduct load) still works. As a consequence we don't have auto completion for any optional argument anymore (e.g.--scale
,--verbose
, etc.)conductr-cli
is installed. If not then ansys.error
is thrown with instructions how to install the CLI. This check is executed for everyconduct
command