Wednesday, July 4, 2012

jaggeryjs.org/tryitview.jag

Today I am going to introduce http://jaggeryjs.org/tryitview tool.

Tryit tool has always been a part of  WSO2 products. It is a client application which lets you invoke and test a service after providing data to the payload that the tool itself is generating by looking at the service source.

http://jaggeryjs.org/tryitview is available in WSO2 Jaggery Runtime.  It is to test jaggery applications.  You need to simply paste the application source on the editor and invoke using tryit button. The results pane will display the outcome with any available HTML also rendered.

Now that we know what it is, lets have a tour (a technical tour :) )

  • Access tryit tool
    • You can do this by simply hitting  http://jaggeryjs.org/tryitview OR
    • By accessing jaggery run-time server. For this you need to;
      •  download WSO2 Jaggery alpha pack
      •  extract it
      •  run bin/server.sh.  
      •  access http://localhost:9763/tryitview.jag

  •  In the tryit view, paste your code and invoke using the 'tryit' button at the left corner.
  • Sample code segment is here


<%
 print('Hi, 

Jaggery

') var obj = {"name": "Madhuka", "company":"WSO2"}; print(obj); %>
  • In the above you don't have to pass any query params along with your request. But if you do, then you can use "Add Query String' option in the top.


  • Lets try this using following code. 
<% 

 var content = request.getParameter("cont");
 var to = request.getParameter("to");
 var subject = request.getParameter("sub");
 
 var email = require("email");
 //Add valid credentials
 var sender = new email.Sender("smtp.gmail.com", "25", "yumani@wso2.com", "ssfsdfsdfsdfd1");
 
 //Fill the correct information
 sender.from = "yumani@wso2.com";
 sender.to = to;
 sender.cc = to;
 sender.bcc = to;
 sender.subject = subject;
 sender.text = content;
 sender.send();
 
 print("email successfully sent to " + to); 
 %>


  • My query string for the source is - 
  • cont=xwww&to=yumani@wso2.com&sub=test  


    Guess you enjoyed !! You are open to try out various samples we have in  http://jaggeryjs.org/documentation.jag




    Monday, April 2, 2012

    Cheat-sheet : Starting WSO2-AS-4.2.1 with Activemq-5.2.2

    Start Activemq
    1. Download activemq from here

    2. Extract the binary

    3. Start activemq by going to ACTIVE_DIRECTORY_HOME/bin and issuing the command ./activemq console

    Configure WSO2 AppServer
    4. Download WSO2 AppServer from here

    5. Extract the binary

    6. Edit axis2.xml to enable JMS transport.
    1. Open CARBON_HOME/repository/conf/axis2.xml (CABRON_HOME is the location you extracted the AppServer distribution)
    2. Enable JMS transport by uncommenting follwing sections
     
       -
       -
       -
     
    
    AND
     
    

    7. Copy following jars from ACTIVEMQ_HOME/lib to CARBON_HOME/repository/components/lib
    1. activemq-core-5.4.2.jar
    2. geronimo-j2ee-management_1.1_spec-1.0.1.jar
    3. geronimo-jms_1.1_spec-1.1.1.jar
    8. Also copy the same to CARBON_HOME/lib/api

    9. Start the application server by issuing ./wso2server.sh at CARBON_HOME/bin.

    Sunday, April 1, 2012

    Hierarchical service deployment support in WSO2 AS

    Hierarchical service deployment support have been enabled in WSO2 App Server-3.2.0. The advantages of this feature are; Mainly you don't need to stick to a flat structure. This means you can manage different versions of the same service, where if only the business logic of the service is changed you can keep versions. Also it lets you more efficiency in managing your content.

    Following gives lot of useful details;
    - Hierarchical service deployment support implementation
    - Hierarchical service deployment support practical example

    Monday, March 26, 2012

    Came across log4j 1.2.15 dependancy problem

    I was building a web application and in mid the build failed while downloading dependencies to log4j-1.2.15. The solution to overcome this was to exclude these dependencies. Here is how it was done.
    My original pom.xml had this bit;
    
            
                log4j
                log4j
                1.2.15
            
            
                -
                -
                -
            
    
    
    I added this within the dependency tag as exclusions.
    
        
          javax.mail
          mail
        
        
          javax.jms
          jms
        
        
          com.sun.jdmk
          jmxtools
        
        
          com.sun.jmx
          jmxri
        
      
    
    The reason for this problem and the solution was nicely described in here

    Wednesday, February 8, 2012

    Creating a dump and restoring an Oracle database

    These days I am involved in testing a migration tool which demands in testing the application's migration against several databases. In the process it is very useful if a loaded database can be backed-up to restore later.

    This is how you create a database dump of an oracle database and restore it.

    1. First you need to connect to oracle as sysdba, create a user and grant him required privileges. Command line steps for creating a user and granting privileges are as below;
    C:\app\Administrator\OraHome_1\BIN>sqlplus sys as sysdba;
    
    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Jan 10 17:28:47 2012
    
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    
    Enter password:
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> drop user yumani cascade;
    
    User dropped.
    
    SQL> Create user yumani identified by yumani account unlock;
    
    User created.
    
    SQL> grant create session, dba to yumani;
    
    Grant succeeded.
    
    SQL> grant connect to yumani;
    
    Grant succeeded.
    
    SQL> exit
    

    2.  Fill in your database with data.

    3. Next, lets create a database dump.
    $ expdp yumani/yumani schemas=yumani dumpfile=yumani100112_1657.dmp
    
    An oracle dump with the name yumani100112_1657.dmp will be created in the location that you ran the above command.

    4. After backing-up if you need to restore the dump, do as below.
    $ impdp yumani/yumani schemas=yumani dumpfile=YUMANI100112_1640.DMP 

    Tuesday, December 20, 2011

    Adding a human readable media type to G-Reg

    Adding a human readable media type is a new feature that will be available in the latest WSO2 G-Reg 4.1.1 packs.

    The use of this feature comes in when you need to name you media types using something that is more readable than a technical term. For an example say we have media types such as image/x-coreldrawpattern with .pat extension and chemical/x-vamas-iso14976 with .vms extension or
    application/vnd.symbian.install with .sis extension.  It is really hard to remember these names.

    This difficulty can be eliminated using human readable  media types feature.

    Following is how to configure this feature.

    1. Open G-Reg-HOME/repository/conf/mime.types file. This will show you all the supported the mime.types. 
    2. Select a mime type which you need to be mapped to a name of your choice.
    3. Open G-Reg-HOME/repository/conf/mime.mappings file. This is where we are going to add the new name that we are going to use for the given mime type.  The new name you add in this file will map the extension given in the mime.type file.
    4. In mime.mappings file, copy the mime-type wanted to change and tab 5 times and type the custom name. See below for an example: line 20
      #
      # Copyright 2005-2011 WSO2, Inc. (http://wso2.com)
      #
      # Licensed under the Apache License, Version 2.0 (the "License");
      # you may not use this file except in compliance with the License.
      # You may obtain a copy of the License at
      #
      # http://www.apache.org/licenses/LICENSE-2.0
      #
      # Unless required by applicable law or agreed to in writing, software
      # distributed under the License is distributed on an "AS IS" BASIS,
      # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      # See the License for the specific language governing permissions and
      # limitations under the License.
      #
      
      # This file is to define the human readable media type for a mime type. 
      # Eg:- 
      # text/plain                                      txt text
      application/wsdl+xml                                  mywsdl
      
      
    5. Save and close the file.
    6. Restart the server.
    Lets follow these steps to witness the adjustment :)
    1. Login to G-Reg admin console
    2. Navigate to Resource > Browse
    3. Select to add a new resource.
    4. Add a new resource of the type that you adjusted above. When you select the resource you will see the media type that you gave appear in the 'media type' field. (see image below)




    Tuesday, November 29, 2011

    wso2.org article : Connecting WSO2 G-Reg to a secured & confidential external user store

    The previous blog post on 'Connecting WSO2 G-Reg to a secured & confidential external user store' was made an article in wso2.org after elaborating some steps to more detail and also doing a good technical review.

    Its available in here


    Friday, November 18, 2011

    Connecting WSO2 G-Reg to a secured & confidential external user store

    From Carbon 3.2.0 onwards we have an embeded LDAP user store which is accessible via port 10389 in default settings. The server also configurable to use LDAP to connect to an external user store. If we need this user store to be secured and confidential it need to be configured to connect via LDAPS.

    In this post I will be demonstrating how to connect WSO2 G-REg 4.0.0 to an external user store which will be accessed via secured transport (where the tracffic is transmitted via secured transport).

    As pre-requisites we will need WSO2 G-REG 4.0.0 installation which you can download from here. Also we need Apache Directory Server which, we will be using as the LDAP server. You should also have JDK 1.5 or above installed.

    With pre-requisites ready, we simply have to follow the steps given below.

    Step 1:
    Firstly you need to install WSO2 G-Reg 4.0.0 which can be downloaded from here. Extract the .zip file to a location of your preference.

    Step 2:

    As I mentioned earlier also WSO2 G-Reg is already configured with an internal LDAP user store. In order to connect to an external user store we need to disconnet the existing connection. To achieve this we need to uncomment settings from usermgmt.xml and embedded-ldap.xml. These files reside in GREG_HOME/repository/conf folder.

    Lets do these changes like this.
    in usermgt.xml comment the default user store manager configuration which is given like below.

    <UserStoreManager class="org.wso2.carbon.user.core.ldap.ApacheDSUserStoreManager">
                <Property name="ReadOnly">false</Property>
                <Property name="ConnectionURL">ldap://localhost:${Ports.EmbeddedLDAP.LDAPServerPort}</Property>
                <Property name="ConnectionName">uid=admin,ou=system</Property>
                <Property name="ConnectionPassword">admin</Property>
                <Property name="passwordHashMethod">SHA</Property>
                <Property name="UserNameListFilter">(objectClass=person)</Property>
                <Property name="UserEntryObjectClass">wso2Person</Property>
                <Property name="UserSearchBase">ou=Users,dc=wso2,dc=org</Property>
                <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(uid=?))</Property>
                <Property name="UserNameAttribute">uid</Property>
                <Property name="PasswordJavaScriptRegEx">[\\S]{5,30}</Property>
                <Property name="UsernameJavaScriptRegEx">[\\S]{3,30}</Property>
                <Property name="UsernameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;]{3,30}$</Property>
                <Property name="RolenameJavaScriptRegEx">[\\S]{3,30}</Property>
                <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\&lt;&gt;]{3,30}$</Property>
                <Property name="ReadLDAPGroups">true</Property>
                <Property name="WriteLDAPGroups">true</Property>
                <Property name="EmptyRolesAllowed">true</Property>
                <Property name="GroupSearchBase">ou=Groups,dc=wso2,dc=org</Property>
                <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
                <Property name="GroupEntryObjectClass">groupOfNames</Property>
                <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(cn=?))</Property>
                <Property name="GroupNameAttribute">cn</Property>
                <Property name="MembershipAttribute">member</Property>
            </UserStoreManager>


    In embedded-ldap.xml you need to set "enabled" property in "EmbeddedLDAP" to false.
     <Property name="enable">true</Property>


    Step 3:
    Now we need to enable configurations for the externanal LDAP server. But lets wait until we configure our user store as we still don't have those details with us.

    Step 4:
    Now we need to install Apache Directry Studio. You can download the .zip ditribution, unzip and use it. The other choice is to use the binary installer. In my case I used the binary installer. I was taken through an installation wizard which prompted me to set locations for the inatalltion, instances and where to keep the startup, who is the default user etc.


    Step 5:
    Lets enable SSL in ADS. you need to navigate to ADS_INSTANCE_HOME/default/conf/ and open server.xml. Here search for 'tcpTransport address' and check if SSL is enabled. It is enabled by default. If not you need to update with this.
     


    Step 6:
    In this setup I am going to use a signed certificate to use in our LDAPS communitcation. I will be using keytool to generate the required keystore and certificates.

    Since am going have my LDAP server setup with an SSL server certificate, I must obtain a signed certificate for the server. To achieve this I will be using java keytool and create a self signed certificate (a public/private key pair).

     keytool -genkey -alias carbon_server -keyalg RSA -keystore carbon_server.jks -storepass xxxxxx -validity 730
    
    What is your first and last name?   [Unknown]:  Yumani Ranaweera What is the name of your organizational unit?   [Unknown]:  QA What is the name of your organization?   [Unknown]:  WSO2 What is the name of your City or Locality?   [Unknown]:  Colombo What is the name of your State or Province?   [Unknown]:  Western What is the two-letter country code for this unit?   [Unknown]:  SL Is CN=Yumani Ranaweera, OU=QA, O=WSO2, L=Colombo, ST=Western, C=SL correct?   [no]:  yes Enter key password for <carbon_server>     (RETURN if same as keystore password):  Re-enter new password:


    Step 7:
    After this we need to update the LDAP server (apacheDS) configuration to use our keystore files. to do this navigate to ADS_INSTANCE_HOME/default/conf/ and open server.xml. Update "keystoreFile" in following segment;

    <ldapServer id="ldapServer"
                allowAnonymousAccess="false"
                saslHost="ldap.example.com"
                saslPrincipal="ldap/ldap.example.com@EXAMPLE.COM"
                searchBaseDn="ou=users,ou=system"
                maxTimeLimit="15000"
                maxSizeLimit="1000"
                keystoreFile="/home/yumani/software/LDAP/apacheds-1.5.7_new/external_keystore/carbon_server.jks"
                certificatePassword="secret">

    After this restart Apache DS server. In my case will restart it via /etc/init.d (/etc/init.d/ldap restart;)

    After the restart we can verify the connections using an LDAP browser. Lets use ApacheDirectoryStudio-linux-x86_64-1.5.2.v20091211.

    Step 8:
    WSO2 Carbon based products use Java Secure Socket Extension (JSSE) for SSL support. So we need to upgrade JAVA_HOME/jre/lib/security with JSSE provider.

    To ensure G-Reg trusts the certificate used by the LDAP server we must install them in G-REGs trust store. So lets export the certificate using keystore.
    keytool -export -keystore carbon_server.jks -alias carbon_server -file carbon_server.cer
    Enter keystore password: 
    Certificate stored in file <carbon_server.cer>

    Then lets import this certificate to G-Reg's trust store like this:
     keytool -import -file carbon_server.cer -alias carbon_server -keystore /home/yumani/Documents/support/320/JPMDEVSPRT-31/wso2greg-4.0.0/repository/resources/security/client-truststore.jks -storepass wso2carbon
    Owner: CN=yumani, OU=qa, O=wso2, L=col, ST=western, C=sl
    Issuer: CN=yumani, OU=qa, O=wso2, L=col, ST=western, C=sl
    Serial number: 4eba06d3
    Valid from: Wed Nov 09 10:21:31 IST 2011 until: Tue Feb 07 10:21:31 IST 2012
    Certificate fingerprints:
         MD5:  EB:23:58:74:3B:6A:1B:CC:26:D8:84:AE:D3:A5:AC:4D
         SHA1: 7F:73:3C:5B:BA:0B:B8:47:69:1E:12:5C:47:EB:D0:E9:C3:08:2E:AB
         Signature algorithm name: SHA1withRSA
         Version: 3
    Trust this certificate? [no]:  yes
    Certificate was added to keystore


    Step 9:
    Now that we have configured the LDAP server we need to setup and add user entries to the directory server. The guide (http://fusesource.com/docs/broker/5.3/security/LDAP-AddUserEntries.html) will show you how to complete this task.

    Step 10:
    Once the user store is setup we need to configure user manager in WSO2 G-Reg to connnect to it. This is how you do that:
    Enable following block in G-REG_HOME/repository/conf/usermgt.xml.
            <!--UserStoreManager class="org.wso2.carbon.user.core.ldap.ApacheDSUserStoreManager">
                <Property name="ReadOnly">false</Property>
                <Property name="ConnectionURL">ldap://localhost:10389</Property>
                <Property name="ConnectionName">uid=admin,ou=system</Property>
                <Property name="ConnectionPassword">secret</Property>
                <Property name="passwordHashMethod">SHA</Property>
                <Property name="UserNameListFilter">(objectClass=person)</Property>
                <Property name="UserEntryObjectClass">inetOrgPerson</Property>
                <Property name="UserSearchBase">ou=system</Property>
                <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(uid=?))</Property>
                <Property name="UserNameAttribute">uid</Property>
                <Property name="PasswordJavaScriptRegEx">[\\S]{5,30}</Property>
                <Property name="ReadLDAPGroups">true</Property>
                <Property name="WriteLDAPGroups">true</Property>
                <Property name="EmptyRolesAllowed">false</Property>
                <Property name="GroupSearchBase">ou=system</Property>
                <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
                <Property name="GroupEntryObjectClass">groupOfNames</Property>
                <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(cn=?))</Property>
                <Property name="GroupNameAttribute">cn</Property>
                <Property name="MembershipAttribute">member</Property>
            </UserStoreManager-->

    If you had user store configured as [1] you will need to update "UserSearchBase" property to include ou=users as well:
         <Property name="UserSearchBase">ou=users,ou=system</Property>

     
    Final step:
    Alright we have everything set, lets start WSO2 G-Reg server and acces the user store.

    Start carbon server as below;
    wso2server.sh -Djavax.net.ssl.trustStore=/path/to/carbon/repository/resources/security/client-truststore.jks -Djavax.net.ssl.trustStorePassword=wso2carbon

    Access G-Reg admin console from https://localhost:9443/


    Login to the server using admin credentials (admin/admin) as specified in usermgmt.xml

    You may navigate to Configure > Users and Roles > Users and see that the user store is connected!!!

    Tuesday, November 8, 2011

    How to verify your ESB is started with NIO transport or servlet transport

    All WSO2 Carbon products use HTTP Servlet Transport Implementation as default HTTP/HTTPS transport, except for WSO2 ESB.  ESB is shipped with HTTP-NIO Transport Implementation as the default transport.

    To verify this we can check the following configuration in axis2.xml which resides in ESB_HOME/repository/conf. As we already know axis2.xml keeps the global configuration for WSO2  Carbon based products. The <transportReceiver> and <transportSender> elements within it are used to configure the transport receivers and senders of the server.


    If the product is configured to use HTTP-NIO transport implementation the <transportReceiver> and <transportSender> should be set as below.
       <transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
            <parameter name="port" locked="false">8280</parameter>
            <parameter name="non-blocking" locked="false">true</parameter>
            <!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
            <!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
            <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
            <!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
        </transportReceiver>
        <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions -->
        <transportReceiver name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener">
            <parameter name="port" locked="false">8243</parameter>
            <parameter name="non-blocking" locked="false">true</parameter>
            <!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
            <!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
            <!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
            <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
            <parameter name="keystore" locked="false">
                <KeyStore>
                    <Location>repository/resources/security/wso2carbon.jks</Location>
                    <Type>JKS</Type>
                    <Password>wso2carbon</Password>
                    <KeyPassword>wso2carbon</KeyPassword>
                </KeyStore>
            </parameter>
            <parameter name="truststore" locked="false">
                <TrustStore>
                    <Location>repository/resources/security/client-truststore.jks</Location>
                    <Type>JKS</Type>
                    <Password>wso2carbon</Password>
                </TrustStore>
            </parameter>
            <!--<parameter name="SSLVerifyClient">require</parameter>
                supports optional|require or defaults to none -->
        </transportReceiver>
    


     <!-- the non-blocking http transport based on HttpCore + NIO extensions -->
        <transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
            <parameter name="non-blocking" locked="false">true</parameter>
        </transportSender>
        <transportSender name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender">
            <parameter name="non-blocking" locked="false">true</parameter>
            <parameter name="keystore" locked="false">
                <KeyStore>
                    <Location>repository/resources/security/wso2carbon.jks</Location>
                    <Type>JKS</Type>
                    <Password>wso2carbon</Password>
                    <KeyPassword>wso2carbon</KeyPassword>
                </KeyStore>
            </parameter>
            <parameter name="truststore" locked="false">
                <TrustStore>
                    <Location>repository/resources/security/client-truststore.jks</Location>
                    <Type>JKS</Type>
                    <Password>wso2carbon</Password>
                </TrustStore>
            </parameter>
            <parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
                <!--supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
        </transportSender>

    Friday, August 5, 2011

    How to access WSO2 StratosLive.com from a Google Apps account

    This simple step by step guide will show you how to access WSO2 StratosLive.com via a Google Apps Account.

    1. Create a sample Google Apps Account.
      • A sample googleApps account can be created using the following link https://www.google.com/a/cpanel/sample/new.
      • After the account is created, you need to add users by going through 'Administrative Control Panel' > 'Organization & Users' > 'Create a new user'
      • Note: your password for admin login will be sent to the email address that you gave at the creation. Else you can reset admin password while you are creating new users.

    2. Access StratosLive.
      • You may use https://stratoslive.wso2.com/carbon to access StratosLive.
      • In the home page there will be a sign-in button. Click that and you will be redirected to the login prompt for user name\password login and Google Apps login.
      • Click on 'Google Apps' button.

    3. Login to StratosLive via Google Apps.
      • When you click on 'Google Apps' button, it will ask you to enter google app domain name. Give your information here. (e.g. mine is like this yumaniwso2com.sample-ga.com).
      • Remember you don't need to give the user name here. That is; you should NOT give domain name as admin@yumaniwso2com.sample-ga.com. That is not what it asks.
      • Then it will take you to the google apps account where you will be prompt to give your google app's user name and password.
      • Once the credentials are validated you will be taken into StratosLive!!!

    4. Enjoy services at StratosLive with the users of your google apps account.
      • Once in StratosLive; If you go to Configure > Users & Roles in Stratos Manger, you will find all the users in your sample account there.
      • In StratosLive however, this intial usage plan is considered as a 'Demo' version. Therefore it restricts your user count to 1 excluding the admin user.
      • Due to this only you and another one user will be able to login at first.

    5. Upgrade your subscription.
      • To overcome the above limitation, you can upgrade your usage plan easily.
      • Go to 'Configure' > 'Account' > 'Usage Plan Information' and update the usage plan.
      • The information about the level of facilities and related usage charges can be viewed from the 'Pricing Info' link next to the subscription type drop down.

    6. Enjoy StratosLive
      • Once upgraded to a higher usage plan, more than one user from your google apps account will be able to login to StratosLive.com.
      • Now we are fine to explore the services available in StratosLive !!!

    Friday, June 17, 2011

    Setting up WSO2 Stratos in personal machine

    Here are the steps to setup Stratos in your personal machine.

    1. Checkout the stratos setting-up script from here.
         https://svn.wso2.org/repos/wso2/trunk/carbon/build

    2. Copy the wso2straos-manager-1.5.0, wso2stratos-is-1.5.0, wso2stratos-bam-1.5.0 distributions and the binary distributions of the services that you wish to include. i.e. wso2stratos-esb-1.5.0.
    Lets mark this place where you copy these .zip files as PACKS_DIR.

    3. Export following environment variables to your .bashrc
    export PACKS_DIR="/home/yumani/Documents/packs/3.2.0"
    export STRATOS_DIR="/home/yumani/Documents/Stratos/stratos320"
    export STRATOS_VERSION=1.5.0
    export SSO_ENABLED=true
    export CREATE_DB=true
    
    export STRATOS_MAIL_TRANSPORT='&lttransportsender class="org.apache.axis2.transport.mail.MailTransportSender" name="mailto"> &ltparameter name="mail.smtp.host"&gtcheetara.wso2.com</parameter>&ltparameter name="mail.smtp.port"&gt25</parameter> &ltparameter name="mail.smtp.starttls.enable"&gtfalse</parameter> &ltparameter name="mail.smtp.auth"&gtfalse</parameter>  &ltparameter name="mail.smtp.from"&gtcloud-noreply@wso2.com</parameter> </transportsender>'
    export NOTIFICATION_EMAIL=xxxx@wso2.com
    
                                                                                                                                                                                         
    4. Run stratos-setup.pl. (NOTE: Before this you may need to install 'liblist-moreutils-perl' to execute the perl script)

    5. Then update your /etc/hosts file with following;
    127.0.0.1 cloud-test.wso2.com
    127.0.0.1 identity.cloud-test.wso2.com
    127.0.0.1 governance.cloud-test.wso2.com
    127.0.0.1 appserver.cloud-test.wso2.com
    127.0.0.1 bam.cloud-test.wso2.com
    127.0.0.1 dss.cloud-test.wso2.com
    127.0.0.1 bps.cloud-test.wso2.com
    127.0.0.1 brs.cloud-test.wso2.com
    127.0.0.1 cep.cloud-test.wso2.com
    127.0.0.1 esb.cloud-test.wso2.com
    127.0.0.1 gadget.cloud-test.wso2.com
    127.0.0.1 mb.cloud-test.wso2.com
    127.0.0.1 mashup.cloud-test.wso2.com
    

    6. After this you can start the servers. You will find that the setting-up script has unzipped all the binary distributions (you copied to PACKS_DIR) into the STRATOS_DIR location which, you specified in .bachrc.

    7. Go to above CARBON_HOME.  You have two ways to start the cloud environment.
     i. Running the stratos.sh in STRAROS_DIR. Using stratos.sh you can start all the services and the manager at once or a selected set of services and the manager.
        i.e.
    sh stratos.sh startall
    sh stratos.sh wso2stratos-manager-1.5.0 wso2stratos-is-1.5.0 wso2stratos-bam-1.5.0

    ii. Starting each service using its own startup scripts (CARBON_HOME/bin/wso2server.sh). This way you can first start the manager following wso2stratos-is and wsorstratos-bam. Then the other services as you wish.

    That's all.. Now you can access wso2stratos-manager from browser and start using the cloud environment. URL for the stratos-manager can be gained from its startup logs which are printed on the back-end console.





    Featured

    Selenium - Page Object Model and Action Methods

      How we change this code to PageObjectModel and action classes. 1 2 3 driver . findElement ( By . id ( "userEmail" )). sendKeys (...

    Popular Posts