结构图
nginx配置
{
"id": "nginx-ceshi",
"container": {
"type": "DOCKER",
"docker": {
"image": "nginx:1.9.14",
"network": "BRIDGE",
"portMappings": [
{ "hostPort": 0, "containerPort": 80,
"servicePort": 80
}
],
"forcePullImage":true
}
},
"instances": 1,
"cpus": 0.1,
"mem": 65,
"healthChecks": [{
"protocol": "HTTP",
"path": "/",
"portIndex": 0,
"timeoutSeconds": 10,
"gracePeriodSeconds": 10,
"intervalSeconds": 2,
"maxConsecutiveFailures": 10
}],
"labels":{
"HAPROXY_GROUP":"internal",
"HAPROXY_0_VHOST":"ceshi.ops.ac.cn"
}
}
curl -H "Host: ceshi.ops.ac.cn" http://192.168.126.17
ELB
我们只需要将ELB指向我们marathon-lb的四层80端口转发就好了。 但是这样有一个小问题,就是我们的container的service port端口就都会是 80, 如此一来,当然也没有啥区别。
还有个问题,就是agent private和agent public啥区别。
我想,如果有ELB,我们全在private就没有问题;
如果我们没有ELB,那么我们我们需要在agent public的机器上部署EIP,DNS解析到两个地址上就好。

3736

被折叠的 条评论
为什么被折叠?



