WSO2 api manager gateway cluster configuration

自作多情 提交于 2019-12-01 07:28:38

问题


While attempting to create a cluster for my API Manager I'm confused on some of the documentation. Here is the architecture: MS SQL Server as the database. Single node VM that runs both the Publisher and the Store. 2 additional nodes that run the gateway and key manager.

The documentation says to install the different components by copying the same install over and over...but that doesn't make sense to me. I want the publisher and store to run together (just like a stand alone), and I want the gateway and key manager to run together (again, like a stand alone), but be clustered for throughput.

When I use this guide: http://docs.wso2.org/display/CLUSTER420/Clustering+API+Manager

It indicates in step 10a-b that we should update: to point to WSO2REG_DB. However, this configuration item doesn't even exist. It also has additional configuration that does exist...

<remoteInstance url="https://publisher.apim-wso2.com">    
<id>gov</id>   <dbConfig>govregistry</dbConfig>   <readOnly>false</readOnly>           
<enableCache>true</enableCache>   <registryRoot>/</registryRoot></remoteInstance>
<mount path="/_system/governance" overwrite="true">   <instanceId>gov</instanceId>
<targetPath>/_system/governance</targetPath></mount> 

and again for the store (except the remoteInstance url is slightly different). Can I simply point the default config for the file registry.xml to point to WSO2REG_DB and leave the remote instance configuration the default stand alone for my publisher/store node?


回答1:


Hi Since you have asked multiple questions in your query ill break it down and answer

1.Node clustering- If you are using API Manager 1.5 or below you can use the same instance and run them as Store/Pub and Gateway/KM node. For the Gateway/KM node you can remove the jaggery files that will remove the UI from the API Manager instance. If you are using API Manager 1.6 then you can start each instance in different profiles. Please refer to the link below http://docs.wso2.org/display/AM160/Running+the+Product+on+a+Preferred+Profile

2 WSO2REG_DB config- please add this config to the registry.xml. Please change the govregistry configuration as mentioned in the document. Have only 1 remote Instance configuration for both publisher and store since they are both in a single instance




回答2:


Seems like you are trying distributed deployment of WSO2 Api Manager.

In the guide you mentioned its using same product binary for all four distributed components, but configuring them to use only required components accessed in each node.

And according to your question you need publisher and store run on one node together, and gateway and key manager to run on another node together. So what you have to do is following the documentation you mentioned carefully by doing both publisher/store changes in one node and both gateway/keymanager changes in other node.

Step 10 a-b points to WSO2REG_DB, which is created in Step 7 d. Before change the deployment, i would suggest to follow the document as it is, because it would help you to understand about the deployment.

You would need to have full configuration in 10 a & b, but since you have only one node, you have to have only one registry.xml with a sample configuration as follows,

<dbConfig name="govregistry">
  <dataSource>jdbc/WSO2REG_DB</dataSource>
</dbConfig>
<remoteInstance url="https://store_publisher.apim-wso2.com"> 
   <id>gov</id>
   <dbConfig>govregistry</dbConfig>
   <readOnly>false</readOnly>
   <enableCache>true</enableCache>
   <registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/governance" overwrite="true">
   <instanceId>gov</instanceId>
   <targetPath>/_system/governance</targetPath>
</mount>

Keep in mind to add the mapping to custom host name 'store_publisher.apim-wso2.com' used above to /etc/hosts file as follows,

xx.xxx.x.206 store_publisher.apim-wso2.com

which also explained in file as explained in 10-c.

Regards, DarRay



来源:https://stackoverflow.com/questions/21173955/wso2-api-manager-gateway-cluster-configuration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!