简体   繁体   English

WSo2 AM + DAS + Docker

[英]WSo2 AM + DAS + Docker

I downloaded WS02 and I needed some help in setting up the product in a dockerized env. 我下载了WS02,并且需要一些帮助来在dockerized环境中设置产品。 I downloaded an example of building a WSO2 API-M environment with DAS. 我下载了一个使用DAS构建WSO2 API-M环境的示例。 https://github.com/nuwanbando/wso2-apim-distributed-deployment https://github.com/nuwanbando/wso2-apim-distributed-deployment

I was able to get it working and was also able to view the published statistics using DAS. 我能够使其正常运行,也能够使用DAS查看已发布的统计信息。 But from your example, I want to go one step further and split gateway  gateway manager and gateway- worker. 但是从您的示例来看,我想更进一步,拆分网关网关管理器和网关工作器。 For this I, copied the gateway into a new folder and for each of the startup scripts I added the product profile. 为此,我将网关复制到一个新文件夹中,并为每个启动脚本添加了产品配置文件。 For ex. 对于前。 in the worker folder, I added the startup like the following. 在worker文件夹中,我添加了如下启动文件。 CMD ["sh", "/wso2/wso2am-1.10.0/bin/wso2server.sh", "-Dprofile=gateway-worker", "-DworkerNode=true"]. CMD [“ sh”,“ / wso2 / wso2am-1.10.0 / bin / wso2server.sh”,“-Dprofile = gateway-worker”,“-DworkerNode = true”]。 After this set up, it looks like the stats are not getting published and I do not see any statistics published. 设置完成后,似乎统计数据尚未发布,并且我看不到任何统计数据发布。 I tried to browse the tables in Data Explorer in the DAS UI and it is empty. 我试图在DAS UI中的数据资源管理器中浏览表,但该表为空。 Could you please give me some pointers on what I might be doing wrong? 您能给我一些有关我可能做错了什么的指示吗? I'm attaching my compose. 我附上我的作文。 I'd appreciate the any help. 我将不胜感激。

version: '2' 版本:“ 2”

services: 服务:

dbms:
 container_name: apim_apimrdbms
 build:
    context: .
    dockerfile: database/Dockerfile
 ports:
  - "3306:3306"
 environment:
    MYSQL_ROOT_PASSWORD: root
gateway:
 container_name: apim_gateway
 depends_on:
   - dbms
 build:
  context: .
  dockerfile: gateway/Dockerfile
 ports:
  - "9763:9763"
  - "9443:9443"
  - "8280:8280"
  - "8243:8243"
worker:
 container_name: apim_worker
 depends_on:
   - dbms
 build:
  context: .
  dockerfile: gateway-worker/Dockerfile
 ports:
  - "9763:9763"
  - "9443:9443"
  - "8280:8280"
  - "8243:8243"
km:
 container_name: apim_km
 depends_on:
  - dbms
 build:
  context: .
  dockerfile: keymanager/Dockerfile
 ports:
  - "9764:9763"
  - "9444:9443"
publisher:
 container_name: apim_publisher
 depends_on:
  - dbms
 build:
  context: .
  dockerfile: publisher/Dockerfile
 ports:
  - "9765:9763"
  - "9445:9443"
  - "4000"
store:
 container_name: apim_store
 depends_on:
  - dbms
 build:
  context: .
  dockerfile: store/Dockerfile
 ports:
  - "9766:9763"
  - "9446:9443"
  - "4000"
das:
 container_name: apim_das
 depends_on:
  - dbms
 build:
  context: .
  dockerfile: das/Dockerfile
 ports:
  - "9767:9763"
  - "9447:9443"

It is not straight forward to cluster the GW nodes. 集群GW节点不是直接的。 You need to configure SVN based deployment synchronization for this as well. 您还需要为此配置基于SVN的部署同步。 You can find some APIM deployment patterns with clustered GW nodes from here . 您可以从此处找到一些带有群集GW节点的APIM部署模式。 And you can follow this guide to to cluster API Manager. 并且您可以按照本指南来集群API Manager。 You can refer this to configure statistics 您可以参考配置统计信息

Also You only need to specify following Flag to run as worker node. 另外,您只需要指定以下标志即可作为工作程序节点运行。

-Dprofile=gateway-worker

Try configuring your publisher node and store node to point to the manager and worker node as follows. 尝试配置发布者节点和存储节点,使其指向管理者节点和工作节点,如下所示。

 <APIGateway>
        <ServerURL>https://${gatewaymanager_ip}:${mgt.transport.https.port}${carbon.context}/services/</ServerURL>
        <GatewayEndpoint>http://${gatewayworker}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>                  
 </APIGateway>

ServerURL should point to the manager node whereas the GatewayEndpoint should point to the worker nodes. ServerURL应该指向管理器节点,而GatewayEndpoint应该指向工作器节点。

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

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