Repository: incubator-ignite Updated Branches: refs/heads/ignite-1023 [created] 08cba6b52
# ignite-1023 Add example for visorcmd start command. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/08cba6b5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/08cba6b5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/08cba6b5 Branch: refs/heads/ignite-1023 Commit: 08cba6b52158fa6786573d11b0d66972008a20c7 Parents: b3e2bd4 Author: Andrey <[email protected]> Authored: Wed Jun 24 14:47:37 2015 +0700 Committer: Andrey <[email protected]> Committed: Wed Jun 24 14:49:28 2015 +0700 ---------------------------------------------------------------------- bin/include/visorcmd/node_startup_by_ssh.ini | 44 ++++++++++++++++++++ .../util/nodestart/StartNodeCallableImpl.java | 4 +- .../commands/start/VisorStartCommand.scala | 4 +- 3 files changed, 50 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08cba6b5/bin/include/visorcmd/node_startup_by_ssh.ini ---------------------------------------------------------------------- diff --git a/bin/include/visorcmd/node_startup_by_ssh.ini b/bin/include/visorcmd/node_startup_by_ssh.ini new file mode 100644 index 0000000..c460417 --- /dev/null +++ b/bin/include/visorcmd/node_startup_by_ssh.ini @@ -0,0 +1,44 @@ +# section with settings for host 1 +[host1] +# ip address or host name +host=192.168.1.1 +# ssh port +port=2200 +# ssh login +uname=userName +# ssh password +passwd=password +# ssh key path +key=~/.ssh/id_rsa +# start node count +nodes=1 +# ignite home path +igniteHome=/usr/lib/ignite +# ignite config path +cfg=examples/example-ignite.xml +# ignite node start script +script=bin/ignite.sh + +# section with settings for host 2 +[host2] +# ip address or host name +host=192.168.1.2 + +# section with default settings. Used if value not defined in host section. +[defaults] +# ssh port +port=22 +# ssh login +uname=userName +# ssh password +passwd=passwd3 +# ssh key path +key=~/.ssh/id_rsa +# ssh key path +nodes=3 +# ignite home path +igniteHome=/usr/lib/ignite +# ignite config path +cfg=examples/example-ignite.xml +# ignite node start script +script=bin/ignite.sh \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08cba6b5/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java ---------------------------------------------------------------------- diff --git a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java index 7c6010f..a4b71ef 100644 --- a/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java +++ b/modules/ssh/src/main/java/org/apache/ignite/internal/util/nodestart/StartNodeCallableImpl.java @@ -230,7 +230,9 @@ public class StartNodeCallableImpl implements StartNodeCallable { */ private String env(Session ses, String name, String dflt) throws JSchException { try { - return exec(ses, "echo " + name); + String value = exec(ses, "echo " + name); + + return F.isEmpty(value) ? dflt : value; } catch (IOException ignored) { return dflt; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08cba6b5/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala index 9365592..ce1a2ab 100644 --- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala +++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/start/VisorStartCommand.scala @@ -319,6 +319,7 @@ class VisorStartCommand extends VisorConsoleCommand { println("NOTE:") println(" - Successful start attempt DOES NOT mean that node actually started.") + println(" - Log files are stored in $TMPDIR/ignite-startNodes folder or /tmp/ignite-startNodes if $TMPDIR is not set.") println(" - For large topologies (> 100s nodes) it can take over 10 minutes for all nodes to start.") println(" - See individual node log for details.") } @@ -346,7 +347,8 @@ object VisorStartCommand { ), args = List( "-f=<path>" -> List( - "Path to INI file that contains topology specification." + "Path to INI file that contains topology specification.", + "Example file bin/include/visorcmd/node_startup_by_ssh.ini constains information about file content." ), "-h=<hostname>" -> List( "Hostname where to start nodes.",
