+ All Categories
Home > Technology > Clocker: Managing Container Networking and Placement

Clocker: Managing Container Networking and Placement

Date post: 07-Jul-2015
Category:
Upload: docker-inc
View: 6,492 times
Download: 0 times
Share this document with a friend
Description:
This talk introduces Clocker and shows how to bootstrap a Docker Cloud that is responsive and scalable, across a dynamic cluster of hosts and cloud providers. Clocker is an Apache licensed open source project that demonstrates intelligent placement, on-demand provisioning and autonomic management of containers using Apache Brooklyn as the central nervous system. The Clocker stack enhances the standard Docker installation using best practices for configuration and integrates Weave networking capabilities plus Apache jclouds for provisioning on any infrastructure. We will show how to use Clocker to deploy, monitor and scale complex applications defined using Brooklyn blueprints across a network of Docker containers in the cloud.
Popular Tags:
50
Clocker The Docker Cloud Maker
Transcript
Page 1: Clocker: Managing Container Networking and Placement

Clocker  The  Docker  Cloud  Maker  

Page 2: Clocker: Managing Container Networking and Placement

Andrew  Kennedy  @grkvlt  

Clocker  The  Docker  Cloud  Maker  

Page 3: Clocker: Managing Container Networking and Placement

@grkvlt  

Introduc/on  •  Andrew  Kennedy  –  So6ware  Engineer  – Open  Source  and  Distributed  Systems  –  github.com/grkvlt  

•  Cloudso6  Corpora/on  – Open  Source  Applica/on  Management  Specialists  – We’re  Hiring…  

Page 4: Clocker: Managing Container Networking and Placement

@grkvlt  

Agenda  •  Overview  •  Components  •  Deep  Dive  •  Demonstra/on  •  Roadmap  

Page 5: Clocker: Managing Container Networking and Placement

Clocker  Overview  

Page 6: Clocker: Managing Container Networking and Placement

@grkvlt  

What  does  it  do?  

1.  Spins  up  and  Manages  Docker  Clouds  

2.  Serves  up  Containers  on  Demand  3.  Manages  Composite  Applica/on  

Deployments  on  Docker  

Page 7: Clocker: Managing Container Networking and Placement

@grkvlt  

What  does  it  provide?  •  Mul/  Host  and  Mul/  Container  Applica/ons  •  Seamless  Networking  – Communica/on  Between  Services  

•  Orchestra/on  and  Clustering  – Control  of  Containers  – Container  Management  

Page 8: Clocker: Managing Container Networking and Placement

@grkvlt  

Who  is  using  it?  •  Tes/ng  and  Proof  of  Concept  Stage  –  Financial  Services  –  Insurance  

•  Produc/on  – Mul/-­‐tenant  Applica/on  Trial  –  Container  per  service  –  Via  IBM  BlueMix  

Page 9: Clocker: Managing Container Networking and Placement

@grkvlt  

Where  can  I  find  it?  •  Open  Source  •  Apache  2.0  Licensed  •  hZp://clocker.io    

•  Status  •  0.7.0  Beta  Release  •  0.8.0-­‐SNAPSHOT  Development  

Page 10: Clocker: Managing Container Networking and Placement

Clocker  Components  

Page 11: Clocker: Managing Container Networking and Placement

@grkvlt  

Clocker  and  Brooklyn  •  What  is  it?  – Brooklyn  Applica/on  – Brooklyn  Loca/on  

•  What  does  it  provide?  – First  Class  Docker  Support  in  Brooklyn  – Op/mized  Brooklyn  Blueprints  for  Docker  

Page 12: Clocker: Managing Container Networking and Placement

Apache  Brooklyn  •  Apache  Brooklyn  – Open  Source  –  Java  – Donated  to  the  Apache  So6ware  Founda/on  – ASF  Incubator  Status  

Page 13: Clocker: Managing Container Networking and Placement

@grkvlt  

Apache  Brooklyn  •  Applica/on  Management  Pla^orm  •  Deploy,  Manage  and  Monitor  Blueprints  •  Provisioning,  Installa/on  and  Customiza/on  •  Management  – AutoScaling,  Resilience,  Performance,  Security  

Page 14: Clocker: Managing Container Networking and Placement

Apache  jclouds  •  Java  Cloud  Library  •  API  Agnos/c  – CloudStack,  OpenStack,  AWS  EC2,  GCE…  

•  Create  Virtual  Machines  – Return  SSH  Endpoint  – Manage  Proper/es  

Page 15: Clocker: Managing Container Networking and Placement

@grkvlt  

Apache  jclouds  •  Drivers  for  REST  APIs  •  Docker  Driver  – WriZen  by  @turlinux  

•  Virtual  Container  – Using  SSH  Daemon  –  Same  Endpoint  Type  as  VM  –  Composi/on  on  any  Image  or  Dockerfile  

Page 16: Clocker: Managing Container Networking and Placement

@grkvlt  

Docker  Networking  101  •  Separate  Container  Network  •  RFC  1918  Private  Addresses  •  Non  Routable  

•  Bridged  to  Host  •  Port  Forwarding  •  Mul/ple  Endpoints  for  Services  

Page 17: Clocker: Managing Container Networking and Placement

Docker  Topology  

Page 18: Clocker: Managing Container Networking and Placement

@grkvlt  

So6ware  Defined  Networking  •  Overlay  Networks  •  Kernel  or  User  Space  •  Many  Op/ons  

–  Pipework  –  SocketPlane  –  Flannel  –  Open  vSwitch  –  Weave  

Page 19: Clocker: Managing Container Networking and Placement

Weave  Topology  

Page 20: Clocker: Managing Container Networking and Placement

@grkvlt  

Weave  •  Ethernet  Switch  –  User  Space  –  Docker  Container  

•  Mesh  Topology  •  Routes  TCP  Traffic  –  Sniffs  on  Host  –  Forwards  over  TCP  

Page 21: Clocker: Managing Container Networking and Placement

Weave  

Page 22: Clocker: Managing Container Networking and Placement

Clocker  Deep  Dive  

Page 23: Clocker: Managing Container Networking and Placement

Clocker  Architecture  

Page 24: Clocker: Managing Container Networking and Placement

Clocker  Architecture  

Page 25: Clocker: Managing Container Networking and Placement

@grkvlt  

Clocker  Features  •  Applica/on  Deployment  – Oasis  CAMP  YAML  Blueprint  –  TOSCA  in  Development  –  Same  as  Core  Brooklyn  

•  Mixed  Des/na/ons  –  Some  Virtual  Machines  –  Some  Bare  Metal  –  Some  Containers  

Page 26: Clocker: Managing Container Networking and Placement

@grkvlt  

Clocker  Features  •  Docker  Extensions  –  Container  or  Image  –  Placement  Strategy  – Dockerfiles  

•  Manages  Docker  –  Cloud  Deployment  –  Configura/on  –  Run/me  Control  

Page 27: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Management  •  Sources  –  Docker  Image  Defini/on  –  Docker  Hub  –  Dockerfile  –  Brooklyn  En/ty  Defini/on  

•  Create  Image  Automa/cally  –  Commit  or  Push  for  Reuse  

Page 28: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Management  •  Installa/on  of  Services  – Defined  by  Brooklyn  or  Dockerfile  –  Common  to  all  En/ty  Instances  

•  Commit  Image  – Available  for  next  En/ty  

•  Push  Image  – Available  for  all  Hosts  

Page 29: Clocker: Managing Container Networking and Placement

Container  Management  id:  dockerfile-­‐mysql  name:  "Docker  Hub  MySQL  Application"  origin:  "https://registry.hub.docker.com/_/mysql/"  locations:  -­‐  my-­‐docker-­‐cloud  services:  -­‐  serviceType:  brooklyn.entity.container.docker.application.DockerfileApplication      id:  mysql      name:  "MySQL"      brooklyn.config:          docker.dockerfile.url:              "https://s3-­‐eu-­‐west-­‐1.amazonaws.com/brooklyn-­‐clocker/mysql-­‐5.6.tgz"          docker.container.environment:              MYSQL_ROOT_PASSWORD:  "s3cr3t”  

 

Page 30: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Placement  •  Demand  

–  Adding  an  Applica/on  –  Scaling  exis/ng  Applica/on  

•  Requirements  –  Host  Loca/on  –  Service  Resources  –  CPU,  Memory    

Page 31: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Placement  •  Supply  – Choose  a  Host  from  available  – Create  new  Host  

•  Start  Container  –  Set  CPU  and  Memory  –  AZach  to  Network  

Page 32: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Placement  •  Placement  Strategies  

–  Filter  Hosts  –  Sort  Hosts  

•  Informa/on  from  –  Docker  –  Underlying  Machine  –  Cloud  Environment  –  En/ty  or  Service  

Page 33: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Placement  •  Placement  Strategies  –  Random,  Depth  or  Breadth  First  –  CPU  or  Memory  Usage  – Memory,  CPU  or  Container  Limits  –  Geographic  Constraints  

•  User  Defined  –  Java  Predicate  

Page 34: Clocker: Managing Container Networking and Placement

Placement  Strategy  •  Determinis/c  •  Simple  – Predicate  and  Comparator  

docker.container.strategies:      -­‐  $brooklyn:object:              type:  "brooklyn.location.docker.strategy.MaxContainersPlacementStrategy”              brooklyn.config:                  maxContainers:  16      -­‐  $brooklyn:object:              type:  "brooklyn.location.docker.strategy.CpuUsagePlacementStrategy”              brooklyn.config:                  maxCpu:  0.75  

Page 35: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Provisioning  •  Provisioning  Strategy  – New  Docker  Host  Loca/on  

•  Constraints  – Docker  Infrastructure  Constraints  –  En/ty  or  Applica/on  Constraints  

•  User  Defined  Strategies  •  Intelligent  Container  Orchestra/on  

Page 36: Clocker: Managing Container Networking and Placement

@grkvlt  

Container  Provisioning  •  Headroom  –  Ensure  resources  available  –  Based  on  MaxContainers  strategy  limit  – Or  CPU  and  RAM  alloca/on  

•  Scale  Docker  Host  Cluster  Automa/cally    – Add  new  Docker  hosts  –  Remove  empty  Docker  hosts  

Page 37: Clocker: Managing Container Networking and Placement

@grkvlt  

Networking  •  Shared  Weave  LAN  – Common  to  All  Containers  – Private  (Link  Local)  Addresses  

•  Clocker  Controls  IP  Alloca/on  – Applica/ons  Segmented  by  CIDR  

•  Docker  Port  Forwarding  Access  

Page 38: Clocker: Managing Container Networking and Placement

@grkvlt  

Networking  •  Work  in  Progress  •  Name  Resolu/on  – BIND  and  DNSmasq  or  Weave  DNS  – Needed  for  JMX  et  al  – Enables  Many  More  En//es  

•  Adding  More  Supported  Blueprints  

Page 39: Clocker: Managing Container Networking and Placement

Demonstra>on  

Page 40: Clocker: Managing Container Networking and Placement
Page 41: Clocker: Managing Container Networking and Placement
Page 42: Clocker: Managing Container Networking and Placement
Page 43: Clocker: Managing Container Networking and Placement

@grkvlt  

Roadmap  •  Latest  Docker  Feature  Support  •  Swarm  

–  Same  API  –  Can  re-­‐use  our  jclouds  Driver  

•  Machine  –  Cloud  agnos/c  provisioning  via  jclouds  already  –  Could  support  as  an  op/on  

Page 44: Clocker: Managing Container Networking and Placement

@grkvlt  

Roadmap  •  Networking  – DNS  and  DNSmasq  Integra/on  – Rancher  Integra/on  – Open  vSwitch  Integra/on  

•  Gelng  Started  – Clocker  Dockerfile  

Page 45: Clocker: Managing Container Networking and Placement

@grkvlt  

Roadmap  •  Repositories  –  Docker  Repository  –  Bintray,  Ar/factory,  Quay.io  –  Private  Repositories  

•  Applica/on  Defini/on  –  TOSCA  –  Fig  

Page 46: Clocker: Managing Container Networking and Placement

@grkvlt  

Roadmap  •  Plugin  API  may  be  helpful?  •  Provide  services  to  Docker  this  way  •  Orchestra/on  •  Policies  

•  Consume  wider  range  of  services  •  Networking  

Page 47: Clocker: Managing Container Networking and Placement

@grkvlt  

Summary  •  Clocker  –  Brooklyn  +  jclouds  +  Docker  +  Weave  +  …  – @clockercentral  

•  Solves  –  Composite  Applica/on  Management  – Docker  Cloud  Networking  –  Container  Placement  and  Provisioning  

Page 48: Clocker: Managing Container Networking and Placement

@grkvlt  

Audience  Ques/ons?  1.  What  networking  features  would  

make  Docker  easier  to  use?  2.  What  other  features  would  be  most  

useful  to  enhance  Docker  usability?  3.  Will  you  be  tes/ng  Swarm  and  

Machine  or  would  you  prefer  an  external  orchestra/on  tool?  

Page 49: Clocker: Managing Container Networking and Placement

@grkvlt  

Web  Resources  http://clocker.io/  http://brooklyn.io/  http://docker.io/  http://github.com/zettio/weave/  http://abstractvisitorpattern.co.uk/  https://speakerdeck.com/grkvlt/clocker-­‐the-­‐docker-­‐cloud-­‐maker    

Page 50: Clocker: Managing Container Networking and Placement

50!

Thanks!  Ques>ons?  


Recommended