π₯Dockerπ₯
Swarm on Rackspace
j.mp/boomdocker
mycluster.rackspacecloud.com
mycluster.rackspace.com
Login Please!
Create a cluster!
Swarm
- Many Docker Hosts, one API endpoint
- New primitives (e.g. affinities)
- Scheduling according to resource constraints
Get aΒ Docker environment
Click download
Unzip it *somewhere*
$ ls
lilcloud.zip
$ unzip lilcloud.zip
Archive: lilcloud.zip
creating: 7b0948a3-d660-465a-b32d-5051c25184ba/
inflating: 7b0948a3-d660-465a-b32d-5051c25184ba/ca.pem
inflating: 7b0948a3-d660-465a-b32d-5051c25184ba/README.md
inflating: 7b0948a3-d660-465a-b32d-5051c25184ba/ca-key.pem
inflating: 7b0948a3-d660-465a-b32d-5051c25184ba/docker.env
inflating: 7b0948a3-d660-465a-b32d-5051c25184ba/cert.pem
inflating: 7b0948a3-d660-465a-b32d-5051c25184ba/key.pem
$ mv 7b0948a3-d660-465a-b32d-5051c25184ba lilcloud # name vs UUID
$ cd lilcloud
$ source docker.env
$ docker version
Client version: 1.6.1
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 97cd073
OS/Arch (client): darwin/amd64
Server version: swarm/0.4.0
Server API version: 1.16
Go version (server): go1.4.2
Git commit (server): d647d82
OS/Arch (server): linux/amd64
$ source docker.env
$
$ docker run -d -p 80:8080 --name whoa rackerlabs/whoa
44aff6801d136ae7ba49ad074d94a7ba94740326f8d9099d7830ec8095abdf72
whoa
80
$ docker run -d -p 80:8080 --name whoa rackerlabs/whoa
44aff6801d136ae7ba49ad074d94a7ba94740326f8d9099d7830ec8095abdf72
$ docker port whoa 8080
104.130.0.119:80
$ curl 104.130.0.119:80
π Whoa! π
whoa
80
104.130.0.119
$ docker run -d -p 80:8080 --name whoa rackerlabs/whoa
44aff6801d136ae7ba49ad074d94a7ba94740326f8d9099d7830ec8095abdf72
...
$ # Now for another web head
$ docker run -d -p 80:8080 --name whoa2 rackerlabs/whoa
5e0a9815f9558c7a26a44f3bb214f241a5fbf26e01e008739dff64e39c802fce
$ docker port whoa2 8080
104.130.0.117:80
$ curl 104.130.0.117:80
π Whoa! π
whoa
80
104.130.0.119
104.130.0.117
whoa
80
$ docker ps # Your results will differ ;)
PORTS NAMES
104.130.0.117:80->8080/tcp 7b0948a3-d660-465a-b32d-5051c25184ba-n1/whoa2
104.130.0.119:80->8080/tcp 7b0948a3-d660-465a-b32d-5051c25184ba-n2/whoa
whoa
80
104.130.0.119
104.130.0.117
whoa
80
$ docker info
Containers: 9
Images: 7
Storage Driver:
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 2
7b0948a3-d660-465a-b32d-5051c25184ba-n1: 104.130.0.117:42376
β Containers: 5
β Reserved CPUs: 0 / 12
β Reserved Memory: 0 B / 2.1 GiB
β Labels: executiondriver=native-0.2, kernelversion=3.12.36-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs
7b0948a3-d660-465a-b32d-5051c25184ba-n2: 104.130.0.119:42376
β Containers: 4
β Reserved CPUs: 0 / 12
β Reserved Memory: 0 B / 2.1 GiB
β Labels: executiondriver=native-0.2, kernelversion=3.12.36-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs
Execution Driver:
Kernel Version:
Operating System:
CPUs: 24
Total Memory: 4.2 GiB
Name: 1d724f443821
ID:
Http Proxy:
Https Proxy:
No Proxy:
$ docker info
Containers: 9
Images: 7
Storage Driver:
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 2
7b0948a3-d660-465a-b32d-5051c25184ba-n1: 104.130.0.117:42376
β Containers: 5
β Reserved CPUs: 0 / 12
β Reserved Memory: 0 B / 2.1 GiB
β Labels: executiondriver=native-0.2, kernelversion=3.12.36-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs
7b0948a3-d660-465a-b32d-5051c25184ba-n2: 104.130.0.119:42376
β Containers: 4
β Reserved CPUs: 0 / 12
β Reserved Memory: 0 B / 2.1 GiB
β Labels: executiondriver=native-0.2, kernelversion=3.12.36-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs
Execution Driver:
Kernel Version:
Operating System:
CPUs: 24
Total Memory: 4.2 GiB
Name: 1d724f443821
ID:
Http Proxy:
Https Proxy:
No Proxy:
whoa
104.130.0.117
whoa
104.130.0.119
# of
Containers
Running?
$ docker info
Containers: 9
Images: 7
Storage Driver:
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 2
7b0948a3-d660-465a-b32d-5051c25184ba-n1: 104.130.0.117:42376
β Containers: 5
β Reserved CPUs: 0 / 12
β Reserved Memory: 0 B / 2.1 GiB
β Labels: executiondriver=native-0.2, kernelversion=3.12.36-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs
7b0948a3-d660-465a-b32d-5051c25184ba-n2: 104.130.0.119:42376
β Containers: 4
β Reserved CPUs: 0 / 12
β Reserved Memory: 0 B / 2.1 GiB
β Labels: executiondriver=native-0.2, kernelversion=3.12.36-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs
Execution Driver:
Kernel Version:
Operating System:
CPUs: 24
Total Memory: 4.2 GiB
Name: 1d724f443821
ID:
Http Proxy:
Https Proxy:
No Proxy:
whoa
104.130.0.117
whoa
104.130.0.119
Boom Docker @ PyTexas
By Kyle Kelley
Boom Docker @ PyTexas
- 1,080