Apache Stratos is an open source Platform as a Service (PaaS) cloud platform and it could be installed on a single node or on multiple nodes. The single node installation could be used for development and demonstration purposes. Here we are going to create EC2 Apache Stratos AMI for demonstration purpose.
You can simply create your own EC2 AMI for Apache Stratos by following the below steps.
Step 1: Create Instance
Create new instance of prefered Linux server distribution on EC2.I have used Ubuntu Server 12.04.2 LTS (ami-64084736) and m1.large as instance type.
Step 2: Install prerequisites
To setup the instance for Apache Stratos, have to install following software.
- Java 1.6.x (Oracle JDK/JRE)
- git
- MySQL Server
- zip
- Gitblits (Optional). Follow the steps mentioned below to enable the internal Git repository service
- Download Gitblit GO from http://gitblit.com/. Unzip the Gitblit to the /opt/GitBlit folder
Step 3: Configure Apache Stratos
Create new folders for below purposes.
- Folder to store stratos setup : <setup-path> (/opt/stratos-installer)
- Folder to store the binary distributions : <stratos-pack-path> (/opt/stratos-packs)
- Folder which stratos will be installed : <stratos-path> (/opt/stratos)
Build Apache Stratos from source
$ git clone https://git-wip-us.apache.org/repos/asf/incubator-stratos.git $ git checkout -b 3.0.0-incubating-rc4 3.0.0-incubating-rc4 $ cd incubator-stratos $ mvn clean install
Copy /tools/stratos-installer into <setup-path> folder and update configuration parameters in conf/setup.conf file accordingly. Example is shown below.
# General configuration # ---------------------------------------------------------------------------- export setup_path=/opt/stratos-installer #Folder path containing stratos_setup export stratos_pack_path=/opt/stratos-packs #Folder path containing stratos packages export stratos_path=/opt/stratos #Folder which stratos will be installed export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45 #Java home pathDownload Cloud Controller, Stratos Controller, Elastic Load Balancer, Stratos Agent packages from https://dist.apache.org/repos/dist/dev/incubator/stratos/3.0.0-incubating-rc4/ and copy to a desired location (<stratos-pack-path>)or you can use the packages which you have already built.
Download WSO2 Message Broker binary distribution from http://wso2.com and copy it to <stratos-pack-path>.Make sure to set MB's port offset in repository/conf/carbon.xml to 5. This will set the actual port to 5677
Download MySQL Java connector from http://dev.mysql.com/downloads and copy the jar file to <stratos-pack-path> and update the conf/setup.conf file accordingly.
Update configuration parameters in conf/setup.conf under IaaS Providers section with your own cartridges, refer here for more details on creating cartridge images. I have used the pre-built PHP, MySQL and Tomcat cartridge images publicly available in Asia Pacific (Singapore) Region.
- PHP Cartridge : ami-8a733bd8
- MySQL Cartridge : ami-3e753d6c
- Tomcat Cartridge : ami-6484cc36
Now you have successfully configured the Apache Stratos instance. You can create the snapshot from that instance and share it in a secure manner.
You will be able to use ami-e0b7e2b2 for the demonstration which is available in Asia Pacific (Singapore) Region
I have just launched a fresh instance using apache-stratos-4.0.0-M1 AMI. Is Stratos already installed or I have to install?? If already installed, how can i access it??
ReplyDelete