Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)

2,257 views

Published on

Published in: Software, Technology
0 Comments
9 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,257
On SlideShare
0
From Embeds
0
Number of Embeds
36
Actions
Shares
0
Downloads
96
Comments
0
Likes
9
Embeds 0
No embeds

No notes for slide

Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)

  1. 1. Docker & April 23rd, 2014
  2. 2. Better!
 Faster!
 Stronger! Better!
 Faster!
 Stronger!
  3. 3. What? Compute
  4. 4. Why Docker?! (an incomplete list) • Compatibility with Docker images (if standardizing or desiring cross-cloud compat.) • Dockerfiles provide flexible, repeatable image building • Global, multi-cloud image registry • Layered images / builds • Completeness of vision
  5. 5. Five major use cases • Alternative form of virtualization for multi-tenant services! • Continuous Integration/Continuous Delivery:! • Go from developer’s laptop, through automated test, to production, and through scaling without modification! • Scale-out/Big Data:! • Rapidly scale same application across hundreds or thousands of servers…and scale down as rapidly! • Cross Cloud Deployment! • Move the same application across multiple clouds (public, private, or hybrid) without modification or noticeable delay! • Granular, Loose Security Isolation:! • Docker simplifies the separation of security concerns. Multiple processes of the same “application” may run on a host, linked together, sharing resources but within separate security contexts (SeLinux labels, Linux capabilities, Cgroups, etc)
  6. 6. Closer to the Docker workflow Hybrid-cloud compatible Scheduled by backing cloud Integration with other services Nova features (quota, auth, etc…) Abstraction layer for other hypervisors Integrated scheduling Heat vs Nova! Comparison
  7. 7. Compute Integration Docker plugin for Nova
  8. 8. What? Enables control of Docker via OpenStack: • Nova API • Horizon UI Supports: • launch • terminate • reboot • serial console • snapshot • glance • Neutron! https://wiki.openstack.org/wiki/ HypervisorSupportMatrix
  9. 9. Not supported.! (yet) Cinder Volumes Suspend/resume Pause/unpause (patches welcome!)
  10. 10. Image Management docker-registry is a proxy ! users can upload through docker- registry or to glance directly ! docker pulls images through the docker-registry proxy
  11. 11. Nova+Docker! Architecture Overview
  12. 12. Testing
  13. 13. Using Docker with the OpenStack Compute plugin
  14. 14. Install the plugin mkdir git-co; cd git-co! git clone https://github.com/stackforge/nova-docker! cd nova-driver! make install
  15. 15. Configure Nova Set in nova.conf:! compute_driver=novadocker.virt.docker.DockerDriver!
  16. 16. Run a registry docker run -d -p ${DOCKER_REGISTRY_PORT}:5000 
 -e SETTINGS_FLAVOR=openstack 
 -e OS_USERNAME=${OS_USERNAME} 
 -e OS_PASSWORD=${OS_PASSWORD} 
 -e OS_TENANT_NAME=${OS_TENANT_NAME} 
 -e OS_GLANCE_URL="${SERVICE_PROTOCOL}://${GLANCE_HOSTPORT}" 
 -e OS_AUTH_URL=${OS_AUTH_URL} 
 registry ./docker-registry/run.sh
  17. 17. docker pull cirros! docker tag cirros 10.0.0.1:5000/cirros! docker push 10.0.0.1:5000/cirros” Putting an image into your repository
  18. 18. ‘nova boot’
  19. 19. dockenstacka solution for OpenStack development & testing
  20. 20. Host VM Linux VM Vagrant (or other VM devstack environment)
  21. 21. ! nested
  22. 22. Where container == host; for all practical purposes Host VM Linux VM Host Container Linux VM Vagrant (or other VM devstack environment) Dockenstack
  23. 23. Project SOLUM “Convert code into a managed application running on an OpenStack cloud at the push of a button.” FROM CODE TO MANAGED APP
  24. 24. Docker Docker Key element of the Solum data plane
  25. 25. Applying Heat Orchestration for Docker API
  26. 26. Installing the plugin git clone https://github.com/openstack/heat
 
 ln -sf $PWD/heat/heat/contrib/docker/plugin; 
 /usr/lib/heat/docker! echo “plugin_dirs=$PWD/heat/heat/contrib/docker/ plugin” >> /etc/heat/heat.conf
  27. 27. Heat Resource DockerInc::Docker ::Container
  28. 28. Heat Workflow Heat API VM Docker NovaNova resource Docker resource Container1 Container2 Container3 HOT
  29. 29. Heat Template heat_template_version: 2013-05-23 description: Single compute instance running cirros in a Docker container. resources: my_instance: type: OS::Nova::Server properties: key_name: ewindisch_key image: ubuntu-precise flavor: m1.large user_data: #include https://get.docker.io my_docker_container: type: DockerInc::Docker::Container docker_endpoint: { get_attr: [my_instance, first_address] } image: cirros
  30. 30. Q & A
  31. 31. Nitty-gritty

×