14

Click here to load reader

Docker in OpenStack

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

Page 1: Docker in OpenStack

Docker in OpenStack

Joint Athens OpenStack User Group and Docker Athens Meetup,

24th September 2014

Thanassis Parathyras [email protected], @parathyras

Page 2: Docker in OpenStack

Announcements

[email protected]• Join at http://lists.openstack.org

OpenStack Summit (http://openstackceeday.com)• 3-7 November, Paris• Contact me for a discount code

Page 3: Docker in OpenStack

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”

Page 4: Docker in OpenStack

Docker, what is it?

“an open platform

for developers and sysadmins to build, ship, and run

distributed applications”

Page 5: Docker in OpenStack

Smaller resource footprint, same level isolation

VMs and Containers

Page 6: Docker in OpenStack

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

Page 7: Docker in OpenStack

Under the hood

Page 8: Docker in OpenStack

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

Page 9: Docker in OpenStack

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

Page 10: Docker in OpenStack

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

Page 11: Docker in OpenStack

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

Page 12: Docker in OpenStack

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)

Page 13: Docker in OpenStack

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

Page 14: Docker in OpenStack

Thank you for being patient!

Athens OpenStack User Group #OSATHhttp://www.meetup.com/Athens-OpenStack-User-Group

Thanassis Parathyras [email protected], @parathyras