Sunday, September 08, 2013

Cluster mode - User Store Management Configuration at Run Time


We can even simply try this out with following simple steps in WSO2 Identity Server.

In the extracted pack go to, 
  • CARBON_HOME/repository/conf/axis2/axis2.xml and enable clustering
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
                enable="true"> 

  • CARBON_HOME/repository/conf/carbon.xml and set-up deployment synchronizer,

 <DeploymentSynchronizer>
        <Enabled>true</Enabled>
        <AutoCommit>true</AutoCommit>
        <AutoCheckout>true</AutoCheckout>
        <RepositoryType>svn</RepositoryType>
        <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl>
        <SvnUser>username</SvnUser>
        <SvnPassword>password</SvnPassword>
        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer>

This is our primary node in the cluster. Now take two copies of this extracted folder and change following in carbon.xml,

<Offset>1</Offset>
<DeploymentSynchronizer>
        <Enabled>true</Enabled>
        <AutoCommit>false</AutoCommit>
        <AutoCheckout>true</AutoCheckout>
        <RepositoryType>svn</RepositoryType>
        <SvnUrl>http://svnrepo.example.com/repos/</SvnUrl>
        <SvnUser>username</SvnUser>
        <SvnPassword>password</SvnPassword>
        <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer>
I changed port offset as I will be running all the server instances in local machine. So port offset is set to 1 in one copy and it is set to 2 in the other copy. Other change is we are only letting the Primary to commit automatically to SVN repo, but not other nodes, hence auto-commit is set to false.

Now let's start all the 3 servers. Once started, follow this post being in Primary node. In a moment we will see the configurations are replicated to other two nodes as well.

Cheers!

2 comments :

  1. This comment has been removed by a blog administrator.

    ReplyDelete

  2. Here's the evidence that shoe donations from TOMS might not be helping toms outlet uk toms outlet uk children in need: an outside research team reported that the shoes weren't making a noticeable difference in kids' lives, according cheap toms shoes to Vox.com. "The bad news is that there is no evidence that the shoes exhibit any kind of life-changing impact, except for potentially making them feel somewhat more reliant on external aid," professor toms sale Bruce Wydick wrote in a blog post this spring, after studying the TOMS shoe donation program in El Salvador.

    ReplyDelete