Versions Compared

Key

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

...

  1. Download the CLI binary distribution (apache-stratos-cli-version-SNAPSHOT.zip) and unzip it.

    This can be done using any of the following methods:

    • Method 1 - Download the Stratos CLI binary distribution from Apache Download Mirrors and unzip it. 

    • Methods 2 - Obtain the Stratos CLI binary distribution from the following directory in the Stratos source distribution and unzip it.
      <STRATOS_SOURCE_HOME>/products/stratos-cli/distribution/target/

      Note

      The CLI binary distribution will only be available in the Stratos source distribution after Stratos is built from the source.

       

  2. Export the host and port of Stratos Manager (SM) as environment variables before using the CLI tool.
    • On Mac OS X you need to add the following to your .bash_profile file
.
    • On Linux you need to add the following to your .bashrc file.

      Code Block
      export STRATOS_URL=https://<STRATOS-MANAGER-IP>:<PORT>

      For example:

      Code Block
      export STRATOS_URL=https://localhost:9443
  3. Ensure that your Java home and Java path  environmental variables have been set in your .bash_profile (on Mac) or .bashrc (on Linux) file.

  4. Navigate to the  apache-stratos-cli-version-SNAPSHOT/bin/  directory.

    Code Block
    cd apache-stratos-cli-<VERSION>-SNAPSHOT/bin
  5. Add execute permissions to the script.

    Code Block
    chmod +x ./stratos.sh
  6. Optionally, you can export your username and password as environment variables.

    If you only export your username, you will be prompted to enter your password.

    Code Block
    export STRATOS_USERNAME=<username>
    export STRATOS_PASSWORD=<password>
  7. Log into the CLI tool using the following command:

    CommandScenario
    ./stratos.sh -u admin -p admin
    If you have not exported your username and password.
    ./stratos.sh -p admin
    If you have only exported your username.
    ./stratos.sh
    If you have exported your username and password or if you wish to be prompted for your username and password later.

    For more information on how to use the CLI tool, see the CLI Tool Guide.