简体   繁体   English

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

[英]Replicate Secondary user store configuration in WSO2 Identity Server cluster

I have deployed WSO2 IS 5.1 cluster with 2 nodes. 我已经部署了具有2个节点的WSO2 IS 5.1集群。 When I add secondary user store to one of the nodes, the configuration is stored on the filesystem of that node. 当我将辅助用户存储添加到节点之一时,配置存储在该节点的文件系统上。 The other node does not display any details related to the added secondary userstore. 另一个节点不显示与添加的辅助用户存储相关的任何详细信息。 How do I configure such that all filesystem based configuration gets replicated across nodes in the cluster? 如何配置以使所有基于文件系统的配置都可以在群集中的各个节点之间复制?

Do I need to use registry based depSync for this? 我是否需要为此使用基于注册表的depSync? I have tried to setup jdbc based registry for shared config and governance but I still do not see secondary userstore configuration replicating. 我尝试为共享配置和治理设置基于jdbc的注册表,但是仍然看不到辅助用户存储配置复制。

My registry.xml: 我的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>

In carbon.xml of each node: 在每个节点的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>

You need to sync files in the <IS_HOME>/repository/deployment/server/ folder ( <IS_HOME>/repository/tenants/ folder if you are having multiple tenants) in a proper IS cluster. 您需要在适当的IS群集中同步<IS_HOME>/repository/deployment/server/文件夹(如果您有多个租户,则为<IS_HOME>/repository/tenants/文件夹)中的文件。

IS have inbuilt mechanism to do that called deployment synchroniser. IS具有内置的机制来执行称为部署同步器的操作。 You can refer [1] on exact details to set that up. 您可以参考[1]进行详细设置。

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

Regards, 问候,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM