> On Nov. 14, 2016, 4:26 p.m., Abhishek Dasgupta wrote: > > src/cli/execute.cpp, line 342 > > <https://reviews.apache.org/r/53645/diff/2/?file=1561195#file1561195line342> > > > > Should we still continue with our old approach of creating task in > > mesos execute??
You can still continue with the old approach of creating task in `mesos-execute`, e.g., with the flag `--name`, `--command`, `--docker_image`, `--networks`, etc. And beyond that, we provide a new approach to creat task in this patch: you can just specify a json for the task that you want to create with the newly introduced flag `--task`. Please note, these two approaches are exclusive, you can only choose either of them when creating a task with `mesos-execute`. - Qian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53645/#review155798 ----------------------------------------------------------- On Nov. 11, 2016, 11:13 a.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53645/ > ----------------------------------------------------------- > > (Updated Nov. 11, 2016, 11:13 a.m.) > > > Review request for mesos, Avinash sridharan, Jie Yu, and Vinod Kone. > > > Bugs: MESOS-6571 > https://issues.apache.org/jira/browse/MESOS-6571 > > > Repository: mesos > > > Description > ------- > > Added '--task' into mesos-execute. > > > Diffs > ----- > > src/cli/execute.cpp b47c427c5ad29dda1985ee8fef6c4efe054df879 > > Diff: https://reviews.apache.org/r/53645/diff/ > > > Testing > ------- > > On Ubuntu 16.04, manually ran the command below to successfuly launch a > container which will be attached to a CNI network "net1". > ``` > # sudo src/mesos-execute --master=192.168.122.216:5050 > --task=file:///home/stack/workspace/mesos/build/task.json > > # cat /home/stack/workspace/mesos/build/task.json > { > "name": "test", > "task_id": {"value" : "test"}, > "agent_id": {"value" : ""}, > "resources": [ > { > "name": "cpus", > "type": "SCALAR", > "scalar": { > "value": 0.1 > }, > "role": "*" > }, > { > "name": "mem", > "type": "SCALAR", > "scalar": { > "value": 32 > }, > "role": "*" > } > ], > "command": { > "value": "ifconfig" > }, > "container": { > "type": "MESOS", > "mesos": { > "image": { > "type": "DOCKER", > "docker": { > "name": "busybox" > } > } > }, > "network_infos": [ > { > "name": "net1" > } > ] > } > } > ``` > > > Thanks, > > Qian Zhang > >