• Like
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Practical Docker for OpenStack (Juno Summit - May 15th, 2014)

  • 2,208 views
Published

Practical Docker for OpenStack (covering Nova and Heat plugins)

Practical Docker for OpenStack (covering Nova and Heat plugins)

Published in Software , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Hello man, I want to use heat to start docker containers.When i git clone the heat repository,there is not the 'plugin' directory ,instead the heat/contrib/docker/docker/ directory. So,i config the heat.conf with 'plugin_dirs=/root/heat/contrib/docker/docker' ,then i restart the heat-engine service.But, when i use 'heat stack-create -f xx.yml name' to create docker, there is an ERROR: Unknown resource Type : DockerInc::Docker::Container.
    What is this error? Did the docker-plugin install failed? How to check the plugin installed correctly? Thank you very much!
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
2,208
On SlideShare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
134
Comments
1
Likes
10

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. May 15th, 2014Practical Docker for OpenStack
  • 2. Better!
 Faster!
 Stronger! Better!
 Faster!
 Stronger!
  • 3. How are we using it? I Image iteration Integration
  • 4. All the things. Compute
  • 5. Docker Docker Key element of the Solum data plane
  • 6. Applying Heat Orchestration for Docker API
  • 7. Heat Resource DockerInc::Docker ::Container
  • 8. Heat Workflow Heat API VM Docker NovaNova resource Docker resource Container1 Container2 Container3 HOT
  • 9. 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
  • 10. Heat: Cirros 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
  • 11. Heat: Dockenstack heat_template_version: 2013-05-23 description: Single compute instance running Tempest 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 properties: docker_endpoint: { get_attr: [my_instance, first_address] } image: dockenstack privileged: true cmd: /opt/dockenstack/bin/tempest
  • 12. heat_template_version: 2013-05-23 description: Two containers, one host with shared volumes 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 ftp_container: type: DockerInc::Docker::Container properties: docker_endpoint: { get_attr: [my_instance, first_address] } image: mikz/vsftpd
 ports: [ “21:21” ]
 volumes: [ “/ftp” ] name: “FTP” apache_container: type: DockerInc::Docker::Container properties: docker_endpoint: { get_attr: [my_instance, first_address] } image: fedora/apache ports: [ “80:80” ] volumes-from: “FTP” cmd: “rm -rf /var/www; ln -s /ftp /var/www; /run-apache.sh”
  • 13. Docker plugin for Nova Compute Integration
  • 14. Awesome People Derek Higgins (RedHat) Ian Main (RedHat) Paul Czarkowski (Rackspace) Daniel Kuffner Julien Vey (Numergy) Aaron Rosen (Nicera) Pedro R Marques (Juniper) Sam Alba (Docker)
  • 15. 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
  • 16. Networking Nova
 Network
  • 17. Not supported.! (yet) Cinder Volumes Suspend/resume Pause/unpause Live-migration (patches welcome!)
  • 18. Nova+Docker! Architecture Overview
  • 19. 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
  • 20. Glance isn’t really needed (or desirable?) But it’s def-core…
  • 21. Nova doesn’t… Link container networks Pass environment variables Specify working directories Create docker-volumes Share docker-volumes between containers Arbitrary commands Arbitrary command-arguments We need container extensions!
  • 22. $ nova boot --flavor 1 --image cedef40a-ed67-4d10-800e-17455edce175 --hint same_host=a0cf03a5-d921-4877-bb5c-86d26cf818e1 
 Affinity
  • 23. Should you be using Heat?
  • 24. Closer to the Docker workflow Hybrid-cloud compatible Scheduled by backing cloud Microservices-friendly Integration with other services Nova features (quota, auth, etc…) Abstraction layer for other hypervisors Integrated scheduling Heat vs Nova! Comparison
  • 25. dockenstack a solution for OpenStack development & testing
  • 26. Testing
  • 27. Host VM Linux VM Vagrant (or other VM devstack environment)
  • 28. ! nested
  • 29. Where container == host; for all practical purposes Host VM Linux VM Host Container Linux VM Vagrant (or other VM devstack environment) Dockenstack
  • 30. Using Docker with the OpenStack Compute plugin
  • 31. Install the plugin mkdir git-co; cd git-co" git clone https://github.com/stackforge/nova-docker" cd nova-driver" python setup.py install
  • 32. Configure Nova Set in nova.conf:" compute_driver=novadocker.virt.docker.DockerDriver"
  • 33. 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
  • 34. 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
  • 35. ‘nova boot’
  • 36. Q & A http://youtu.be/GQiQMJe6G2g vBrownBag on using Dockenstack for testing the Nova driver: