2017-10-18 11 views
0

실행중인 Mesos/Marathon 클러스터가 있지만 실행중인 인스턴스의 IP가 Marathon-UI 또는 traefik 프록시로 전파되지 않습니다.실행중인 인스턴스의 IP가 전파되지 않습니다.

내 메소 설정 :

ExecStart=/bin/bash -c "/usr/sbin/mesos-slave \ 
      --hostname=$(/usr/bin/hostname) \ 
      --work_dir=/var/lib/mesos \ 
      --master=zk://xxx.net:2181,yyy:2181,zzz:2181/mesos \ 
      --log_dir=/var/log/mesos \ 
      --executor_registration_timeout=10mins \ 
      --containerizers=docker,mesos \ 
      --docker=$(which docker) \ 
      --ip=$(ifconfig eth0 | grep -oP 'inet \K\S+')" 

내 treafik의 conf :

logLevel = "INFO" 
[web] 
address = ":8088" 
[marathon] 
endpoint = "http://xxx:8080" 
watch = true 
domain = "xxx" 
exposedByDefault = true 
groupsAsSubDomains = true 
forceTaskHostname = true 

[accessLog] 

enter image description here enter image description here

UPDATE : 응용 프로그램 정의는 다음과 같습니다

{ 
    "id": "/web", 
    "cmd": null, 
    "cpus": 1, 
    "mem": 64, 
    "disk": 0, 
    "instances": 1, 
    "acceptedResourceRoles": [ 
    "*" 
    ], 
    "container": { 
    "type": "DOCKER", 
    "volumes": [], 
    "docker": { 
     "image": "ldaume/caddy", 
     "network": "BRIDGE", 
     "portMappings": [ 
     { 
      "containerPort": 2015, 
      "hostPort": 0, 
      "servicePort": 10001, 
      "protocol": "tcp", 
      "labels": {} 
     } 
     ], 
     "privileged": false, 
     "parameters": [], 
     "forcePullImage": false 
    } 
    }, 
    "portDefinitions": [ 
    { 
     "port": 10001, 
     "protocol": "tcp", 
     "labels": {} 
    } 
    ] 
} 

주어진 포트에서 Marathon DNS를 사용하면 앱에 액세스 할 수 있습니다.

+0

사용중인 마라톤의 버전을 지정하고 소독 된 앱 정의를 추가 할 수 있습니까? 마라톤 팀의 이반 (Ivan)은 "마라톤 1.5.x라면 마라톤이 시대에 뒤떨어지기 때문에 그 해답이 쉽고, 1.5에서 네트워킹과 관련된 몇 가지 변화가 있었기 때문에 아마도 쉽다. 아래 답변을 고려하면 traefik에서는 같지 않을 수 있습니다. –

+0

원인 중 @JudithMalnick. 나는 데비안 스트레치 (9)와 traefik 1.4.1에서 마라톤 1.4.8 (1.5.1 이전)을 사용하여 Mesos 1.4를 사용하고있다. 012 – Lenny

+0

달콤한, 고마워! 애플리케이션 또는 포드 정의를 추가 할 수 있습니까? –

답변

0

나는 당신과 같은 설정을 가지고 있으며, 제보고가 올바르게되어 있습니다. 나는 1.4 traefik를 사용하고있다. Traefik의 구성은 매우 단순하다

################################################################ 
# Global configuration 
################################################################ 

defaultEntryPoints = ["http"] 


################################################################ 
# Web configuration backend 
################################################################ 

[web] 
    address = ":8081" 

################################################################ 
# Marathon configuration backend 
################################################################ 


[marathon] 
    endpoint = "http://172.31.xx.xx:8080" 

    domain = "marathon.localhost" 

    watch = true 

...... 엔드 포인트는 내부 IP VPC 아닌 외부 IP AWS 고정 표시기 인 용기를 사용 AWS 설치 이다.