Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Provisioning Bare Metal with OpenStack

Weitere Verwandte Inhalte

Provisioning Bare Metal with OpenStack

  1. 1. Provisioning Bare Metal With OpenStack Devananda van der Veen @devananda HP Cloud Services
  2. 2. A Technical Dive into the BareMetal Driver ● Background & Status ● Why? ● How Deployment Works ● Dev/Test ● Further ideas...
  3. 3. Who am I?
  4. 4. History of the BareMetal Driver
  5. 5. Why?
  6. 6. Why? ● HPC & BMaaS Scott Beale / Laughing Squid
  7. 7. Why? ● HPC & BMaaS ● Stop re-inventing the wheel
  8. 8. Why? ● HPC & BMaaS ● Stop re-inventing the wheel ● New possibilities...
  9. 9. What is BareMetal?
  10. 10. What is BareMetal? A Hypervisor Driver for Nova
  11. 11. What is BareMetal? A Hypervisor Driver for Nova like the drivers for: libvirt, xen, vmware, hyperv, powervm, ...
  12. 12. What is BareMetal? A Hypervisor Driver for Nova … but different.
  13. 13. “normal” Nova Compute Operating System nova-compute Hypervisor (xen, kvm, lxc, ...) VM VM VM VM Neighbors steal resources.... Memory wasted running OS inside each VM... Hypervisor adds overhead...
  14. 14. BareMetal Nova Compute Control services on a separate host! No bad neighbors! Native IO! No hypervisor!Operating System Your applications nova-compute PXE IPMI Operating System
  15. 15. One Host to Rule them All (well, not really)
  16. 16. Some Things had to Change... ● scheduler_host_manager ● (host, node) ● nova_bm
  17. 17. Many varieties of hardware ● Pluggable sub-drivers – Power, Image deployment, Volume, Network
  18. 18. Many varieties of hardware ● Pluggable sub-drivers – Power, Image deployment, Volume, Network – HW discovery? – BIOS & Firmware management? – Vendor-specific control modules?
  19. 19. Reuse & Recycle ● External dependencies – dnsmasq – ipmitool – open-iscsi – syslinux
  20. 20. Current Capabilities
  21. 21. Current Capabilities ● Pluggable Power sub-drivers – IPMI – Virtual – TileraPDU (in trunk)
  22. 22. Current Capabilities ● Pluggable Deployment sub-drivers – PXE – Tilera (in trunk)
  23. 23. Current Capabilities ● OpenStack Network integration (partial) ● Nova API extension – add/delete nodes and interfaces – show status
  24. 24. Enabling the Driver [DEFAULT] compute_driver = nova.virt.baremetal.driver.BareMetalDriver scheduler_host_manager = nova.scheduler.baremetal_host_manager.BaremetalHostManager firewall_driver = nova.virt.firewall.NoopFirewallDriver ram_allocation_ratio = 1.0 reserved_host_memory_mb = 0
  25. 25. Tuning the Driver [baremetal] net_config_template = /opt/stack/nova/nova/virt/baremetal/net-static.ubuntu.template tftp_root = /tftpboot power_manager = nova.virt.baremetal.ipmi.IPMI driver = nova.virt.baremetal.pxe.PXE instance_type_extra_specs = cpu_arch:{i386|x86_64|arm} sql_connection = mysql://{user}:{pass}@{host}/nova_bm http://docs.openstack.org/trunk/openstack-compute/ admin/content/list-of-compute-config-options.html
  26. 26. Deployment
  27. 27. Deployment ● Prerequisite:You need a running OpenStack cloud! – devstack – diskimage-builder + tripleo-image-elements “boot-stack” – or something else
  28. 28. Deployment ● Prerequisite: operational requirements – flavors mapped to hardware – images loaded in Glance ● deploy kernel & ramdisk ● machine images
  29. 29. Deployment ● Current(*) Prerequisites – HW already configured (BIOS, RAID, etc) – HW inventory ● MAC addr ● IPMI credentials ● CPU/RAM characteristics – HW enrolled via Nova BareMetal API (*) https://etherpad.openstack.org/HavanaBaremetalNextSteps https://wiki.openstack.org/wiki/BaremetalOperationsSpec
  30. 30. Deployment ● Enrollment nova baremetal-node-create --pm_address=... --pm_user=... --pm_password=... HYPERVISOR_HOSTNAME CPU RAM DISK nova baremetal-add-interface NODE_ID AA:BB:CC:DD:EE:FF
  31. 31. Deployment ● Deploy Process – Initiated by “nova boot” – nova-scheduler selects host & node – nova-compute prepares bootloader, notifies OS Network... – power-on & deploy image – reboot
  32. 32. Deployment (PXE)
  33. 33. Step-by-step Baremetal Compute Host Baremetal Node IPMI Power-On DHCP Request Serve Deploy K & R Expose disks via iSCSI partition & copy image Reboot command DHCP Request Serve User K & R Control given to user ”driver.spawn(...)” Cloud-Init Fetch deploy & user images Build TFTP config (*) PXE deploy process subject to change without notice Blue: nova-compute Red: nova-baremetal-deploy-helper
  34. 34. Setting up your Dev env Full walk-through: http://bit.ly/tripleo-dev
  35. 35. Setting up your Dev env ● A minimal OpenStack cloud + BareMetal driver – devstack – download: http://bit.ly/dib-bootstack (*) – build it yourself! git clone https://github.com/stackforge/diskimage-builder git clone https://github.com/stackforge/tripleo-image-elements git clone https://github.com/tripleo/incubator incubator/scripts/boot-elements -n boot-stack (*) YMMV. Build this locally for best results.
  36. 36. Setting up your Dev env ● Some VMs to mock hardware – create them by hand – automate it! git clone https://github.com/tripleo/bm_poseur bm_poseur/bm_poseur –vms 1 –arch i686 create-vm bm_poseur/bm_poseur get-macs
  37. 37. Setting up your Dev env ● Deploy ramdisk created for you ● But you need a cloud image: – download: http://bit.ly/dib-ubuntu – diskimage-builder/bin/disk-image-create ubuntu -a i386 -o ubuntu
  38. 38. Put it all together ● Start boot-stack VM ● Load ubuntu image into Glance incubator/scripts/load-image ubuntu.qcow2 ● Enroll VM with BareMetal ● Go!
  39. 39. What about real hardware? Only the networking is different
  40. 40. What about real hardware? Only the networking is different … except for when other things are different.
  41. 41. Plans
  42. 42. Plans ● Automate discovery
  43. 43. Plans ● Automate discovery ● Firmware management
  44. 44. Plans ● Automate discovery ● Firmware management ● HA baremetal deploy nodes
  45. 45. Further Reading ● Driver Wiki – https://wiki.openstack.org/wiki/Baremetal ● Disk Image Builder – github/stackforge/diskimage-builder/blob/master/README.md ● TripleO team's developer resources – github/tripleo/incubator/blob/master/README.md – github/tripleo/incubator/blob/master/notes.md

×