微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

马拉松式获取appId:指定路径

如何解决马拉松式获取appId:指定路径

我正在上部署Mesos Marathon集群!主服务器和2个从服务器。我用负载均衡器设置了一切正常,但是在设置了一切之后,我从马拉松中得到了这个错误。我正在尝试部署数据库名称TiDB

这是我要部署(组)的Marathon JSON文件

[
{
    "acceptedResourceRoles": [],"container": {
        "docker": {
            "forcePullImage": true,"image": "grafana/grafana:6.0.1","network": "BRIDGE","parameters": [
                {
                    "key": "user","value": "0"
                }
            ],"portMappings": [
                {
                    "containerPort": 3000,"hostPort": 3000,"protocol": "tcp"
                }
            ]
        },"type": "DOCKER","volumes": [
            {
                "containerPath": "/etc/grafana","hostPath": "./config/grafana","mode": "RW"
            },{
                "containerPath": "/tmp/dashboards","hostPath": "./config/dashboards",{
                "containerPath": "/var/lib/grafana","hostPath": "./data/grafana","mode": "RW"
            }
        ]
    },"cpus": 1.0,"env": {
        "GF_LOG_LEVEL": "error","GF_PATHS_CONfig": "/etc/grafana/grafana.ini","GF_PATHS_PROVISIONING": "/etc/grafana/provisioning"
    },"fetch": [],"healthChecks": [
        {
            "gracePeriodSeconds": 300,"intervalSeconds": 60,"maxConsecutiveFailures": 3,"path": "/","portIndex": 0,"protocol": "HTTP","timeoutSeconds": 20
        }
    ],"id": "grafana","instances": 1,"mem": 128,"requirePorts": true
},{
    "acceptedResourceRoles": [],"args": [
        "--name=pd0","--client-urls=http://0.0.0.0:2379","--peer-urls=http://0.0.0.0:2380","--advertise-client-urls=http://pd0:2379","--advertise-peer-urls=http://pd0:2380","--initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380","--data-dir=/data/pd0","--config=/pd.toml","--log-file=/logs/pd0.log"
    ],"image": "pingcap/pd:latest","portMappings": [
                {
                    "containerPort": 2379,"hostPort": 0,"volumes": [
            {
                "containerPath": "/pd.toml","hostPath": "./config/pd.toml","mode": "RO"
            },{
                "containerPath": "/data","hostPath": "./data",{
                "containerPath": "/logs","hostPath": "./logs","id": "pd0","requirePorts": false
},"args": [
        "--name=pd1","--advertise-client-urls=http://pd1:2379","--advertise-peer-urls=http://pd1:2380","--data-dir=/data/pd1","--log-file=/logs/pd1.log"
    ],"id": "pd1","args": [
        "--name=pd2","--advertise-client-urls=http://pd2:2379","--advertise-peer-urls=http://pd2:2380","--data-dir=/data/pd2","--log-file=/logs/pd2.log"
    ],"id": "pd2","args": [
        "--log.level=error","--storage.tsdb.path=/data/prometheus","--config.file=/etc/prometheus/prometheus.yml"
    ],"image": "prom/prometheus:v2.2.1","value": "root"
                }
            ],"portMappings": [
                {
                    "containerPort": 9090,"hostPort": 9090,"volumes": [
            {
                "containerPath": "/etc/prometheus/prometheus.yml","hostPath": "./config/prometheus.yml",{
                "containerPath": "/etc/prometheus/pd.rules.yml","hostPath": "./config/pd.rules.yml",{
                "containerPath": "/etc/prometheus/tikv.rules.yml","hostPath": "./config/tikv.rules.yml",{
                "containerPath": "/etc/prometheus/tidb.rules.yml","hostPath": "./config/tidb.rules.yml","id": "prometheus","args": [
        "--log.level=error"
    ],"image": "prom/pushgateway:v0.3.1","network": "BRIDGE"
        },"type": "DOCKER"
    },"id": "pushgateway","mem": 128
},"args": [
        "--store=tikv","--path=pd0:2379,pd1:2379,pd2:2379","--config=/tidb.toml","--log-file=/logs/tidb.log","--advertise-address=tidb"
    ],"image": "pingcap/tidb:latest","portMappings": [
                {
                    "containerPort": 4000,"hostPort": 4000,"protocol": "tcp"
                },{
                    "containerPort": 10080,"hostPort": 10080,"volumes": [
            {
                "containerPath": "/tidb.toml","hostPath": "./config/tidb.toml","id": "tidb","image": "pingcap/tidb-vision:latest","portMappings": [
                {
                    "containerPort": 8010,"hostPort": 8010,"env": {
        "PD_ENDPOINT": "pd0:2379"
    },"id": "tidb-vision","args": [
        "--addr=0.0.0.0:20160","--advertise-addr=tikv0:20160","--data-dir=/data/tikv0","--pd=pd0:2379,"--config=/tikv.toml","--log-file=/logs/tikv0.log"
    ],"image": "pingcap/tikv:latest","volumes": [
            {
                "containerPath": "/tikv.toml","hostPath": "./config/tikv.toml","id": "tikv0","--advertise-addr=tikv1:20160","--data-dir=/data/tikv1","--log-file=/logs/tikv1.log"
    ],"id": "tikv1","--advertise-addr=tikv2:20160","--data-dir=/data/tikv2","--log-file=/logs/tikv2.log"
    ],"id": "tikv2","args": [
        "/opt/spark/sbin/start-master.sh"
    ],"image": "pingcap/tispark:latest","portMappings": [
                {
                    "containerPort": 7077,"hostPort": 7077,{
                    "containerPort": 8080,"hostPort": 8080,"volumes": [
            {
                "containerPath": "/opt/spark/conf/spark-defaults.conf","hostPath": "./config/spark-defaults.conf","mode": "RO"
            }
        ]
    },"env": {
        "SPARK_MASTER_PORT": "7077","SPARK_MASTER_WEBUI_PORT": "8080"
    },"id": "tispark-master","args": [
        "/opt/spark/sbin/start-slave.sh","spark://tispark-master:7077"
    ],"portMappings": [
                {
                    "containerPort": 38081,"hostPort": 38081,"env": {
        "SPARK_WORKER_WEBUI_PORT": "38081"
    },"id": "tispark-slave0","requirePorts": true
}

]

我将通过以下方式进行部署:

curl -X POST http:// :8080 / v2 / groups -d@/root/cluster.json -H“ Content-type:application / json”

但是我得到了appId:指定路径 我的错误在哪里????

解决方法

您好像错过了 groupID。您发布的部分只是组定义的一部分,应该放在 apps 请求中的 groups 对象

{
  "id": "/","apps": [...]
}

https://mesosphere.github.io/marathon/api-console/index.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。