Sunday, November 24, 2013

WSO2 Deployment synchronization on Windows environment

Deployment synchronization (dep-sync) is a feature that is shipped with most of the WSO2 products. This blog looks at how deployment synchronization can be achieved on carbon instances running on windows environment.

1.      Deployment synchronization requires SVNKit implementation from http://dist.wso2.org/tools/svnClientBundle-1.0.0.jar. This library has to be downloaded separately since it is not shipped with the WSO2 distribution.

2.      Once this SVN kit is downloaded copy the svnClientBundle-1.0.0.jar to {carbon_home}\repository\components\dropins folder on all the instances that artifacts need to be synchronized.

3.      In the Manager node open the {carbon_home}\repository\conf\carbon.xml and enable the dep-sync configuration as given below

     <DeploymentSynchronizer>
        <Enabled>true</Enabled>
        <AutoCommit>true</AutoCommit>
        <AutoCheckout>true</AutoCheckout>
        <RepositoryType>svn</RepositoryType>
        <SvnUrl>SVN URL</SvnUrl>
        <SvnUser>username</SvnUser>
        <SvnPassword>password</SvnPassword>
        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
    </DeploymentSynchronizer>

4.      In the worker nodes use the following configuration to enable dep-sync in the {carbon_home}\repository\conf\carbon.xml file.
     
    <DeploymentSynchronizer>
        <Enabled>true</Enabled>
        <AutoCommit>false</AutoCommit>
        <AutoCheckout>true</AutoCheckout>
        <RepositoryType>svn</RepositoryType>
        <SvnUrl>SVN URL</SvnUrl>
        <SvnUser>username</SvnUser>
        <SvnPassword>password</SvnPassword>
        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
    </DeploymentSynchronizer>

5.      Enable clustering in all instances by setting the clustering value as true in the {carbon_home}\repository\conf\axis2\axis2.xml.
<clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true">

Once the clustering is enabled, set a domain name so that all instances in the cluster will have the same domain name. Domain can be set as shown below.
 <parameter name="domain">wso2.carbon.domain</parameter>

Friday, November 22, 2013

Mounting WSO2 instances on a MS SQL Database which is secured via Windows authentication



A multi instance deployment of WSO2 products would require the registry (config and governance) space to be mounted on an external database.  WSO2 Products can be mounted on many types of databases. Below instructions explain how WSO2 products can be mounted on a MS SQL database that is secured via Windows Authentication.

1. download jTDS from the following link

2. Extract the folder and copy the jtds-1.2.2.Jar file to the {WSO2 Product}/components/lib folder

3. The extracted folder also includes ntlmauth.dll file in the \x64\SSO folder copy the dll file to java bin folder(C:\Program Files\Java\jre7\bin)

4. download and install the jdbc driver for mssql from the following location 

5. Once this is installed set the class path to the following location {JDBC driver Installation Path}\sqljdbc_4.0\enu\auth\x86

6. Make sure that the IP and the port is enabled at the MSSQL side, this can be verified through telnet.

7. Change the datasources.xml to the following configuration (Please change the DB name and the hostname accordingly)

<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
   <name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
   <configuration>
<url>jdbc:jtds:sqlserver://localhost:1433/testDB;integratedSecurity=true;</url>
<driverClassName>net.sourceforge.jtds.jdbc.Driver</driverClassName>
<maxActive>80</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
   </configuration>
</definition>
</datasource>

8. Start the ESB.

Tuesday, July 16, 2013

Why not Open source for Enterprise?


We live in a world that is dominated by information technology, everything we do involve a gadget that runs on a piece of code. The reach of IT has not been restricted only to the developed world but also has taken center stage in many developing countries. It has been equally seen in the enterprise world where more and more firms adopting IT infrastructure to reduce their cost, improve efficiency and to add a greater value to their customers. However every company that ventures into a new system implementation would always question whether the massive cost involved in the system would really result in a greater value addition or a cost saving to the organization. A company may spend millions of dollars on an IT system that may not achieve the outcome they expect, this large capital investment would make it non-feasible for the company to shift to a different vendor or a different solution. On the other hand a firm may be reluctant to spend a large sum of money on a IT system outright and would prefer to pace the investment over number of years of use, due to the scarcity and the opportunity cost of funds that could have been used in investing on the core business activities of the company.

Solution to most of the problems mentioned above is the use of Open source products to solve organization wide IT requirements. Contrary to the general misconception of Open source software offer inferior quality and poor support, you would be surprised to see the actual quality of these products that are on par or exceed the quality of its proprietary counterparts. The support is provided by an active Open source community who is passionate to solve the issue rather than capitalize on earning extra money. Similarly most of the Open source product support provides a greater service compared to most of the support packages offered by many propriety software providers. Most importantly Open source products can be used free of charge. This cuts down the massive expenditure incurred on purchasing very expensive proprietary software. Since the product is free it doesn’t require an organization to lock into one vendor. A company can use a product and if the product doesn’t fit the organization then they can move on to a different product. This may not be possible with a proprietary software as the company will be making a huge capital investment in acquiring the product. Some Open source vendors provide multi version Open source products where a light version (community edition) is offered free and an enterprise standard product is offered for a price. However there are many firms that offer fully enterprise ready solution free and Open source. These companies would offer services such development support and production support on the products developed by them, which would be still cheaper than buying a proprietary product outright. Purchasing a support scheme rather than a whole product doesn’t allow a firm to be lock into one vendor and always allows the flexibility to move to a different vendor if the existing product doesn’t fulfill the requirement of the company. And of course Open source products are open source. This allows the organization to have access to actual code that was written to work on their system. This enables the organization to do custom development work on the product using their own internal development teams, which would not be possible with proprietary closed source software.


So why isn’t Open source commonly used?

The most common reason for this is marketing. Propriety software developers objective is to sell the product, whereas Open source developers focus on making a good product. Propriety Software developers spend large amount of money in marketing and making their product aware to the enterprise stakeholders. On the contrary Open source companies fail to achieve this rather focus on building a good product and let the reputation create the demand for the product.


So next time when you evaluate a software solution to your organization check if an Open source alternative is available, this would allow you to reduce your cost greatly while achieving a high quality flexible solution.

Written by Nadeesha Gamage