Follow the instructions below to install Apache Stratos products together with the third-party products used by Apache Stratos in a distributed setup, which has multiple Java virtual machines (JVMs), using the Stratos installer (setup.sh
), which is available in the <STRATOS_SOURCE_HOME>/tools/stratos-installer
directory:
Configure and start the Cloud Controller node.
Configure the common settings.
Click here for instructions
Follow the instructions below to configure the common settings:
Create the following folders at the same level in a location where you will run Apache Stratos.
Folder Name | Folder Contents | Example Folder Location |
---|
stratos_installer | Apache Stratos setup | <MyFolder>/stratos_installer/ |
stratos_packs | The zipped binary distribution files of the products that will be used by Apache Stratos | <MyFolder>/stratos_packs/ |
stratos | Installed Apache Stratos instance | <MyFolder>/stratos/ |
- Copy the contents of the
<STRATOS_SOURCE_HOME>/tools/stratos-installer/
directory to the <stratos_installer>
folder. Download the apache-stratos-<version>.zip
file from Apache Download Mirrors, and copy it to <stratos_packs>
directory.
- Download the ActiveMQ distribution (tar.gz file) and copy it into the
<stratos-pack>
folder. - Download the MySQL Java Connector and copy the JAR file into the
<stratos-pack>
folder. - Update the following configurations in the
<
stratos_installer>/conf/setup.conf
file.
General configuration
setup_path
: Enter the folder path of the <stratos_installer>
folder that contains the Stratos installer.stratos_packs
: Enter the folder path of the <stratos_packs>
folder that contains the Stratos packages and other third-party packs and JARs.stratos_path
: Enter the folder path of the <stratos>
folder where Stratos will be installed.JAVA_HOME
: Enter the path where the Java Development Kit (JDK) is installed.log_path
: Enter the folder path to the Stratos logs.host_user
: Enter the host user account for the machine that runs the Stratos component(s).stratos_domain:
Enter the domain of Stratos. The default value is as follows: stratos.apache.org.host_ip
: Enter the machine IP address of the host machine.offset
: Enter the port offset of the machine.puppet_ip
: Enter the IP address of the machine or node on which Puppet Master will be run.puppet_hostname
: Enter the hostname that is given to identify the Puppet Master.puppet_environment
: If you wish to use the same Puppet Master with multiple Stratos runtimes, enter the name of the Puppet environment; otherwise, enter a dummy value for this configuration.mb_ip
: Enter the IP address of the machine or node on which Message Broker service runs.mb_port
: Enter the default port on which the Message Broker service runs.
IaaS configuration
In configuring the Cloud Controller, you need to configure the relevant IaaS provider details. You can enable or disable the IaaS provider by setting the <IAAS_NAME>_provider_enabled
parameter either to 'true'
or 'false'
.
Database configuration
Update the value of the parameter mysql_connector_jar
with the relevant JAR file name. The default JAR file name is mysql-connector-java-5.1.25.jar.
Provide database configuration details for the userstore of the MySQL server such as userstore_db_hostname, userstore_db_schema, userstore_db_port, userstore_db_user and userstore_db_pass
accordingly.
Install Cloud Controller.
For more information, see the setup.sh usage definition.
Configure and start the Stratos Manager node.
Configure the common settings.
Click here for instructions
Follow the instructions below to configure the common settings:
Create the following folders at the same level in a location where you will run Apache Stratos.
Folder Name | Folder Contents | Example Folder Location |
---|
stratos_installer | Apache Stratos setup | <MyFolder>/stratos_installer/ |
stratos_packs | The zipped binary distribution files of the products that will be used by Apache Stratos | <MyFolder>/stratos_packs/ |
stratos | Installed Apache Stratos instance | <MyFolder>/stratos/ |
- Copy the contents of the
<STRATOS_SOURCE_HOME>/tools/stratos-installer/
directory to the <stratos_installer>
folder. Download the apache-stratos-<version>.zip
file from Apache Download Mirrors, and copy it to <stratos_packs>
directory.
- Download the ActiveMQ distribution (tar.gz file) and copy it into the
<stratos-pack>
folder. - Download the MySQL Java Connector and copy the JAR file into the
<stratos-pack>
folder. - Update the following configurations in the
<
stratos_installer>/conf/setup.conf
file.
General configuration
setup_path
: Enter the folder path of the <stratos_installer>
folder that contains the Stratos installer.stratos_packs
: Enter the folder path of the <stratos_packs>
folder that contains the Stratos packages and other third-party packs and JARs.stratos_path
: Enter the folder path of the <stratos>
folder where Stratos will be installed.JAVA_HOME
: Enter the path where the Java Development Kit (JDK) is installed.log_path
: Enter the folder path to the Stratos logs.host_user
: Enter the host user account for the machine that runs the Stratos component(s).stratos_domain:
Enter the domain of Stratos. The default value is as follows: stratos.apache.org.host_ip
: Enter the machine IP address of the host machine.offset
: Enter the port offset of the machine.puppet_ip
: Enter the IP address of the machine or node on which Puppet Master will be run.puppet_hostname
: Enter the hostname that is given to identify the Puppet Master.puppet_environment
: If you wish to use the same Puppet Master with multiple Stratos runtimes, enter the name of the Puppet environment; otherwise, enter a dummy value for this configuration.mb_ip
: Enter the IP address of the machine or node on which Message Broker service runs.mb_port
: Enter the default port on which the Message Broker service runs.
IaaS configuration
In configuring the Cloud Controller, you need to configure the relevant IaaS provider details. You can enable or disable the IaaS provider by setting the <IAAS_NAME>_provider_enabled
parameter either to 'true'
or 'false'
.
Database configuration
Update the value of the parameter mysql_connector_jar
with the relevant JAR file name. The default JAR file name is mysql-connector-java-5.1.25.jar.
Provide database configuration details for the userstore of the MySQL server such as userstore_db_hostname, userstore_db_schema, userstore_db_port, userstore_db_user and userstore_db_pass
accordingly.
Install Stratos Manager.
For more information, see the setup.sh usage definition.
Configure and start the Autoscaler node.
Configure the common settings.
Click here for instructions
Follow the instructions below to configure the common settings:
Create the following folders at the same level in a location where you will run Apache Stratos.
Folder Name | Folder Contents | Example Folder Location |
---|
stratos_installer | Apache Stratos setup | <MyFolder>/stratos_installer/ |
stratos_packs | The zipped binary distribution files of the products that will be used by Apache Stratos | <MyFolder>/stratos_packs/ |
stratos | Installed Apache Stratos instance | <MyFolder>/stratos/ |
- Copy the contents of the
<STRATOS_SOURCE_HOME>/tools/stratos-installer/
directory to the <stratos_installer>
folder. Download the apache-stratos-<version>.zip
file from Apache Download Mirrors, and copy it to <stratos_packs>
directory.
- Download the ActiveMQ distribution (tar.gz file) and copy it into the
<stratos-pack>
folder. - Download the MySQL Java Connector and copy the JAR file into the
<stratos-pack>
folder. - Update the following configurations in the
<
stratos_installer>/conf/setup.conf
file.
General configuration
setup_path
: Enter the folder path of the <stratos_installer>
folder that contains the Stratos installer.stratos_packs
: Enter the folder path of the <stratos_packs>
folder that contains the Stratos packages and other third-party packs and JARs.stratos_path
: Enter the folder path of the <stratos>
folder where Stratos will be installed.JAVA_HOME
: Enter the path where the Java Development Kit (JDK) is installed.log_path
: Enter the folder path to the Stratos logs.host_user
: Enter the host user account for the machine that runs the Stratos component(s).stratos_domain:
Enter the domain of Stratos. The default value is as follows: stratos.apache.org.host_ip
: Enter the machine IP address of the host machine.offset
: Enter the port offset of the machine.puppet_ip
: Enter the IP address of the machine or node on which Puppet Master will be run.puppet_hostname
: Enter the hostname that is given to identify the Puppet Master.puppet_environment
: If you wish to use the same Puppet Master with multiple Stratos runtimes, enter the name of the Puppet environment; otherwise, enter a dummy value for this configuration.mb_ip
: Enter the IP address of the machine or node on which Message Broker service runs.mb_port
: Enter the default port on which the Message Broker service runs.
IaaS configuration
In configuring the Cloud Controller, you need to configure the relevant IaaS provider details. You can enable or disable the IaaS provider by setting the <IAAS_NAME>_provider_enabled
parameter either to 'true'
or 'false'
.
Database configuration
Update the value of the parameter mysql_connector_jar
with the relevant JAR file name. The default JAR file name is mysql-connector-java-5.1.25.jar.
Provide database configuration details for the userstore of the MySQL server such as userstore_db_hostname, userstore_db_schema, userstore_db_port, userstore_db_user and userstore_db_pass
accordingly.
Install Autoscaler.
For more information, see the setup.sh usage definition.
Configure and start WSO2 CEP:
Configure WSO2 CEP.
Click here for instructions
Update the following configuration and artifact files in the Complex Event Processor (CEP):
- Download WSO2 Complex Event processor 3.0.0.
- Update the port offset of the Complex Event Processor in the in the
carbon.xml
file, which is found in the <CEP_HOME>/repository/conf/
directory as follows:
<offset>4</offset>
The default offset value given to Complex Event Processor in Apache Stratos is 4. The resulting Complex Event Processor Thrift port is 7615. - Copy the following
stream-manager-config.xml
file from the <STRATOS_SOURCE_HOME>/extensions/cep/artifacts/stream_definitions
directory to <CEP_HOME>/repository/conf
directory. Where <STRATOS_SOURCE_HOME>
refers to the Apache Stratos source repository. Replace the content in the jndi.properties
file, which is in the <CEP_HOME>/repository/conf
directory, with the following configurations. Update the message-broker-ip
and message-broker-port
values.
connectionfactoryName=TopicConnectionFactory
java.naming.provider.url=tcp://[MB_IP]:[MB_Port]
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
# register some topics in JNDI using the form
# topic.[jndiName]=[physicalName]
topic.lb-stats=lb-stats
topic.instance-stats=instance-stats
topic.summarized-health-stats=summarized-health-stats
topic.topology=topology
topic.ping=ping
Add the following content to the siddhi.extension
file, which is in the <CEP_HOME>/repository/conf/siddhi
directory.
org.apache.stratos.cep.extension.GradientFinderWindowProcessor
org.apache.stratos.cep.extension.SecondDerivativeFinderWindowProcessor
org.apache.stratos.cep.extension.FaultHandlingWindowProcessor
org.apache.stratos.cep.extension.ConcatWindowProcessor
org.apache.stratos.cep.extension.MemeberRequestHandlingCapabilityWindowProcessor
- Build the project in the
<STRATOS_SOURCE_HOME>/extensions/cep/stratos-cep-extension
directory. Thereafter, copy the org.apache.stratos.cep.extension-4.1.x.jar
file that can be found in the <STRATOS_SOURCE_HOME>/extensions/cep/stratos-cep-extension/target
directory, to the <CEP_HOME>/repository/components/lib/
directory. Download any dependency on 5.9.1 or any latest stable ActiveMQ TAR file from https://activemq.apache.org/download.html. The folder path of this file will be referred to as <ACTIVEMQ_HOME>
. Copy the following ActiveMQ client JARSs from <ActiveMQ_HOME>
/lib
directory to the <CEP_HOME>/repository/components/lib
directory.
activemq-broker-5.9.1.jar
activemq-client-5.9.1.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
hawtbuf-1.9.jar
- Copy the following WSO2 MB client libraries to the
<CEP_HOME>/repository/components/dropins
directory.andes-client-0.13.wso2v8.1.jar
geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
- Download the
commons-lang3-3.4.jar
files from commons.apache.org and commons-logging-1.2.jar
files from commons.apache.org. Copy the downloaded files to the <CEP_HOME>/repository/components/lib
directory. - Copy the following files from the
<STRATOS_SOURCE_HOME>/extensions/cep/artifacts/eventbuilders
directory to the <CEP_HOME>/repository/deployment/server/eventbuilders
directory:HealthStatisticsEventBuilder.xml
InstanceStatisticsEventBuilder.xml
LoadBalancerStatisticsEventBuilder.xml
- Copy the following files from the respective directories to the
<CEP_HOME>/repository/components/lib
directory. - Copy the following file from
<STRATOS_SOURCE_HOME>/extensions/cep/artifacts/inputeventadaptors/
directory to the <CEP_HOME>/repository/deployment/server/inputeventadaptors
directory:DefaultWSO2EventInputAdaptor.xml
- Copy the following files from the
<STRATOS_SOURCE_HOME>/extensions/cep/artifacts/outputeventadaptors
directory to the <CEP_HOME>/repository/deployment/server/outputeventadaptors
directory:DefaultWSO2EventOutputAdaptor.xml
JMSOutputAdaptor.xml
Update the MB_HOSTNAME
and MB_LISTEN_PORT
with relevant values in the JMSOutputAdaptor.xml
file that was copied in the above step, as follows:
property name="java.naming.provider.url">tcp://MB_HOSTNAME:MB_LISTEN_PORT</property>
- Copy the following files from the
<STRATOS_SOURCE_HOME>/extensions/cep/artifacts/executionplans
directory to the <CEP_HOME>/repository/deployment/server/executionplans
directory:AverageHeathRequest.xml
AverageInFlightRequestsFinder.xml
GradientOfHealthRequest.xml
GradientOfRequestsInFlightFinder.xml
SecondDerivativeOfHealthRequest.xml
SecondDerivativeOfRequestsInFlightFinder.xml
- Copy the following files from the
<STRATOS_SOURCE_HOME>/extensions/cep/artifacts/eventformatters
directory to the <CEP_HOME>/repository/deployment/server/eventformatters
directory:AverageInFlightRequestsEventFormatter.xml
AverageLoadAverageEventFormatter.xml
AverageMemoryConsumptionEventFormatter.xml
FaultMessageEventFormatter.xml
GradientInFlightRequestsEventFormatter.xml
GradientLoadAverageEventFormatter.xml
GradientMemoryConsumptionEventFormatter.xml
MemberAverageLoadAverageEventFormatter.xml
MemberAverageMemoryConsumptionEventFormatter.xml
MemberGradientLoadAverageEventFormatter.xml
MemberGradientMemoryConsumptionEventFormatter.xml
MemberSecondDerivativeLoadAverageEventFormatter.xml
MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
SecondDerivativeInFlightRequestsEventFormatter.xml
SecondDerivativeLoadAverageEventFormatter.xml
SecondDerivativeMemoryConsumptionEventFormatter.xml
Navigate to the <CEP_HOME>/bin/
directory.
cd
<CEP_HOME>/bin/
Run the following command to start WSO2 CEP:
./wso2server.sh start
Now, you have successfully started Stratos in a distributed setup on multiple Java Virtual Machines (JVMs). Once the installation is complete, access the Apache Stratos Console using the following URL:
https://<STRATOS-DOMAIN>:<PORT>/console
The default username and password is as follows: admin
setup.sh usage definition
The usage of the setup.sh
script has been described as follows:
setup.sh -p "<PROFILE>" [-s] [-o <PORT_OFFSET>]
Short code | Description |
---|
-p | Apache Stratos product profile to be installed on this node. Enter the name of the profile here. The available profiles are as follows: Profile | Description |
---|
default | All the products will be installed. | cc | Cloud Controlled will be installed. | as | Autoscaler will be installed. | sm | Stratos Manager will be installed |
|
-s | Silent mode. The user will not be prompted to enter any details and the server will be started after installation. You should not run the installer in silent mode if you have not manually configured the < stratos_installer>/conf/setup.conf file. |
-o | Port offset. Enables you to specify a port offset for the server to be started. |