Provisioning Bare Metal with OpenStack

19,383 views

Published on

Published in: Technology
2 Comments
43 Likes
Statistics
Notes
No Downloads
Views
Total views
19,383
On SlideShare
0
From Embeds
0
Number of Embeds
103
Actions
Shares
0
Downloads
0
Comments
2
Likes
43
Embeds 0
No embeds

No notes for slide

Provisioning Bare Metal with OpenStack

  1. 1. Provisioning Bare MetalWith OpenStackDevananda van der Veen@devanandaHP Cloud Services
  2. 2. A Technical Diveinto 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 & BMaaSScott 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 Novalike the drivers for:libvirt, xen, vmware,hyperv, powervm, ...
  12. 12. What is BareMetal?A Hypervisor Driver for Nova… but different.
  13. 13. “normal” Nova ComputeOperating Systemnova-computeHypervisor(xen, kvm, lxc, ...)VMVMVMVMNeighbors steal resources....Memory wasted runningOS inside each VM...Hypervisor adds overhead...
  14. 14. BareMetal Nova ComputeControl serviceson a separate host!No bad neighbors!Native IO!No hypervisor!Operating SystemYour applicationsnova-computePXEIPMIOperating 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.BareMetalDriverscheduler_host_manager =nova.scheduler.baremetal_host_manager.BaremetalHostManagerfirewall_driver = nova.virt.firewall.NoopFirewallDriverram_allocation_ratio = 1.0reserved_host_memory_mb = 0
  25. 25. Tuning the Driver[baremetal]net_config_template =/opt/stack/nova/nova/virt/baremetal/net-static.ubuntu.templatetftp_root = /tftpbootpower_manager = nova.virt.baremetal.ipmi.IPMIdriver = nova.virt.baremetal.pxe.PXEinstance_type_extra_specs = cpu_arch:{i386|x86_64|arm}sql_connection = mysql://{user}:{pass}@{host}/nova_bmhttp://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/HavanaBaremetalNextStepshttps://wiki.openstack.org/wiki/BaremetalOperationsSpec
  30. 30. Deployment●Enrollmentnova baremetal-node-create --pm_address=... --pm_user=... --pm_password=... HYPERVISOR_HOSTNAME CPU RAM DISKnova 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-stepBaremetal Compute Host Baremetal NodeIPMI Power-OnDHCP RequestServe Deploy K & RExpose disks via iSCSIpartition & copy imageReboot commandDHCP RequestServe User K & RControl givento user”driver.spawn(...)”Cloud-InitFetch deploy& user imagesBuild TFTP config(*) PXE deploy processsubject to changewithout noticeBlue: nova-computeRed: nova-baremetal-deploy-helper
  34. 34. Setting up your Dev envFull 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-buildergit clone https://github.com/stackforge/tripleo-image-elementsgit clone https://github.com/tripleo/incubatorincubator/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_poseurbm_poseur/bm_poseur –vms 1 –arch i686 create-vmbm_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 Glanceincubator/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 teams developer resources– github/tripleo/incubator/blob/master/README.md– github/tripleo/incubator/blob/master/notes.md

×