Wednesday, August 21, 2013

Install Apache Stratos

Apache Stratos could be installed on a single node or on multiple nodes. If you are installing on multiple nodes copy stratos_installer to each node and update configuration parameters in conf/setup.conf accordingly.

Installation Guide
1. Install following prerequisites. Use sudo apt-get install for this.
  • java    -jdk1.6.x
  • git
  • facter
  • zip
  • mysql-server
  • Gitblits 

2. Build Apache Stratos from source:
  • git clone
  • cd incubator-stratos
  • mvn clean install

3. Copy cloud controller, stratos controller, elb, agent and cli packages to a folder inside stratos_installer. May be this could be called "stratos_installer/packages":
  • apache-stratos-cc-<version>.zip 
  • apache-stratos-sc-<version>.zip
  • apache-stratos-elb-<version>.zip   
  • apache-stratos-agent-<version>.zip
  • apache-stratos-cli-<version>.zip 
4. Download WSO2 Message Broker binary distribution from and copy it to stratos-pack-path. Here you could use any preferred message broker product which supports AMPQ.

5. Extract WSO2 Message Broker distribution to desired path (this will be identified as stratos-path) and set it's port offset in repository/conf/carbon.xml to 5. This will set the actual port to 5677.

6. Download MySql Java connector from and copy the jar file to the above packages folder.

7. Create and download the keys from IaaSs and store them on a secure location.

8. If Apache Stratos being setup in multiple nodes open up the security rules in IaaSs for the following ports (defined in ./conf/setup.conf) 22, 443, 8280, 4103, 4100, agent_https_port, agent_http_port, elb_port, agent_clustering_port, sc_cluster_port, elb_cluster_port, cassandra_port, stratos_db_port and userstore_db_port.

9. Either download pre-built cartridge images from Apache Stratos website or create your own cartridges. Please refer Apache Stratos documentation for more information on creating cartridge images. For Amazon EC2, you could find pre-built PHP, MySQL and Tomcat cartridges published in Amazon EC2 AMI image repository.

10. If all stratos products are installed on the same node, update /etc/hosts file with a set of domain/host names mapping each product. These values should be updated on conf/setup.conf file. If they are installed on different nodes use actual hostnames.

    <ip-address>        # stratos domain
    <ip-address>     # message broker hostname
    <ip-address>     # cloud controller hostname
    <ip-address>     # stratos controller hostname
    <ip-address>    # elastic load balancer hostname
    <ip-address>  # agent hostname

11. Update ./conf/setup.conf and configure parameters. 

12. Run as root to install.

    sudo ./ -p "<product-list>"
    <product-list> could be defined as "cc sc elb agent" or any other combination according to the
    deployment configuration.
    sudo ./ -p "all"

13. If you need to clean the setup run bellow command:
      sudo ./ -u <mysql-username> -p <mysql-password>

No comments:

Post a Comment