在WSO2 Identity Server群集中复制辅助用户存储配置

时间:2016-04-08 01:46:40

标签: wso2 wso2is

我已经部署了具有2个节点的WSO2 IS 5.1集群。当我将辅助用户存储添加到其中一个节点时,配置存储在该节点的文件系统上。另一个节点不显示与添加的辅助用户存储相关的任何详细信息。如何配置以使所有基于文件系统的配置在群集中的节点之间进行复制?

我是否需要使用基于注册表的depSync?我曾尝试为共享配置和治理设置基于jdbc的注册表,但我仍然没有看到辅助用户配置复制。

我的registry.xml:

<wso2registry>
<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>

<dbConfig name="wso2registry">
    <dataSource>jdbc/WSO2LocalRegistry</dataSource>
</dbConfig>

<dbConfig name="sharedregistry">
    <dataSource>jdbc/WSO2RegistryDB</dataSource>
</dbConfig>

   <handler class="org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyHandler">
       <filter class="org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyMediaTypeMatcher">
           <property name="mediaType">application/xacml-policy+xml</property>
       </filter>
   </handler>

<remoteInstance url="https://localhost:9443/registry">
    <id>instanceid</id>
    <dbConfig>sharedregistry</dbConfig>
    <readOnly>false</readOnly>
    <enableCache>true</enableCache>
    <registryRoot>/</registryRoot>
</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>

<versionResourcesOnChange>false</versionResourcesOnChange>

<staticConfiguration>
    <versioningProperties>true</versioningProperties>
    <versioningComments>true</versioningComments>
    <versioningTags>true</versioningTags>
    <versioningRatings>true</versioningRatings>
</staticConfiguration>
</wso2registry>

在每个节点的carbon.xml中:

<!-- Deployment Synchronizer Configuration. Uncomment the following section when running with "registry based" dep sync.
    In master nodes you need to set both AutoCommit and AutoCheckout to true
    and in  worker nodes set only AutoCheckout to true.
-->
<DeploymentSynchronizer>
    <Enabled>true</Enabled>
    <AutoCommit>true</AutoCommit>
    <AutoCheckout>true</AutoCheckout>
</DeploymentSynchronizer>

1 个答案:

答案 0 :(得分:0)

您需要在适当的IS群集中同步<IS_HOME>/repository/deployment/server/文件夹(<IS_HOME>/repository/tenants/文件夹中的文件,如果您有多个租户)。

IS具有内置机制来执行称为部署同步的操作。您可以参考[1]确切的细节进行设置。

[1] https://docs.wso2.com/display/Cluster/SVN-based+Deployment+Synchronizer

此致