Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Getting Started with CLI

Follow the steps mentioned below to be able to use the CLI tool:

 

 

Info

You need Java 1.6 or a later version.

 

 

  1. Extract the CLI tool from the following ZIP file to the home directory or a place of your choice.
       wso2s2cli-1.0.0.zip
  2. Export the host and port of the SC as environment variables in your  bashrc  file before using the CLI Tool.
    Example:

    Code Block
    export STRATOS_URL=https://192.168.92.10:9445
  3. Export the following environment variables by adding them into your bashrc file.

    Code Block
    export JAVA_HOME=/opt/jdk1.6.0_24/
    export PATH=$JAVA_HOME/bin:$PATH
    $ cd wso2s2cli-1.0.0
  4. Add execute permission to the script.

    Code Block
    $ chmod 755 ./stratos.sh
  5. If you wish you can also export your username and password as environment variables.
    If you export only the username, you will be prompted to enter the password.

    Code Block
    export STRATOS_USERNAME=<username>
    export STRATOS_PASSWORD=<password>

     

...

  • Call stratos.sh to log-in to Stratos Controller using this mode:
    As mentioned previously, providing the password as an argument is optional. The CLI tool will prompt for the password.

    Code Block
    $ stratos.sh  -u <username> -p <password>

    Example:
    $ stratos.sh  -u admin@wso2.org   -p admin123

    The log-in help will be shown, if you have provided wrong parameters to log-in.
    As mentioned previously, the password is prompted only if the password argument is not passed.

  • Once you have successfully logged in, you can use the help command to get an idea of the various actions that can be carried out via the interactive command line shell interface named Stratos .

    Code Block
    stratos> help

    The output will appear as follows:

     

...