Versions Compared

Key

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

...

  1. Enable clustering by setting enable to true in the clustering tag.
    <clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
  2. Set the membership scheme to wka to enable the well-known address registration method
    <parameter name="membershipScheme">wka</parameter>
  3. Specify the name of the cluster this node will join
    <parameter name="domain">wso2.ds.domain</parameter>
  4. Specify the IP addresses of your server.

    Localtabgroup
    Localtab
    activetrue
    titleNode 1

    <parameter name="localMemberHost">192.168.48.96</parameter>

    Localtab
    titleNode 2

    <parameter name="localMemberHost">192.168.48.77</parameter>

  5. Specify the port used to communicate cluster messages.

    Localtabgroup
    Localtab
    titleNode 1

    <parameter name="localMemberPort">4100</parameter>

    Localtab
    titleNode 2

    <parameter name="localMemberPort">4200</parameter>

  6. Specify the well known members.

    Localtabgroup
    Localtab
    activetrue
    titleNode 1
    Code Block
    languagexml
    <members>
    	<member>
    		<hostName>192.168.48.77</hostName>
    		<port>4200</port>
    	</member>
    </members>
    Localtab
    titleNode 2
    Code Block
    languagexml
    <members>
    	<member>
    		<hostName>192.168.48.96</hostName>
    		<port>4100</port>
    	</member>
    </members>

...

192.168.48.xx ds.wso2.com

Configuring the designer.json file

Open the <DS_HOME>/repository/deployment/server/jaggeryapps/portal/configs/designer.json configuration file and do the following configurations.

  • Add the hostname of the cluster as indicated in the following configuration snippet in order to render the gadgets in the dashboards. Also, you can access the dashboard using the IP address without any issue with this configuration.

    Code Block
    "host": {
    	"hostname": "ds.wso2.com",
    	"port": "443",
    	"protocol": "https"
    }

Connecting to a Oracle database and mounting the registry

The configurations in this section must be done in both nodes.

Configuring the master-datasources.xml

...

1. Add the data sources for Registry and User databases

...

file

Do the following configurations in the <DS_HOME>/repository/conf/datasources/master-datasources.xml file.

  1. Add the datasources for the registry and the user databases.

    Code Block
    languagexml
    titleUser DB datasource
    <datasource>
    	<name>WSO2_DS_USER_DB</name>

...

  1. 
    	<jndiConfig>
    		<name>jdbc/DS_USER_DB</name>

...

  1. 
    	</jndiConfig>

...

  1. 
    	<definition type="RDBMS">

...

  1. 
    		<configuration>
    			<driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>

...

  1. 
    			<url>jdbc:oracle:thin:@192.168.48.121:1521/

...

  1. pdbora12c</url>

...

  1. 
    			<maxActive>100</maxActive>

...

  1. 
    			<maxWait>60000</maxWait>

...

  1. 
    			<minIdle>5</minIdle>

...

  1. 
    			<testOnBorrow>true</testOnBorrow>

...

  1. 
    			<validationQuery>SELECT 1 FROM DUAL</validationQuery>

...

  1. 
    			<validationInterval>30000</validationInterval>

...

  1. 
    			<username>ds_xxxx</username>

...

  1. 
    			<password>ds_xxxx</password>

...

  1. 
    			<defaultAutoCommit>false</defaultAutoCommit>

...

  1. 
    		</configuration>

...

  1. 
    	</definition>

...

  1. 
    </datasource>

...

 

 

...

  1. Code Block
    languagexml
    titleRegistry DB datasource
    <datasource>
    	<name>WSO2_DS_REGISTRY_DB</name>

...

  1. 
    	<jndiConfig>
    		<name>jdbc/DS_REGISTRY_DB</name>

...

  1. 
    	</jndiConfig>

...

  1. 
    	<definition type="RDBMS">

...

  1. 
    		<configuration>
    			<driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>

...

  1. 
    			<url>jdbc:oracle:thin:@192.168.48.121:1521/

...

  1. pdbora12c</url>

...

  1. 
    			<maxActive>100</maxActive>

...

  1. 
    			<maxWait>60000</maxWait>

...

  1. 
    			<minIdle>5</minIdle>

...

  1. 
    			<testOnBorrow>true</testOnBorrow>

...

  1. 
    			<validationQuery>SELECT 1 FROM DUAL</validationQuery>

...

  1. 
    			<validationInterval>30000</validationInterval>

...

  1. 
    			<username>ds_xxx</username>

...

  1. 
    			<password>ds_xxx</password>

...

  1. 
    			<defaultAutoCommit>false</defaultAutoCommit>

...

  1. 
    		</configuration>

...

  1. 
    	</definition>

...

  1. 
    </datasource>

...



  1. Copy the ojdbc7.jar driver for the database to the <DS_HOME>/repository/components/lib directory.

Configuring the registry.xml

...

file

Open the <DS_HOME>/repository/conf/registry.xml file and do the following configurations.

  • Do the following configurations. These configurations enable you to mount the shared registry on both nodes.

    Code Block
    languagexml
    <dbConfig name="sharedregistry">

...

  • 
    	<dataSource>jdbc/DS_REGISTRY_DB</dataSource>

...

  • 
    </dbConfig>

...

  • 
    
    
    <remoteInstance url="https://localhost:9443/registry">

...

  • 
    	<id>instanceid</id>

...

  • 
    	<dbConfig>sharedregistry</dbConfig>

...

  • 
    	<readOnly>false</readOnly>

...

  • 
    	<enableCache>true</enableCache>

...

  • 
    	<registryRoot>/</registryRoot>

...

  • 
    	<cacheId>ds_long_

...

  • reg@jdbc:oracle:thin:@192.168.48.121:1521/

...

  • pdbora12c</cacheId>

...

  • 
    </remoteInstance>

...

  • 
    
    
    <mount path="/_system/config" overwrite="true">

...

  • 
    	<instanceId>instanceid</instanceId>

...

  • 
    	<targetPath>/_system/config</targetPath>

...

  • 
    </mount>

...

  • 
    
    
    <mount path="/_system/governance" overwrite="true">

...

  • 
    	<instanceId>instanceid</instanceId>

...

  • 
    	<targetPath>/_system/governance</targetPath>

...

  • 
    </mount>

 

Configuring the user-mgt.xml file

Open the <DS_HOME>/repository/conf/user-mgt.xml Configurations1. file and do the following configurations.

  • Point the user store to the new database

...

  • that you create for this purpose.

    Code Block
    languagexml
    <Configuration>

...

  • 
    	<AddAdmin>true</AddAdmin>

...

  • 
    	<AdminRole>admin</AdminRole>

...

  • 
    	<AdminUser>
    		<UserName>admin</UserName>

...

  • 
    		<Password>admin</Password>

...

  • 
    	</AdminUser>

...

  • 
    
    
    	<EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->

...

  • 
    	<Property name="isCascadeDeleteEnabled">true</Property>

...

  • 
    	<Property name="dataSource">jdbc/DS_USER_DB</Property>

...

  • 
    </Configuration>

repository/deployment/server/jaggeryapps/portal/configs/designer.json configuration

Add the hostname of the cluster in the below configurations in order to render the gadgets in the dashboards. Also, you can access the dashboard using the ip address without any issue with this configuration.

"host": {
"hostname": "ds.wso2.com",
"port": "443",
"protocol": "https"
}
} 

Starting the server
If you have configured a different database instead of the default start as follows.
sh wso2server.sh -Dsetup

...