2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)


Published on

Mirantis, the Global Engineering Services leader for OpenStack™ presents 2-day Bootcamp for OpenStack


This two-day intensive course provides hands-on technical training for OpenStack aimed at system administrators and IT professionals looking to get started on an OpenStack Cloud deployment. Each of the two days will consist of lecture, demos and group exercises. Topics include:

• OpenStack Overview & Architecture: Project goals and use cases, basic operating and deployment principles
• Cloud Usage Patterns: OpenStack codebase overview; creating networks, tenants, roles, troubleshooting; Nexenta Volume Driver
• In Production: Deploying OpenStack for real-world use, and practice of OpenStack operation on multiple nodes
• Swift Object Storage: use cases, architecture, capabilities, configuration, security and deployment
• Advanced Topics: Software Defined Networking, deployment and issues workshop, VMWare/OpenStack comparison

PRE-REQUISITES: Comfortable with Linux CLI, understanding of virtualization & hypervisors, Some experience with Linux networking

All course materials will be provided by Mirantis, including access to shared compute resources for labs. A light breakfast and lunch will be available to all course participants.

Mirantis instructors are active code committers to the OpenStack project, with proven experience building OpenStack clouds in the real world. In parallel to delivering expert training, they also consult for some of the notable global companies using OpenStack – including Cisco, NASA, Dell and Internap.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)

  1. 1. TM Mirantiswww.mirantis.com/training
  2. 2. 2-Day Agenda TOPIC LECTURE, DEMOS AND GROUP EXERCISES OpenStack Project goals and use cases, basic operating and Overview & deployment principles (EXCERPTED IN THIS PREVIEW)! DAY$1$ Architecture$ OpenStack codebase overview; creating networks, Cloud Usage tenants, roles, troubleshooting; using Nexenta Volume Patterns$ Driver! In Deploying OpenStack for real-world use, and practice of Production$ OpenStack operation on multiple nodes! DAY$2$ Swift Object Use cases, architecture, capabilities, configuration, Storage$ security and deployment! Advanced Software Defined Networking, deployment and issues Topics$ workshop, VMWare/OpenStack comparison!http://www.mirantis.com/training
  3. 3. Goals •  Understand OpenStack purpose and use cases •  Understand OpenStack ecosystem o  history o  projects •  Understand OpenStack architecture o  logical architecture o  components o  request flow •  Get enough theory for hands-on labhttp://www.mirantis.com/training
  4. 4. What is OpenStack? "Open source software for building private and public clouds"http://www.mirantis.com/training
  5. 5. OpenStack capabilities •  VMs on demand o  provisioning o  snapshotting •  Volumes •  Multi-tenancy o  quotas for different users o  user can be associated with multiple tenants •  Object storage for VM images and arbitrary fileshttp://www.mirantis.com/training
  6. 6. OpenStack History •  July 2010 - Initial announcement •  October 2010 - Austin Release •  April 2011 - Cactus Release •  October 2011 - Diablo Release •  April 2012 - Essex Release •  October 2012 - Folsom Releasehttp://www.mirantis.com/training
  7. 7. OpenStack Projects •  Nova (Compute) •  Glance (Image Service) •  Swift (Object Store) •  Keystone (auth) •  Horizon (Dashboard)http://www.mirantis.com/training
  8. 8. OpenStack Projects:Relationshiphttp://www.mirantis.com/training
  9. 9. OpenStack:Deployment Topologyhttp://www.mirantis.com/training
  10. 10. OpenStack Projects:Detailed Viewhttp://www.mirantis.com/training
  11. 11. Horizon "The OpenStack Dashboard (Horizon) provides a baseline user interface for managing OpenStack services."http://www.mirantis.com/training
  12. 12. Horizon notes •  "Stateless" •  Error handling is delegated to back-end •  Doesnt support all API functions •  Can use memcached or database to store sessions •  Gets updated via nova-api pollinghttp://www.mirantis.com/training
  13. 13. Horizon internals •  2 subprojects o  horizon - generic Django libraries and components to work with REST-based back-end o  openstack-dashboard - web app itself, with styles, locale, etc. •  Dashboard for each entity (like instances or images) - nested Django apphttp://www.mirantis.com/training
  14. 14. Keystone "Keystone is an OpenStack project that provides Identity, Token, Catalog and Policy services for use specifically by projects in the OpenStack family."http://www.mirantis.com/training
  15. 15. Keystone Architecturehttp://www.mirantis.com/training
  16. 16. Keystone data model •  User: has account credentials, is associated with one or more tenants •  Tenant: unit of ownership in openstack, contains one or more users •  Role: a first-class piece of metadata associated with many user-tenant pairs. •  Token: identifying credential associated with a user or user and tenant •  Extras: bucket of key-value metadata associated with a user-tenant pair. •  Rule: describes a set of requirements for performing an action.http://www.mirantis.com/training
  17. 17. Keystone: auth flowhttp://www.mirantis.com/training
  18. 18. Keystone:populating auth data •  Add tenants •  Add users •  Add roles •  Grant roles to users •  Add endpoint templates •  Map endpoint templates to zoneshttp://www.mirantis.com/training
  19. 19. nova-api "nova-api is a RESTful API web service which is used to interact with nova"http://www.mirantis.com/training
  20. 20. nova-api characteristics •  Exposes REST API •  Provides system for managing multiple APIs on different sub-domains o  EC2-compatible - will be deprecated o  OpenStack Compute API - all innovation happens here •  The only "allowed" way to interact with nova •  Stateless - HA-readyhttp://www.mirantis.com/training
  21. 21. nova-api clientshttp://www.mirantis.com/training
  22. 22. nova database "nova database stores current state of all objects in compute cluster."http://www.mirantis.com/training
  23. 23. nova database •  Can be any relational database •  nova-api talks to DB via SQLAlchemy (python ORM) •  Most of the deployments are done with MySQL or PostreSQL •  DB HA should be done via external tools (like MMM for MySQL)http://www.mirantis.com/training
  24. 24. Message queue "Message queue is a unified way for collaboration between nova components."http://www.mirantis.com/training
  25. 25. OpenStack messaging 2 modes: •  rpc.cast - dont wait for result •  rpc.call - wait for result (when there is something to return)http://www.mirantis.com/training
  26. 26. Messagings notes •  OpenStack uses multiple queues within single RabbitMQ instance •  OpenStack messages traffic is not intensive •  OpenStack doesnt send broadcast messages •  HA for MQ should be configured separatelyhttp://www.mirantis.com/training
  27. 27. nova-scheduler "nova-scheduler is a daemon, which determines, on which compute host the request should run."http://www.mirantis.com/training
  28. 28. nova-scheduler:users demand •  provision VM to particular host •  provision VMs of the particular tenant to isolated hosts •  provision all VMs on different hosts •  provision VMs to "higher density" hostshttp://www.mirantis.com/training
  29. 29. nova-scheduler:available schedulers Scheduler Description Chance Picks a host that is up at random Simple Picks a host that is up and has the fewest running instances Filter Picks the best-suited host which satisfies selected filter Multi A scheduler that holds multiple sub- schedulershttp://www.mirantis.com/training
  30. 30. nova-scheduler: filteringhttp://www.mirantis.com/training
  31. 31. nova-scheduler: filters Filter Description affinity Same host or different host availability Least cost inside selected availability zone zone core Least CPU core utilization ram Only return hosts with sufficient RAM json Allows simple JSON based grammar. Can be used to build custom schedulers.http://www.mirantis.com/training
  32. 32. nova-scheduler: filters •  Filters are statically configured in nova.conf •  Multiple filters can be specified •  It is possible to create custom filter o  Inherit from BaseHostFilter class o  override host_passes(self, host_state, filter_properties)http://www.mirantis.com/training
  33. 33. nova-scheduler:weights and costshttp://www.mirantis.com/training
  34. 34. nova-scheduler:weights and costs •  Cost - integer value •  Every compute host can have several cost functions associated with it •  If no cost functions associated - use default from nova.conf •  weight = sum(costi + weigth_fni)http://www.mirantis.com/training
  35. 35. nova-scheduler: summary •  Allow to tweak provisioning by adjusting filters, cost and weights •  Still doesnt cover all customer demands - exposes framework for building custom schedulers insteadhttp://www.mirantis.com/training
  36. 36. Questions •  How does OpenStack understand that specific request can be executed by the user? •  How to get a status for a requested server? Where it will come from? •  What is the difference between rpc.call vs rpc.cast? •  How to create a filter, which will determine servers with 8GB to 16GB RAM available?http://www.mirantis.com/training
  37. 37. nova-compute "nova-compute is a worker daemon, which primarily creates and terminates VMs via hypervisor API."http://www.mirantis.com/training
  38. 38. nova-computehttp://www.mirantis.com/training
  39. 39. nova-compute: drivers •  Functionality is not 100% similar •  Exact "run_instance" flow depends on driver implementation •  Most of the features are tested on KVMhttp://www.mirantis.com/training
  40. 40. Glance "The Glance project provides services for discovering, registering, and retrieving virtual machine images."http://www.mirantis.com/training
  41. 41. Glance summary •  Image-as-a-service •  Can use multiple back-ends for image storage •  Supports multiple image formatshttp://www.mirantis.com/training
  42. 42. Glance architecturehttp://www.mirantis.com/training
  43. 43. Glance capabilities •  CRUD images •  Search images via filters o  name o  container format o  disk format o  size_min, size_max o  status •  Caches images o  uses SQLite or FS that supports xattrs for caching o  queues images for prefetching o  prefetches images o  prunes images o  cleans invalid cache entrieshttp://www.mirantis.com/training
  44. 44. Glance image formats Disk Description Format raw This is an unstructured disk image format vhd This is the VHD disk format, a common disk format used by virtual machine monitors from VMWare, Xen, Microsoft, VirtualBox, and others vmdk Another common disk format supported by many common virtual machine monitors vdi A disk format supported by VirtualBox virtual machine monitor and the QEMU emulator iso An archive format for the data contents of an optical disc (e.g. CDROM). qcow2 A disk format supported by the QEMU emulator that can expand dynamically and supports Copy on Write aki This indicates what is stored in Glance is an Amazon kernel image ari This indicates what is stored in Glance is an Amazon ramdisk image ami This indicates what is stored in Glance is an Amazon machine imagehttp://www.mirantis.com/training
  45. 45. Fetching image from glance 1.  GET http://<glance-url>/images/<ID> 2.  If image can be found, API returns image-uri 3.  nova-compute passes image-uri to hypervisor driver 4.  hypervisor driver fetches image directly from glance back-end store using image-urihttp://www.mirantis.com/training
  46. 46. Custom image creation 1.  Get installation ISO 2.  Create VM (qemu-img create) 3.  Start VM and connect to it via VNC console a.  Install image without LVM b.  Create default iptables rules c.  Install and configure cloud-init d.  With cloud-init configure image 4.  Prepare image for OpenStack a.  Extract root partition, kernel and ramdisk b.  cleanup c.  packagehttp://www.mirantis.com/training
  47. 47. Network configuration flow 1.  Allocate MAC addresses 2.  Allocate IPs (for each network) 3.  Associate IPs with VMs (DB) 4.  Setup network on host a.  Update DHCP config b.  Initialize gateway c.  VPN configuration (optional) 5.  Update networking info in DBhttp://www.mirantis.com/training
  48. 48. nova-network "nova-network is a worker daemon which performs tasks to manipulate network via external commands."http://www.mirantis.com/training
  49. 49. nova-network responsibilities •  Allocate and configure network via network manager o  FlatManager o  FlatDHCPManager o  VlanManager •  Manage Floating IPs •  Manage Security groupshttp://www.mirantis.com/training
  50. 50. FlatManagerhttp://www.mirantis.com/training
  51. 51. FlatManager •  Supports only single network •  Doesnt do any bridge/vlan creation •  The bridge needs to be manually created on all hosts •  Compute host attempts to inject network settings into /etc/network/interfaceshttp://www.mirantis.com/training
  52. 52. FlatDHCPManagerhttp://www.mirantis.com/training
  53. 53. FlatDHCPManager •  Improvement of FlatManager •  Stars up 1 DHCP server to give out addresses •  Never injects network settings into guest •  Manages bridgeshttp://www.mirantis.com/training
  54. 54. VlanManagerhttp://www.mirantis.com/training
  55. 55. VlanManager features •  Creates host-managed VLAN for each project •  Requires switch that supports VLAN tagging (IEEE802.1Q) •  Each project gets own subnet (VPN is required to access VMs via private IPs) •  DHCP server is running for each subnet •  All instances belonging to one project are bridged into the same VLAN for that projecthttp://www.mirantis.com/training
  56. 56. CloudPipehttp://www.mirantis.com/training
  57. 57. Floating IPs •  Shared pool of public IP addresses •  Each user gets a quota of how many IPs to use •  Managed by adminhttp://www.mirantis.com/training
  58. 58. Floating IPs traffichttp://www.mirantis.com/training
  59. 59. Assigning Floating IPsOpenStack Admin •  Dedicate floating IPs to clusterOpenStack User 1.  Allocate public IP for tenant within given quota 2.  Associate public IP with VM a.  Find host b.  Add IP address to public network interface of the host c.  NATting all network traffic via associated floating IPhttp://www.mirantis.com/training
  60. 60. Security Groupshttp://www.mirantis.com/training
  61. 61. Security Groups •  Security group is a named collection of network access rules •  User can select multiple security groups during VM creation •  If no security groups specified - default is selected •  Security groups are applied on the host nodehttp://www.mirantis.com/training
  62. 62. nova-volume "nova-volume manages the creation, attaching and deattaching of persistent volumes to compute instances"http://www.mirantis.com/training
  63. 63. nova-volume summary •  Optional •  iSCSI solution which uses LVM •  Volume can be attached only to 1 instance at a time •  Persistent volumes keep their state independent of instances •  Within single OpenStack deployment different storage providers cannot be usedhttp://www.mirantis.com/training
  64. 64. nova-volume drivers •  iSCSI •  Xen Storage Manager •  Nexenta •  NetApp •  SANhttp://www.mirantis.com/training
  65. 65. 2-Day Agenda TOPIC LECTURE, DEMOS AND GROUP EXERCISES OpenStack Project goals and use cases, basic operating and Overview & deployment principles (EXCERPTED IN THIS PREVIEW)! DAY$1$ Architecture$ OpenStack codebase overview; creating networks, Cloud Usage tenants, roles, troubleshooting; using Nexenta Volume Patterns$ Driver! In Deploying OpenStack for real-world use, and practice of Production$ OpenStack operation on multiple nodes! DAY$2$ Swift Object Use cases, architecture, capabilities, configuration, Storage$ security and deployment! Advanced Software Defined Networking, deployment and issues Topics$ workshop, VMWare/OpenStack comparison!http://www.mirantis.com/training
  66. 66. END PREVIEWBootcamp for OpenStackwww.mirantis.com/training