【云星数据---mesos实战系列003】:marathon实战005--marathon部署一套pyhton3的web程序

来源:互联网 发布:数据挖掘技术及应用 编辑:程序博客网 时间:2024/05/14 08:08

marathon部署一套pyhton3的web程序

1.要求:

成功部署pyhton3的web程序

2.实现:

cat python3.json{

“id”: “bridged-webapp”,
“cmd”: “python3 -m http.server 8080”,
“cpus”: 0.5,
“mem”: 64.0,
“instances”: 2,
“container”: {
“type”: “DOCKER”,
“docker”: {
“image”: “python:3”,
“network”: “BRIDGE”,
“portMappings”: [
{
“containerPort”: 8080,
“hostPort”: 0,
“servicePort”: 9000,
“protocol”: “tcp”
},
{
“containerPort”: 161,
“hostPort”: 0,
“protocol”: “udp”
}
]
}
},
“healthChecks”: [
{
“protocol”: “HTTP”,
“portIndex”: 0,
“path”: “/”,
“gracePeriodSeconds”: 5,
“intervalSeconds”: 20,
“maxConsecutiveFailures”: 3
}
]
}

3.测试:

    通过marathon提供的端口能访问tomcat默认页面

4.说明:

   1.通过部署Python3的web应用可以为验证marathon+mesos方案在处理Python程序上是靠谱的。   2.为后续异构系统,异构语言的微服务做知识探索!
阅读全文
0 0
原创粉丝点击