Petals ESB CLI 3.2.0-SNAPSHOT

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (48)

View Page History
{warning}
Petals ESB CLI *1.0.0* works with Petals *4.0*, but may also work with Petals 3 versions.
Petals ESB CLI *2.0.0\+* and *2.1.0\+* work with Petals *4.1* and higher, but may also work with Petals 3 versions.
Petals ESB CLI *2.2.0\+* works with Petals ESB Container *5.0.0*, but may also work with previous versions of Petals.
Petals ESB CLI *2.3.0* works with Petals ESB Container *5.0.1* and higher, but may also work with previous versions of Petals.
Petals ESB CLI *2.3.1\+* works with Petals ESB Container *5.0.2* and higher, but may also work with previous versions of Petals.
Petals ESB CLI *3.0.0\+* works with Petals ESB Container *5.1.0* and higher, but may also work with previous versions of Petals.
Petals ESB CLI *3.1.0* was not packaged because of [PETALSESBCLI-177|https://jira.petalslink.com/browse/PETALSESBCLI-177].
Petals ESB CLI *3.1.1\+* works with Petals ESB Container *5.2.0* and higher, but may also work with previous versions of Petals.
Petals ESB CLI *3.2.0\+* works with Petals ESB Container *5.3.0* and higher, but may also work with previous versions of Petals. It embeds [Petals ESB Deployer 1.0.0|petalscomponents:Petals ESB Deployer 1.0.0].
{warning}

{code}
usage: Petals JMX Command Line Interface

[-d] [-y] [-h <host> -n <port> | -h <host> -n <port> -u <user> -p <password> | -a
<alias>] [-H | -V | [--file] <filename> | -c -- <command> | -C]
{code}

To get available commands, use the command 'help' on command-line: petals-cli.sh \-c -- help
{code}
Available commands:
{code}

To get help on a command, use the command 'help' on command-line: petals-cli.sh \-c -- help <command>

{tip}Options of Petals ESB CLI are [POSIX.1-2008|http://pubs.opengroup.org/onlinepubs/9699919799/] or [IEEE Std 1003.1|http://pubs.opengroup.org/onlinepubs/9699919799/] compliant.{tip}

{column}
{column:width=40%}
The installation of Petals ESB CLI depends on your operating system. The following table resumes which archives is needed according to your operating system. Petals ESB CLI archives are available on the Petals's web-site: [http://download.petalslink.com/petals-esb.html].
|| Operating System || OS Version || Petals archive to use || Installation procedure ||
| Debian-based Linux | all | Debian packages | [Installing Petals ESB CLI using the Debian packages] |
| Linux | all | ZIP archive | [Installing Petals ESB CLI using the ZIP archive] |
| Microsoft Windows | all | ZIP archive | [Installing Petals ESB CLI using the ZIP archive] |
{code}

{info}A Petals script is text file containing commands supported by Petals ESB CLI, and comments. Comments start by '{{\#}}', optionally preceded by space(s).{info}

h3. Execution of an inlined Petals script
{tip}
You can [write your own command|#add_your_own_command]

{tip}

> ./petals-cli.sh -h <host> -n <port> -u <user> -p <password> -c -- <command>
> ./petals-cli.sh -C
petals-cli> connect -h <host1> -n <port1> -u <user1> -p <password1>
petals-cli@<host1>:<port1>>
{code}
{code}

{tip}The arguments {{-h}}, {{-p}}, {{-u}}, {{-p}} and {{-a}} of the command line are significant only for the command line mode (ie. {{-c}}){tip}
{tip}The arguments {{\-h}}, {{\-p}}, {{\-u}}, {{\-p}} and {{\-a}} of the command line are significant only for the command line mode (ie. {{\-c}}){tip}

h2. Default connection

{anchor:deploy}

h3. Deploying and Starting an Artifact at once

* *<configuration-properties>* is a list of '_<property-name>=<property-value>_', separated by a comma, where _<property-name>_ is the name of the property to configure with _<property-value>_. This argument is used only if the artifact is a component or a Petals ESB bus object model. It has no sense for other artifacts. This argument is exclusive with *<configuration-file>*.

If the flag {{\-s,\-\-skip-startup}} {{\-s,--skip-startup}} is set, the start-up of the artifact is skipped, the artifact is only deployed.

{warning}Due to a limitation with the underlying library used to implement CLI, it is necessary to have a space between {{\-D}} and its argument\! (see [PETALSESBCLI-150|https://jira.petalslink.com/browse/PETALSESBCLI-150] for details){warning}

{tip}
Maven URLs are supported by this command: {{deploy \-u mvn:org.ow2.petals/petals-se-xslt/LATEST/zip}}.
{tip}

If the argument _<artifact-file>_ of the '_deploy_' command is a local directory, all artifacts of the directory are deployed.

If the flag {{\-s,\-\-skip-startup}} {{\-s,--skip-startup}} is set, the start-up of the artifact is skipped, the artifact is only deployed.

{note}Only the protocol 'file' is available.{note}

{tip}
Maven URLs are supported by this command: {{start-artifact \-u mvn:org.ow2.petals/petals-se-xslt/LATEST/zip}}.
{tip}


{tip}
Maven URLs are supported by this command: {{stop-artifact \-u mvn:org.ow2.petals/petals-se-xslt/LATEST/zip}}.
{tip}


{tip}
Maven URLs are supported by this command: {{undeploy \-u mvn:org.ow2.petals/petals-se-xslt/LATEST/zip}}.
{tip}

** The version of the shared library if available, extracted from its JBI descriptor
** If the shared library was built with Maven, its Maven version extracted from Maven metadata
** {color:#ff0000}Extended information:{color}
** {color:#ff0000}Extended information:{color}*** {color:#ff0000}List of embedded libraries (coming next){color}


** If the component was built with Maven, its Maven version extracted from Maven metadata
** Its state (not-loaded, loaded, installed, started, stopped, shutdown)
** {color:#ff0000}Extended information:{color}
** {color:#ff0000}Extended information:{color}*** {color:#ff0000}List of embedded libraries of the boostrap classpath(coming next){color}
*** {color:#ff0000}List of embedded libraries of the runtime classpath(coming next){color}
*** {color:#ff0000}List of needed shared-libraries, for each shared-library(coming next):{color}**** {color:#ff0000}Its JBI identifier{color}
**** {color:#ff0000}Its JBI identifier{color}
**** {color:#ff0000}The version of the shared library if available, extracted from its JBI descriptor{color}


{tip}
Maven URLs are supported by this command: {{show \-u mvn:org.ow2.petals/petals-se-xslt/LATEST/zip}}.
{tip}

h4. Getting the topology with JBI artifacts deployed

All JBI artifacts deployed on each Petals container of the topology can be displayed using the option '{{-a | --artifacts}}'. '{{\-a \| \--artifacts}}'. With this option the following JBI artifacts are returned: shared libraries, components and service assemblies.
{note}The pass-phrase argument is required to retrieve JBI artifacts deployed on each Petals container.{note}
{code}
h4. Filtering

The content of the topology can be limited to some containers using the filter '{{\-c <container-name-regexp>}}', where _{{container-name-regexp}}_ {{{_}container-name-regexp{_}}} is a regexp identifying the containers to displayed:
{code}
petals-cli@host:port> topology-list -c Node1
{code}

{tip}The auto-completion of the filter '{{\-c}}' proposes the container names of the topology.{tip}

h3. Moving or attaching a container to another domain
where:
* the container to move is the container on which Petals ESB CLI is connected
* *\--target-domain*: the target domain name, the one that will be joined,
* *\--target-host*: the host name of the container of the target domain. Default value: {{localhost}},
* *\--target-port*: the JMX port of the container of the target domain. Default value: {{7700}},
* *\--target-user*: the JMX username of the container of the target domain. Default value: {{petals}},
* *\--target-pwd*: the JMX password of the container of the target domain. Default value: {{petals}},
* *\--target-pass-phrase*: the security pass-phrase to access sensible information

Note that the domain name is only used to verify the consistency of the move: in the end, what matters is that the container will be moved to the same domain as the target container that is contacted using the JMX connection informations.
{code}
>./petals-cli.sh -C
petals-cli@host:port> move-container
Are you sure you want to detach the current container ? (y/n)
{code}

where:
* {{\--output-endpoints}} selects the part about endpoints,
* {{\--output-services}} selects the part about services,
* {{\--output-interfaces}} selects the part about interfaces.

If only one of these flags is set, its header will not be displayed. If none of these flags is set, all 3 parts are displayed.
h3. Checking a SSL connection establishment

The command *{{check-ssl-handshake}}* {{{*}check-ssl-handshake{*}}} provides a way to check the establishment of a SSL connection:
{code}
USAGE:
<LEVEL>: <message>
{code}
where <LEVEL> is the international label of the logging trace level, except for the level '{{SEVERE}}' which is always '{{ERROR}}'. By default, only levels '{{SEVERE}}' and '{{WARNING}}' are printed.
where <LEVEL> is the international label of the logging trace level: '{{SEVERE}}', '{{WARNING}}', '{{INFO}}', '{{CONFIG}}', '{{FINE}}', '{{FINER}}' or '{{FINEST}}'. The level '{{SEVERE}}' is '{{ERROR}}'. By default, only levels '{{SEVERE}}' and '{{WARNING}}' are printed.

The default configuration can be overridden using the system property '{{java.util.logging.config.file}}' to set into the launching script '{{$PETALS_CLI_HOME/bin/petals-cli.sh}}' or '{{%PETALS_CLI_HOME%\bin\petals-cli.bat}}'. An sample configuration is available in file '{{$PETALS_CLI_HOME/conf/petals-cli-logging-sample.properties}}'



h1. Known Problems