Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (93 sloc) 2.89 KB

Docker as hypervisor driver for Openstack Nova Compute

Neependra Khare, Red Hat

What is Docker ?

It is an open platform for developers and sysadmins to build, ship, and run distributed applications.


alt text

Virt and IaaS

alt text


alt text

Docker Support in OpenStack - Nova

alt text

Docker Support in OpenStack - Nova

  • Docker driver (Since Havana)
  • Driver is not in main source code tree
    • Faster Dev Cycle, Would be merged in Future
  • Implements OpenStack API

Setup with DevStack on Fedora 20

  • Install Docker
  • Clone nova-docker and devstack
$ git clone /opt/stack/nova-docker
$ git clone /opt/stack/devstack
  • Note : only needed until we can make use of configure_nova_hypervisor_rootwrap
git clone /opt/stack/nova
  • Prepare the devstack for installation
$ cd /opt/stack/nova-docker
$ ./contrib/devstack/
  • Start the Devstack setup

Setup with DevStack on Fedora 20 makes following changes :- in localrc file, appends following :-

export VIRT_DRIVER=docker
export DEFAULT_IMAGE_NAME=cirros
export IMAGE_URLS=" "

Setup with DevStack on Fedora 20 makes following changes

  • in nova.conf file, changes the compute driver
compute_driver = novadocker.virt.docker.DockerDriver
  • Adds /etc/nova/rootwrap.d/docker.filters file with following content
# nova/virt/docker/ 'ln', '-sf', '/var/run/netns/.*'
ln: CommandFilter, /bin/ln, root
  • in glance.conf, adds docker as container/image format
container_formats = ami,ari,aki,bare,ovf,docker

Import a docker image to glance

$ source openrc
$ export OS_USERNAME=admin
$ docker pull fedora
$ sudo docker save fedora | glance image-create --is-public=True \
 --container-format=docker --disk-format=raw --name fedora
$ glance image-list

Docker plugin for heat (Openstack Orchestration)

alt text

  • Deploy and manage containers
  • Native Docker API