Click here to load reader
Upload
thanassis-parathyras
View
955
Download
2
Embed Size (px)
DESCRIPTION
Slides from the meetup co-organized by Athens OpenStack User Group and Docker Athens. We explore the relationship and integration between OpenStack and Docker as rapidly emerging technologies.
Citation preview
Docker in OpenStack
Joint Athens OpenStack User Group and Docker Athens Meetup,
24th September 2014
Thanassis Parathyras [email protected], @parathyras
Announcements
[email protected]• Join at http://lists.openstack.org
OpenStack Summit (http://openstackceeday.com)• 3-7 November, Paris• Contact me for a discount code
OpenStack’s mission
“to produce the
ubiquitous Open Source Cloud Computing platform that will meet the needs of public and private clouds regardless of size, by being simple to implement and
massively scalable”
Docker, what is it?
“an open platform
for developers and sysadmins to build, ship, and run
distributed applications”
Smaller resource footprint, same level isolation
VMs and Containers
Docker support in OpenStack
OpenStack Compute (nova)• Docker driver (since Havana)• Driver not in main source code tree
– Faster dev cycles, future plan for merging
• Implements OpenStack API
OpenStack Orchestration (heat)• Docker plugin• Deploy and manage containers• Native Docker API
Under the hood
Case 1: Docker with Heat
Assume an OpenStack with Heat operational environment
1. Install the Docker plugin in Heatcd contrib/heat-dockersudo python ./setup.py install
Check Heat property plugin_dirs includes /usr/lib/heat
2. Restart HeatOnly the process "heat-engine" needs to be restarted to load the new installed plugin
Use this plugin enable Docker containers as resources in Heat templates
Case 2: Docker with Nova
Assume an OpenStack operational environment
1. Install Docker on your compute hosts2. Fix permissions
usermod -G docker novaservice openstack-nova-compute restart
3. Install driverpip install -e git+https://github.com/stackforge/nova-docker#egg=novadocker
Case 2: Enabling Docker
1. Configure nova[DEFAULT] compute_driver = novadocker.virt.docker.DockerDriver
2. Create file /etc/nova/rootwrap.d/docker.filters# nova-rootwrap command filters for setting up network in the docker driver# This file should be owned by (and only-writeable by) the root user
[Filters]# nova/virt/docker/driver.py: 'ln', '-sf', '/var/run/netns/.*'ln: CommandFilter, /bin/ln, root
Case 2: Using Docker
• Configure glance[DEFAULT] container_formats = ami,ari,aki,bare,ovf,docker
Follow the same workflow as other virt drivers:
• Create/Add/Use Docker images with Glance• Create/Manage instances with Nova
Considerations and open issues
• Containers don't aim to be a replacement for VMs– they are better for specific use cases– VMs and containers may co-exist in a cloud environment
• Docker driver for nova– Lack of integration with Cinder and Neutron– Imports constraints with OpenStack API
• Orchestrating containers – A different approach than treating them as another hypervisor type– Better fitted to Docker workflow
• Further integration– Docker authentication through OpenStack Identity (keystone)
OpenStack is YOU• Documentation
– http://docs.openstack.org Cloud Administrator Guide
• Questions– http://ask.openstack.org
• Participate– http://www.openstack.org/join/register– http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack– http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-el– #OSATH, http://www.meetup.com/Athens-OpenStack-User-Group
• Contribute– code (develop, review), docs, translations, bug reports– Review system Gerrit, https://wiki.openstack.org/wiki/GerritWorkflow
• Follow– @openstack
Thank you for being patient!
Athens OpenStack User Group #OSATHhttp://www.meetup.com/Athens-OpenStack-User-Group
Thanassis Parathyras [email protected], @parathyras