Skip to content

Instantly share code, notes, and snippets.

---
layout: documentation
---
# Docker Containerizer
Mesos 0.20.0 adds the support for launching tasks that contains Docker images, with also a subset of Docker options supported while we plan on adding more in the future.
Users can either launch a Docker image as a Task, or as an Executor.
@smothiki
smothiki / Docker.md
Created August 19, 2014 16:22
Docker mesos
layout
documentation

Docker Containerizer

Mesos 0.20.0 adds the support for launching tasks that contains Docker images, with also a subset of Docker options supported while we plan on adding more in the future.

Users can either launch a Docker image as a Task, or as an Executor.

@smothiki
smothiki / kubernetes reuqests
Created September 25, 2014 22:02
Kubernetes requests and replies to commands
go run kubecfg.go -h http://172.17.8.100:8080 list /pods
api version:
v1beta1
url:
http://172.17.8.100:8080/api/v1beta1/
request:
&{GET http://172.17.8.100:8080/api/v1beta1/pods HTTP/1.1 1 1 map[] <nil> 0 [] false 172.17.8.100:8080 map[] map[] <nil> map[] <nil>}
r.verb:
GET
r.finalURL
go run kubecfg.go -h http://172.17.8.100:8080 -c ../../examples/guestbook/redis-master.json create pods
api version:
v1beta1
url:
http://172.17.8.100:8080/api/v1beta1/
request:
&{POST http://172.17.8.100:8080/api/v1beta1/pods HTTP/1.1 1 1 map[] {{"kind":"Pod","id":"redis-master-2","creationTimestamp":null,"apiVersion":"v1beta1","labels":{"name":"redis-master"},"desiredState":{"manifest":{"version":"v1beta1","id":"redis-master-2","volumes":null,"containers":[{"name":"master","image":"dockerfile/redis","ports":[{"hostPort":6379,"containerPort":6379}]}],"restartPolicy":{}}},"currentState":{"manifest":{"version":"","id":"","volumes":null,"containers":null,"restartPolicy":{}}}}} 435 [] false 172.17.8.100:8080 map[] map[] <nil> map[] <nil>}
r.verb:
POST
r.finalURL
sivaram is a full stack engineer who preivously worked at amazon india .
where he focused on high availability of their return center software .
sivaram was so excited about distributed systems he took Masters program in suny ,stony brook university .
Interned at opdemand where is wrote our test suite and worked on update engine( add link to gabes demo at coreos meetup) .
he's currently tackling scheduling containers with kubernetes , mesos , swarm .
he loves american football, cricket , badminton and listening to bollywood music
@smothiki
smothiki / gist:6112d7f29e7eaac670dd
Created February 10, 2015 20:55
docker swarm error
swarm manage -H tcp://172.17.8.100:2375 etcd://172.17.8.100:4001/swarmpath
INFO[0000] Listening for HTTP addr=172.17.8.100:2375 proto=tcp
ERRO[0000] Get http://172.17.8.101:2375/v1.15/info: dial tcp 172.17.8.101:2375: connection refused
ERRO[0000] Get http://172.17.8.102:2375/v1.15/info: dial tcp 172.17.8.102:2375: connection refused
INFO[0000] HTTP request received method=GET uri=/v1.15/info
ERRO[0000] Node 172.17.8.100:2375 is running an unsupported version of Docker Engine. Please upgrade.
INFO[0002] HTTP request received method=GET uri=/v1.15/info
ERRO[0002] Node 172.17.8.100:2375 is running an unsupported version of Docker Engine. Please upgrade.
ERRO[0002] Get http://172.17.8.101:2375/v1.15/info: dial tcp 172.17.8.101:2375: connection refused
ERRO[0002] Get http://172.17.8.102:2375/v1.15/info: dial tcp 172.17.8.102:2375: connection refused
```
swarm --debug manage nodes://172.17.8.100:2375
DEBU[0000] Initializing strategy name=binpacking
DEBU[0000] Initializing filter name=constraint
DEBU[0000] Initializing filter name=affinity
DEBU[0000] Initializing filter name=health
DEBU[0000] Initializing filter name=port
DEBU[0000] Registering HTTP route method=GET route=/containers/{name:.*}/stats
DEBU[0000] Registering HTTP route method=GET route=/info
DEBU[0000] Registering HTTP route method=GET route=/version
@smothiki
smothiki / docker engine port
Created February 12, 2015 17:08
docker open on port 2375
cat /etc/init.d/docker
sudo vi /etc/default/docker
add
DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
sudo service docker restart
docker run myswarm --debug manage nodes://172.17.8.100:2375
time="2015-02-12T20:33:27Z" level=debug msg="Initializing strategy" name=binpacking
time="2015-02-12T20:33:27Z" level=debug msg="Initializing filter" name=constraint
time="2015-02-12T20:33:27Z" level=debug msg="Initializing filter" name=affinity
time="2015-02-12T20:33:27Z" level=debug msg="Initializing filter" name=health
time="2015-02-12T20:33:27Z" level=debug msg="Initializing filter" name=port
time="2015-02-12T20:33:27Z" level=debug msg="Registering HTTP route" method=GET route="/containers/{name:.*}/changes"
time="2015-02-12T20:33:27Z" level=debug msg="Registering HTTP route" method=GET route="/containers/{name:.*}/logs"
time="2015-02-12T20:33:27Z" level=debug msg="Registering HTTP route" method=GET route="/images/search"
time="2015-02-12T20:33:27Z" level=debug msg="Registering HTTP route" method=GET route="/containers/json"
@smothiki
smothiki / gist:ac754bdf81da16c5d3fc
Created March 4, 2015 20:29
Systemd app stoopped
systemctl status appssample_v2.cmd.1.service
● appssample_v2.cmd.1.service - appssample_v2.cmd.1
Loaded: loaded (/run/fleet/units/appssample_v2.cmd.1.service; linked-runtime; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2015-03-04 19:58:46 UTC; 28min ago
Main PID: 10788 (code=killed, signal=TERM)
Mar 04 19:23:15 ip-10-21-2-86.us-west-1.compute.internal sh[10558]: 78d2141f019d: Download complete
Mar 04 19:23:15 ip-10-21-2-86.us-west-1.compute.internal sh[10558]: Status: Downloaded newer image for 10.21.1.140:5000/appssample:v2
Mar 04 19:23:15 ip-10-21-2-86.us-west-1.compute.internal systemd[1]: Started appssample_v2.cmd.1.
Mar 04 19:23:21 ip-10-21-2-86.us-west-1.compute.internal sh[10788]: 10.21.2.85 - - [04/Mar/2015 19:23:21] "GET / HTTP/1.1" 200 -