Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Amazon Web Services (AWS) is a cloud computing software platform, which users primarily deploy as an infrastructure as a service (IaaS) solution.

Follow the instructions below to install Private PaaS with Amazon EC2, using a virtual machine (VM) setup:

  1. Ensure that all the following prerequisites have been met based on your environment and IaaS.

    1. Install the required applications and set the Maven environment variable.

      For more information on the prerequisites, see Prerequisites .

    2. Download the Private PaaS binary distribution (wso2ppaas-4.1.0-SNAPSHOT.zip) and unzip it.

      This can be done using any of the following methods:

      • Method 1 - Download the Private PaaS binary distribution from Apache Download Mirrors and unzip it. 

      • Methods 2 - Build the Private PaaS source to obtain the binary distribution and unzip it.

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

          git clone https://github.com/wso2/product-private-paas.git <local-folder-name> 

          For example: 

          git clone https://github.com/wso2/product-private-paas.git myLocalRepo
        2. Build Stratos using Maven.

          1. Navigate to the directory that you checked out the Stratos source distribution.

            cd <local-folder-name>

            For example: cd myLocalRepo
             

          2. Use Maven to build the source. 

            mvn clean install

            If you are building the source for the very first time, the building process will take a considerable amount of time. However, when building from source you can avoid running all the unit tests to make this process faster.

            mvn clean install -Dmaven.test.skip=true 
        3. Obtain the Stratos binary distribution wso2ppaas-4.1.0-SNAPSHOT.zip from the <STRATOS_SOURCE_HOME>/products/stratos/modules/distribution/target directory and unzip it.

    3. Start ActiveMQ.

       Click here for instructions
      1. Download and unzip ActiveMQ .

      2. Navigate to the <ACTIVEMQ-HOME>/bin/ directory, which is in the unzipped ActiveMQ distribution.

      3. Run the following command to start ActiveMQ.

        ./activemq start

  2. Setup Puppet Master.
    Puppet is an open source configuration management utility. In Private PaaS, Puppet has been used as the orchestration layer.

    Puppet  is an open source configuration management utility. In Private PaaS, Puppet has been used as the orchestration layer.
    For more informations, see
    Configuring Puppet Master .

  3. Create an EC2 cartridge base image.

     Click here for instructions

    Unable to render {include} The included page could not be found.

  4. Navigate to the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf/mock-iaas.xml file and disable the Mock IaaS. By default, the Mock IaaS will be enabled. 

    <mock-iaas enabled="false">
  5. Navigate to the <wso2ppaas-4.1.0-SNAPSHOT>/repository/deployment/server/webapps directory and delete the mock-iaas.war file. 

    When Private PaaS is run the mock-iaas.war extracts the mock-iaas folder. Therefore if you have run Private PaaS previously, delete the  mock-iaas folder too.

  6. Configure the Cloud Controller.

    Prior to carrying out the following steps, make sure to unzip the Private PaaS binary distribution ( wso2ppaas-4.1.0-SNAPSHOT.zip ). If you are building Private PaaS using the source distribution, the binary distribution is available in the <PRIVATE_PAAS_SOURCE_HOME>/products/ppaas/modules/distribution/target directory.

    Follow the instructions below to update the Cloud Controller (CC) configurations:

    1. Configure the IaaS provider details in the  <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf/cloud-controller.xml file and comment the IaaS provider details that are not being used. 

      • Update the identitycredentialowner-idavailabilityZonesecurityGroupskeyPair name of the Amazon EC2 IaaS provider.

        <cloudController>
           ...
           <iaasProvider type="ec2" name="Amazon EC2">
              <className>org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas</className>
              <provider>aws-ec2</provider>
              <identity svns:secretAlias="cloud.controller.ec2.identity">identity</identity>
              <credential svns:secretAlias="cloud.controller.ec2.credential">credential</credential>
              <property name="jclouds.ec2.ami-query" value="owner-id=owner-id;state=available;image-type=machine"/>
              <property name="availabilityZone" value="ap-southeast-1b"/>
              <property name="securityGroups" value="security-group"/>
              <property name="autoAssignIp" value="true" />
              <property name="keyPair" value="keypair-name"/>
           </iaasProvider>
           ...
        </cloudController>
    2. Update the values of the message-broker-ip and message-broker-port in the mqtttopic.properties file, which is in the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf directory. The default values are message-broker-ip=localhost and message-broker-port= 1883.

      mqtturl=tcp://[MB_IP]:[MB_MQTT_PORT]
      clientID=stratos
      tempfilelocation=/tmp
  7. Update the values of the MB_IP and MB_PORT in the jndi.properties file, which is in the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf directory.

    The values are as follows:

    MB_IP: The IP address used by ActiveMQ.

    MB_PORT: The port used by ActiveMQ. The default value of the  message-broker-port=   61616.
    connectionfactoryName=TopicConnectionFactory
    java.naming.provider.url=tcp://[MB_IP]:[MB_Port]
    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
  8. Update the values of the PUPPET_IP and PUPPET_HOST_NAME in the cartridge-config.properties file, which is in the <wso2ppaas-4.1.0-SNAPSHOT>/repository/conf directory.

    The values are as follows:

    PUPPET_IP: The IP address of the running Puppet instance.

    PUPPET_HOST_NAME :The host name of the running Puppet instance.
    autoscaler.service.url=https://localhost:9443/services/AutoscalerService/
    cloud.controller.service.url=https://localhost:9443/services/CloudControllerService/
    stratos.manager.service.url=https://localhost:9443/services/StratosManagerService/
    puppet.ip=[PUPPET_IP]
    puppet.hostname=[PUPPET_HOST_NAME]
    puppet.dns.available=false
    puppet.environment=stratos 
  9. Update the value of the  MB_IP  in the  JMSOutputAdaptor  file, which is in the  <wso2ppaas-4.1.0-SNAPSHOT>/r epository/deployment/server/outputeventadaptors directory.

    MB_IP: 
              he IP address used by ActiveMQ.
            
    <outputEventAdaptor name="JMSOutputAdaptor" statistics="disable"
      trace="enable" type="jms" xmlns="http://wso2.org/carbon/eventadaptormanager">
      <!--property name="java.naming.provider.url">CEP_HOME/repository/conf/jndi.properties</property-->
      <property name="java.naming.provider.url">tcp://[MB_IP]:61616</property>
      <property name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</property>
      <property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property>
      <property name="transport.jms.DestinationType">topic</property>
    </outputEventAdaptor>
  10. Navigate to the <wso2ppaas-4.1.0-SNAPSHOT>/bin directory, which is in the unzipped Private PaaS distribution.

    cd wso2ppaas-4.1.0-SNAPSHOT/bin/
  11. Start Private PaaS. 

    ./wso2server.sh
  • No labels