Versions Compared

Key

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

...

  1. Add the following to the <IOTS_HOME>/conf/ datasources/master-datasources.xml file to configure the Key Manager registry mounting.

    Code Block
    <dbConfig name="mounted_registry">
       <dataSource>jdbc/WSO2REG_DB</dataSource>
    </dbConfig>
     
    <remoteInstance url="https://localhost:9443/registry        <datasource>
                <name>WSO2REG_DB</name>
                <description>The datasource used for registry</description>
                <jndiConfig>
                    <name>jdbc/WSO2REG_DB</name>
                </jndiConfig>
                <definition type="RDBMS">
       <id>instanceid</id>    <dbConfig>mounted_registry</dbConfig>    <readOnly>false</readOnly>    <enableCache>true</enableCache> <configuration>
      <registryRoot>/</registryRoot>    <cacheId>root@jdbc              <url>jdbc:mysql://192.168.57.123:3306/govreg</cacheId>
    </remoteInstance>
     
    <mount path="/_system/config" overwrite="true">
       <instanceId>instanceid</instanceId>
       <targetPath>/_system/config/iot</targetPath>
    </mount>
    <mount path="/_system/governance" overwrite="true">
       <instanceId>instanceid</instanceId>
       <targetPath>/_system/governance</targetPath>
    </mount>{hostname}:{port}/WSO2REG_DB?autoReconnect=true&amp;relaxAutoCommit=true</url>
                        <username>root</username>
                        <password>1234</password>
                        <driverClassName>com.mysql.jdbc.Driver</driverClassName>
                        <maxActive>50</maxActive>
                        <maxWait>60000</maxWait>
                        <testOnBorrow>true</testOnBorrow>
                        <validationQuery>SELECT 1</validationQuery>
                        <validationInterval>30000</validationInterval>
                    </configuration>
                </definition>
            </datasource>
  2. Add the following configurations to the <IOTS_HOME>/conf/registry.xml file to configure the Worker and Manager registry mounting.

    Code Block
    <dbConfig name="mounted_registry">
       <dataSource>jdbc/WSO2REG_DB</dataSource>
    </dbConfig>
    
    <remoteInstance url="https://localhost:9443/registry">
       <id>instanceid</id>
       <dbConfig>mounted_registry</dbConfig>
       <readOnly>false</readOnly>
       <enableCache>true</enableCache>
       <registryRoot>/</registryRoot>
       <cacheId>root@jdbc:mysql://192.168.57.123:3306/govreg</cacheId>
    </remoteInstance>
    
    <mount path="/_system/config" overwrite="true">
       <instanceId>instanceid</instanceId>
       <targetPath>/_system/config/iot</targetPath>
    </mount>
    <mount path="/_system/governance" overwrite="true">
       <instanceId>instanceid</instanceId>
       <targetPath>/_system/governance</targetPath>
    </mount>

...