【发布时间】:2019-03-01 09:08:34
【问题描述】:
我是 DC/OS 的新手,我一直在努力尝试部署 POD。我已经尝试了documentation 中提供的简单示例 但部署仍停留在部署阶段。有很多可用的资源,所以这不是问题。
我有 3 个容器需要存在于虚拟网络中(队列、PDI、API)。我已经包含了以单个容器部署开始的定义文件,一旦成功部署,我将在定义中添加 2 个额外的容器。我一直在看这个example,但没有成功。
我已经通过 Jenkins 一次成功地部署了一个容器。所有 3 个图像都已发布并存在于 docker 注册表 (Jfrog) 中。我已经为其中一个成功的部署提供了我的 marathon.json 示例。我将不胜感激任何可以提供帮助的反馈。该服务卡在部署阶段,因此我无法通过命令行或 UI 深入查看日志。
containers.image = pdi-queue
工件服务器 = repos.pdi.com:5010/pdi-queue
1 容器 POD 定义 -(错误:卡在部署阶段)
{
"id":"/pdi-queue",
"containers":[
{
"name":"simple-docker",
"resources":{
"cpus":1,
"mem":128,
"disk":0,
"gpus":0
},
"image":{
"kind":"DOCKER",
"id":"repos.pdi.com:5010/pdi-queue",
"portMappings":[
{
"hostPort": 0,
"containerPort": 15672,
"protocol": "tcp",
"servicePort": 15672
}
]
},
"endpoints":[
{
"name":"web",
"containerPort":80,
"protocol":[
"http"
]
}
],
"healthCheck":{
"http":{
"endpoint":"web",
"path":"/"
}
}
}
],
"networks":[
{
"mode":"container",
"name":"dcos"
}
]
}
Marathon.json -(无错误:成功部署)
{
"id": "/pdi-queue",
"backoffFactor": 1.15,
"backoffSeconds": 1,
"container": {
"portMappings": [
{"containerPort": 15672, "hostPort": 0, "protocol": "tcp", "servicePort": 15672, "name": "health"},
{"containerPort": 5672, "hostPort": 0, "protocol": "tcp", "servicePort": 5672, "name": "queue"}
],
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "repos.pdi.com:5010/pdi-queue",
"forcePullImage": true,
"privileged": false,
"parameters": []
}
},
"cpus": 0.1,
"disk": 0,
"healthChecks": [
{
"gracePeriodSeconds": 300,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"portIndex": 0,
"timeoutSeconds": 20,
"delaySeconds": 15,
"protocol": "MESOS_HTTP",
"path": "/"
}
],
"instances": 1,
"maxLaunchDelaySeconds": 3600,
"mem": 512,
"gpus": 0,
"networks": [
{
"mode": "container/bridge"
}
],
"requirePorts": false,
"upgradeStrategy": {
"maximumOverCapacity": 1,
"minimumHealthCapacity": 1
},
"killSelection": "YOUNGEST_FIRST",
"unreachableStrategy": {
"inactiveAfterSeconds": 300,
"expungeAfterSeconds": 600
},
"fetch": [],
"constraints": [],
"labels": {
"traefik.frontend.redirect.entryPoint": "https",
"traefik.frontend.redirect.permanent": "true",
"traefik.enable": "true"
}
}
【问题讨论】: