QubitProducts / bamboo

HAProxy auto configuration and auto service discovery for Mesos Marathon
Apache License 2.0
793 stars 214 forks source link

add ipAddress to support docker network like macvlan #237

Closed Willbern closed 7 years ago

Willbern commented 7 years ago

When craeting an app with with docker macvlan network in marathon,there is two steps we may do bellow: reference: https://docs.docker.com/engine/userguide/networking/get-started-macvlan/

  1. create docker macvlan network

    docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 --ip-range=192.168.1.128/28 -o parent=eth0 -o macvlan_mode=bridge macvlan0
  2. deploy an app with json

    { "id": "macvlan-2048", "cmd": null, "cpus": 0.1, "mem": 128, "disk": 0, "instances": 1, "container": { "docker": { "image": "", "network": "HOST", "parameters": [ { "key": "net", "value": "macvlan0" } ] }, "type": "DOCKER" }, "ipAddress":{ "discovery":{ "ports":[ { "number":80, "name":"http", "protocol":"tcp" } ] } } }

this PR add IpAddress field and update the createApps function to support app with macvlan network

j1n6 commented 7 years ago

Thanks for the PR. @Willbern would you be able to resolve the git conflicts?

Willbern commented 7 years ago

@activars ok

Willbern commented 7 years ago

@activars Thanks for your review. I had resolved the git conflicts and add some unit test, but how to trigger the checks to run again manually?

j1n6 commented 7 years ago

Your commit triggers the test automatically.

Willbern commented 7 years ago

@activars i have update the commit, but it does't run yet

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.6%) to 57.159% when pulling b45d07c752bc91309f86c9d7e49323b83483f8eb on Willbern:will-macvlan into 7e7071d9ea6c0c8837ed73c4525d70190dd769bc on QubitProducts:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.6%) to 57.159% when pulling b45d07c752bc91309f86c9d7e49323b83483f8eb on Willbern:will-macvlan into 7e7071d9ea6c0c8837ed73c4525d70190dd769bc on QubitProducts:master.

j1n6 commented 7 years ago

There might be a test queue, I think it just managed to run and passed the test.

On Jun 29, 2017, at 14:08, Will notifications@github.com wrote:

@activars i have update the commit, but it does't run yet

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Willbern commented 7 years ago

Yeah, the test passed and thanks for your reply.