Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ipAddress to support docker network like macvlan #237

Merged
merged 1 commit into from
Jun 29, 2017

Conversation

Willbern
Copy link
Contributor

@Willbern Willbern commented Jun 29, 2017

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
Copy link
Contributor

j1n6 commented Jun 29, 2017

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

@Willbern
Copy link
Contributor Author

@activars ok

@Willbern Willbern force-pushed the will-macvlan branch 2 times, most recently from d859e90 to 022ae5e Compare June 29, 2017 12:22
@Willbern
Copy link
Contributor Author

Willbern commented Jun 29, 2017

@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
Copy link
Contributor

j1n6 commented Jun 29, 2017

Your commit triggers the test automatically.

@Willbern
Copy link
Contributor Author

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

@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

@j1n6
Copy link
Contributor

j1n6 commented Jun 29, 2017 via email

@Willbern
Copy link
Contributor Author

Yeah, the test passed and thanks for your reply.

@j1n6 j1n6 merged commit 31cb7bf into QubitProducts:master Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants