Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

The contents of this section are still a work in progress as these are being tested and refined currently.

This section describes how to set up a WSO2 Enterprise Store cluster and how to front this cluster with an Nginx load balancer. The following sections give you information and instructions on how to set up your cluster.

...

  1. Make the following configuration changes in the <ES_HOME>/repository/conf/axis2/axis2.xml file. These changes are related to clustering.
    1. Enable clustering for this node by setting enable to true in the clustering tag.
      <clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
    2. Set the membershipScheme parameter to wka to enable the well-known address registration method (this node will send cluster initiation messages to WKA members that we define later).
      <parameter name="membershipScheme">wka</parameter>
    3. Specify the name of the cluster domain that this node is set to join.
      <parameter name="domain">wso2.es.domain</parameter>
    4. Specify the host used to communicate cluster messages. This is the IP address of the publisher node you are configuring.
      <parameter name="localMemberHost">xxx.xxx.xxx.xx3</parameter>
    5. Specify the port used to communicate cluster messages:
      <parameter name="localMemberPort">4251</parameter>
    6. Specify the well known member. Here, the well known member is the other publisher node.

      Code Block
      languagexml
      <members>
      	<member>
      		<hostName>xxx.xxx.xxx.xx4</hostName>
      		<port>4252</port>
      	</member>
      </members>
    7. The subDomain property must be commented out since this setup does not involve setup that supports worker manager separation.

      Code Block
      languagexml
      <parameter name="properties">
      	<property name="backendServerURL" value="https://${hostName}:${httpsPort}/services/"/>
      	<property name="mgtConsoleURL" value="https://${hostName}:${httpsPort}/"/>
      	<!--property name="subDomain" value="mgt"/-->
      </parameter>
  2. Make the following configuration changes change in the <ES_HOME>/repository/conf/carbon.xml file. Configure the HostName for each publisher node.
    <HostName>store.es-wso2.com</HostName>

    Enable SVN-based deployment synchronization with the AutoCommit property marked as true.

    Code Block
    languagexml
    <DeploymentSynchronizer> <Enabled>true</Enabled> <AutoCommit>true</AutoCommit> <AutoCheckout>true</AutoCheckout> <RepositoryType>svn</RepositoryType> <SvnUrl>xxxxxxxxxxxxxxxxx</SvnUrl> <SvnUser>xxxx</SvnUser> <SvnPassword>xxxx</SvnPassword> <SvnUrlAppendTenantId>true</SvnUrlAppendTenantId> </DeploymentSynchronizer>
  3. Modify the <ES_HOME>/repository/conf/securityidentity/sso-idp-config.xml file with the AssertionConsumerService URLs of SSOIdentityProviderConfig as indicated below.

    Code Block
    languagexml
    <Issuer>store</Issuer> 
     
    <AssertionConsumerService>https://store.es-wso2.com/store/acs</AssertionConsumerService>
    <SignResponse>true</SignResponse>
    <CustomLoginPage>/store/login.jag</CustomLoginPage>
    
    
    <AssertionConsumerService>https://publisher.es-wso2.com/publisher/acs</AssertionConsumerService>
    <SignResponse>true</SignResponse>
    <CustomLoginPage>/publisher/controllers/login.jag</CustomLoginPage>
  4. Configure single sign-on with the Identity Server. To do this, modify the <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/config/publisher.json file with the following. You must configure this for all nodes that require single sign-on.

    Code Block
    languagexml
    "authentication":{
    	"activeMethod":"sso",
    	"methods":{
    		"sso":{
    			"attributes":{
    				"issuer":"publisher", 
    				"identityProviderURL":"https://publisher.es-wso2.com/samlsso",
    				"keyStorePassword":"wso2carbon",
    				"identityAlias":"wso2carbon",
    				"responseSigningEnabled":"true",
    				"acs":"%https.host%/publisher/acs",
    				"keyStoreName":"/repository/resources/security/wso2carbon.jks"
    				}
    			},
    		"basic":{
    			"attributes":{
    			}
    		}
    	}
    }
  5. Map the host names to the IP. Add the following host entries to your DNS, or “/etc/hosts” file (in Linux) in all the nodes of the cluster. You have to map the host names with the IP address of the load balancer.
    <IP-of-Nginx> store.es-wso2.com

...