Versions Compared

Key

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

...

Note

In Stratos, the Mock IaaS is enabled by default. If you wish to disable the Mock IaaS, navigate to the <apache-stratos-<VERSION>-SNAPSHOT>/ repository/conf/mock-iaas.xml file and change the following to false:
<mock-iaas enabled="true"> 

Table of Contents

Prerequisites

  • Install Maven, JDK and MySQL. See Prerequisites for compatible versions. 
  • Download the Apache ActiveMQ.
  • Set the environment variable MAVEN_OPTS='-Xms2048m -Xmx4096m -XX:MaxPermSize=1024m' to avoid the maven OutOfMemoryError.
    export MAVEN_OPTS='-Xms2048m -Xmx4096m -XX:MaxPermSize=1024m' 

Starting Stratos on a Mock IaaS

Follow the steps below to start Stratos on a Mock IaaS:

  1. Ensure that the above mentioned prerequisites have been met prior to the Apache Stratos installation.

  2. Obtain the apache-stratos-<VERSION>-SNAPSHOT.zip  binary file. This can be done using any of the following methods:

    • Download the Stratos binary distribution from Apache Download Mirrors

    • Build the Stratos source using the following instructions:

      1. Checkout the source from Apache Stratos remote repository to a folder of your choice.

        git clone https://git-wip-us.apache.org/repos/asf/stratos.git <local-folder-name>

        For example: 
        git clone https://git-wip-us.apache.org/repos/asf/stratos.git myLocalRepo

        Info

        Make sure that you have setup Git properly. For more information, go to http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup

      2. Build Stratos using Maven.

        1. Navigate to the stratos/ directory, which is within the directory that you checked out the source.

          cd <local-folder-name>/stratos/

          For example: cd myLocalRepo/stratos/
           
        2. Use Maven to build the source.
          mvn clean install

          Info

          You can use one of the following commands instead of the above Maven build command

          CommandDescription
          mvn clean install -Dmaven.test.skip=trueTo build source distribution, without running any of the unit tests. This will reduce the time taken to build the source distribution.
          mvn clean install -Dmaven.test.skip=true -o To build source distribution, without running any of the unit tests, in offline mode. This can be done only if you've already built the source at least once.
  3. Unzip the Stratos binary distribution (apache-stratos-<VERSION>-SNAPSHOT.zip). If you built Stratos from source, the binary distribution can be found in the <STRATOS_HOME>/products/stratos/modules/distribution/target/ directory.

    Tip

    For easy access, move the Stratos binary distribution to a location of your choice.

  4. Unzip the ActiveMQ distribution.

  5. Navigate to the <ACTIVEMQ-HOME>/bin/ directory, which is in the unzipped ActiveMQ distribution, and run the following command to start ActiveMQ.
    ./activemq start 

  6. Navigate to the <apache-stratos-<VERSION>-SNAPSHOT>/bin/ directory, which is in the unzipped Stratos distribution, and run the following command to start Stratos.
    ./stratos.sh

Accessing the management console

Once the installation is complete, the Carbon management console URL will appear.
For example:

...

Note

If you run any commands before Stratos has started successfully, errors will occur.

Stopping the servers

Follow the instructions below to stop Stratos and ActiveMQ:

...