WSO2 Kuberentes AWS部署

时间:2016-07-21 18:28:52

标签: amazon-web-services amazon-ec2 wso2 kubernetes wso2-am

这是我遇到的问题。 我正在尝试部署开源的WSO2 API Manager。

可在此处找到有关如何执行此操作的文档: https://github.com/wso2/kubernetes-artifacts/tree/master/wso2am

Dockerfiles: https://github.com/wso2/dockerfiles/tree/master/wso2am

我所做的是构建对于kuberenetes所需的docker图像。 我拿这些docker镜像并将它们部署到EC2 Container Service。

我要更新wso2 kuberenetes spec文件(控制器)以使用我推送到EC2 Container Service的图像。

然后我进入kubernetes: kubernetes-artifacts / wso2am并运行" ./ deploy -d"

它运行等待启动脚本,但它只是保持循环,从不"发现"它已经结束了。

root@aw-kubernetes:~/wso2kubernetes/kubernetes-artifacts/wso2am# ./deploy.sh -d
Deploying MySQL Governance DB Service...
service "mysql-govdb" created
Deploying MySQL Governance DB Replication Controller...
replicationcontroller "mysql-govdb" created
Deploying MySQL User DB Service...
service "mysql-userdb" created
Deploying MySQL User DB Replication Controller...
replicationcontroller "mysql-userdb" created
Deploying APIM database Service...
service "mysql-apim-db" created
Deploying APIM database Replication Controller...
replicationcontroller "mysql-apim-db" created
Deploying wso2am api-key-manager Service...
You have exposed your service on an external port on all nodes in your
cluster.  If you want to expose this service to the external internet, you may
need to set up firewall rules for the service port(s) (tcp:32013,tcp:32014,tcp:32015) to serve traffic.

See http://releases.k8s.io/release-1.3/docs/user-guide/services-firewalls.md for more details.
service "wso2am-api-key-manager" created
Deploying wso2am api-store Service...
You have exposed your service on an external port on all nodes in your
cluster.  If you want to expose this service to the external internet, you may
need to set up firewall rules for the service port(s) (tcp:32018,tcp:32019) to serve traffic.

See http://releases.k8s.io/release-1.3/docs/user-guide/services-firewalls.md for more details.
service "wso2am-api-store" created
Deploying wso2am api-publisher Service...
You have exposed your service on an external port on all nodes in your
cluster.  If you want to expose this service to the external internet, you may
need to set up firewall rules for the service port(s) (tcp:32016,tcp:32017) to serve traffic.

See http://releases.k8s.io/release-1.3/docs/user-guide/services-firewalls.md for more details.
service "wso2am-api-publisher" created
Deploying wso2am gateway-manager Service...
You have exposed your service on an external port on all nodes in your
cluster.  If you want to expose this service to the external internet, you may
need to set up firewall rules for the service port(s) (tcp:32005,tcp:32006,tcp:32007,tcp:32008) to serve traffic.

See http://releases.k8s.io/release-1.3/docs/user-guide/services-firewalls.md for more details.
service "wso2am-gateway-manager" created
Deploying wso2am api-key-manager Replication Controller...
replicationcontroller "wso2am-api-key-manager" created
Waiting wso2am to launch on http://172.20.0.30:32013
.......

我试图注释掉" /wait-until-server-starts.sh"脚本,让它只是启动一切。但仍然无法访问API Manager。

由于我完全陷入困境,真的可以对此有所了解。 我已经尝试了我能想到的一切。

如果WSO2团队中的任何人或已经这样做的人都可以提供帮助,那将非常感激。 我现在的理论是,从来没有测试过将其部署到AWS但仅限于本地设置吗?但我可能错了。

非常感谢任何帮助!

编辑: 在kubectl日志中添加一些输出,当它在循环中等待服务器出现时我看到了这些:

root@aw-kubernetes:~# kubectl get pods
NAME                           READY     STATUS    RESTARTS   AGE
mysql-apim-db-b6b0u            1/1       Running   0          11m
mysql-govdb-0b0ud              1/1       Running   0          11m
mysql-userdb-fimc6             1/1       Running   0          11m
wso2am-api-key-manager-0pse8   1/1       Running   0          11m

同时执行kubectl日志显示一切正常:

[2016-07-21 18:46:59,049]  INFO - StartupFinalizerServiceComponent Server           :  WSO2 API Manager-1.10.0
[2016-07-21 18:46:59,049]  INFO - StartupFinalizerServiceComponent WSO2 Carbon started in 34 sec
[2016-07-21 18:46:59,262]  INFO - CarbonUIServiceComponent Mgt Console URL  : https://wso2am-api-key-manager:32014/carbon/
[2016-07-21 18:46:59,262]  INFO - CarbonUIServiceComponent API Publisher Default Context : http://wso2am-api-key-manager:32014/publisher
[2016-07-21 18:46:59,263]  INFO - CarbonUIServiceComponent API Store Default Context : http://wso2am-api-key-manager:32014/store

1 个答案:

答案 0 :(得分:0)

@Alex这是WSO2 Kubernetes Artifacts v1.0.0版本中的一个问题。我们已经在主分支[1]中解决了这个问题。

问题是部署过程试图使用Kubernetes节点的私有IP地址验证WSO2 API-M服务器套接字。我们更新了脚本以使用公共/外部IP地址(如果它们可通过Kubernetes CLI获得)。为此,您可能需要根据[2]在AWS上设置Kubernetes。

[1] https://github.com/wso2/kubernetes-artifacts/commit/53cc6979965ebed8800b803bb3454f3b758b8c05 [2] http://kubernetes.io/docs/getting-started-guides/aws/