stackato harbor 端口服务

 

介绍

最近一直在研究云服务(基于cloudfoundry),啥子doker、riak、redis啊什么的,现在就讲讲harbor端口服务器吧。

        harbor是stackato云平台下的一个服务,研究过后,就把它迁移到公司的云平台上。

 

riak与cloudfoundry架构

 

 

获取harbor服务实例信息

 

当APP与harbor服务器实例绑定时,就可以通过环境变量VCAP_SERVICES获取数据信息:

VCAP_SERVICES={
    "harbor-1.0": [
        {
            "name": "harbor_test", 
            "label": "harbor-1.0", 
            "tags": [
                "harbor", 
                "harbor-1.0", 
                "Persistent external ports service"
            ], 
            "plan": "default", 
            "credentials": {
                "hostname": "10.10.23.52", 
                "host": "10.10.23.52", 
                "port": 36352, 
                "name": "094b2dcf-938e-4d2c-8495-b6f8d05b6f6b", 
                "node_id": "harbor_node_1", 
                "dea_port": 45616, 
                "dea_ip": "10.10.23.15", 
                "container_port": 4000, 
                "int_port": 4000, 
                "protocol": [
                    "tcp"
                ]
            }
        }
    ]
}

 

下面是这些数据的说明,主要是credentials结构:

 

 

This provides the following information:

  • hostname: The internal hostname (if configured) of the node providing the service (i.e. the Harbor node). If none is configured by the admin, this will show the internal IP address.
  • host: The internal IP address of the Harbor node.
  • port: The external port number exposed by the service. Connections from external clients and other internal applications (those not directly bound to the service) will connect with this port number.
  • name: The service instance ID (Stackato internal refer).
  • node_id: The Harbor node ID (Stackato internal).
  • int_port: The port on the application container which forwards to Harbor (see also Harbor Environment Variables). Application(s) bound to the service should connect to this port.

限制

When using harbor's HTTP server, please be warned that the server is not meant to be used under heavy load. Therefore, it should not be exposed to your users/listeners if you expect many of them. In this case, you should use it as a backend/middle-end and have some kind of caching between harbor and the final user. In particular, the harbor server is not meant to server big files because it loads their entire content in memory before sending them. However, the harbor HTTP server is fully equipped to serve any kind of CGI script.

 

参考:

http://docs.stackato.com/user/services/port-service.html

http://savonet.sourceforge.net/doc-svn/harbor_http.html

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值