[
https://issues.apache.org/jira/browse/MESOS-5148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
wangqun updated MESOS-5148:
---------------------------
Comment: was deleted
(was: @haosdent Can you tell how can I check the container' status? Thanks for
help me.)
> Supporting Container Images in Mesos Containerizer doesn't work by using
> marathon api
> -------------------------------------------------------------------------------------
>
> Key: MESOS-5148
> URL: https://issues.apache.org/jira/browse/MESOS-5148
> Project: Mesos
> Issue Type: Bug
> Reporter: wangqun
>
> Hi
> I use the marathon api to create tasks to test Supporting Container
> Images in Mesos Containerizer .
> My steps is the following:
> 1) to run the process in master node.
> sudo /usr/sbin/mesos-master --zk=zk://10.0.0.4:2181/mesos --port=5050
> --log_dir=/var/log/mesos --cluster=mesosbay --hostname=10.0.0.4 --ip=10.0.0.4
> --quorum=1 --work_dir=/var/lib/mesos
> 2) to run the process in slave node.
> sudo /usr/sbin/mesos-slave --master=zk://10.0.0.4:2181/mesos
> --log_dir=/var/log/mesos --containerizers=docker,mesos
> --executor_registration_timeout=5mins --hostname=10.0.0.5 --ip=10.0.0.5
> --isolation=docker/runtime,filesystem/linux --work_dir=/tmp/mesos/slave
> --image_providers=docker --executor_environment_variables="{}"
> 3) to create one json file to specify the container to be managed by mesos.
> sudo touch mesos.json
> sudo vim mesos.json
> {
> "container": {
> "type": "MESOS",
> "mesos": {
> "image": "library/redis"
> }
> },
> "id": "ubuntumesos",
> "instances": 1,
> "cpus": 0.5,
> "mem": 512,
> "uris": [],
> "cmd": "ping 8.8.8.8"
> }
> 4)sudo curl -X POST -H "Content-Type: application/json"
> localhost:8080/v2/apps [email protected]
> 5)sudo curl http://localhost:8080/v2/tasks
> {"tasks":[{"id":"ubuntumesos.fc1879be-fc9f-11e5-81e0-024294de4967","host":"10.0.0.5","ipAddresses":[],"ports":[31597],"startedAt":"2016-04-07T09:06:24.900Z","stagedAt":"2016-04-07T09:06:16.611Z","version":"2016-04-07T09:06:14.354Z","slaveId":"058fb5a7-9273-4bfa-83bb-8cb091621e19-S1","appId":"/ubuntumesos","servicePorts":[10000]}]}
> 6) sudo docker run -ti --net=host redis redis-cli
> Could not connect to Redis at 127.0.0.1:6379: Connection refused
> not connected>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)