Bug Reference

https://issues.apache.org/jira/browse/CLOUDSTACK-6278

 

Branch

4.5

Introduction

CloudStack Baremetal can only work in basic networking mode currently, the main challenge to support advanced networking mode is to find a way to program vlan when provisioning/deprovisioning a baremetal instance. Vlan programming is a simple task in virtualization, because switches where vms directly connect to are virtualized and all hypervisor vendors provide means to program vlan on virtual switches. In baremetal, there are totally no virtualization technology involved, baremetal instances are connecting to physical switch so the only way to program vlan is to talk to physical switch. Given there are lot of switch vendors in market, this feature will provide a framework where switch vendor can plug their specific product in by writing a small piece of code.

Purpose

This is functional specification of Baremetal Advanced Networking Support, which has JIRA ID 6278

References

Document History

Date

Revision

Author

Description of the change

3/24/2014

0.1

Frank Zhang

Initial Draft

Glossary

Term

Definition

Baremetal

the technology that manages baremetal host using CloudStack infrastructure

CS

CloudStack

Feature Specifications

          For details for these categories, please refer to CloudStack API Doc.

    1. create baremetal zone with advanced networking

    2. prepare baremetal infrastructure following instructions in reference link to Baremetal Kickstart

    3. provide host-to-switch details either using API addBaremetalRct

    4. create user vm using different user accounts and verify they are isolated

      This feature is transparent to end user, they should not feel any difference than creating a virtualized instance when creating a baremetal instance. For administrator, a few extra works need to be done, including setup a baremetal advanced zone and provide network topology between host and TOR switch.  

Use cases

This feature is transparent to end user. There is not change in workflow of creating a CloudStack instance in advanced networking zone, except user creates a baremetal instance instead of virtualized instance. The workflow of creating a baremetal instance is described in specification Baremetal Kickstart.

For admin, the workflows are:

  1. Admin creates the compute offering
  2. Admin creates a Network Offering w/PXE & DHCP services and VR as the service provider
  3. Admin set IP of internal http server in network offering and global setting 'baremetal.internal.storage.server.ip'. The one in network offering will override the one in global setting
  4. Tenant can create a network w/ the above network offering
  5. Tenant deploys BM instance
  6. CloudPlatform Management Server programs VR w/DHCP and PXE boot information
  7. CloudPlatform Management Server creates a source NAT that traffic from guest gateway with destination ip of 'baremetal.internal.storage.server.ip' will be source NATed to management nic. Then traffic towards to internal http server goes through VR's management nic instead of public nic. The source nat will only bind to guest ip of provisioning instance to prevent network sniffer from other VMs in the same network.
  8. Programs TOR w/necessary guest VLAN
  9. IPMI powers BM host
    1. Sets Host to PXE boot
    2. Restarts the host
  10. Host boots up and reaches DHCP (VR)
  11. Gets IP and PXE info using DHCP options
  12. Downloads Linux Kerner (init.rd)
  13. Gets KS file from PXE server (VR)
  14. BM host gets packages using the info provided from the KS file
  15. When provisioning is done, post-provision script in KS file runs a script which sends a notification(http request) to an agent running in VR. The agent will drop the source nat created in step 7 and notify CloudStack management server that provisioning is complete. CloudStack management server will also set a TTL on source nat created in step 7. If the provision-done notification is not received after TTL is expired, management server will instruct agent in VR to drop the source NAT and treat provisioning as failure.

Work Flow Diagram:

Architecture and Design description

CloudStack advanced networking typically uses vlan as L2 isolation method, this can be simply achieved in virtualized environment as all hyperivisor vendors provide means to configure vlan on virtual switch programmabely. In baremetal world, the case is more challenging as baremetal instances are connecting to physical switches, as there is no generic way to programming vlan during baremetal instance's provisioning/deprovisioning phrase. Below is an architecture overview for this feature:


The main efforts are divided in four parts:

Web Services APIs

AddBaremetalRCT

field name

description

rctUrl

A http link pointing to RCT on accessible http server

UI flow

a new button to call AddBaremetalRCT:

This button should be showed up when we click "Baremetal Rack Configuration" in "Select View" scroll bar at "Global settings".Baremetal_add_RCT.png

a new button to call deleteBaremetalRCT:

This button will delete an existing RCT.Baremetal_delete_RCT.png

a new global setting for "baremetal.internal.storage.server.ip":

This global setting is the same to all others. I don’t even know if we need any UI change.

IP Clearance

Difference between baremetal basic zone and baremetal advanced zone

As CloudStack divides its networking model into basic zone and advanced zone, there are also some difference between baremetal  basic zone and advanced zone.

  1. No need to setup external DHCP/PXE server in advanced zone. Baremetal basic zone(see Baremetal Kick Start) needs admin to setup external DHCP/PXE server and register it to CloudStack. This is not necessary for baremetal advanced zone. CloudStack virtual router has enhanced to provide PXE/DHCP service, whenever a new baremetal instance is being created, a new virtual router will be created automatically by CloudStack if there is not a one in network.

  2. Need supporting hypervisor cluster in advanced zone. As CloudStack virtual router can only be created on hypervisor based host, in advanced zone,  baremetal cluster needs a supporting hypervisor cluster which is vmware cluster at this time to start virtual router. This is not necessary for basic zone which use external DHCP/PXE

  3. Networking topology is different. Generic speaking, in basic zone, baremetal instances are setting on the same layer 2 network, the layer 3 on top layer 2 uses gateway provided by customer's infrastructure which means baremetal instances are usually reachable by outside. In advanced network, all baremetal instances are sitting behind source nat of virtual router, which means they are not directly reachable unless traffic comes from the same subnet. For details of difference of network topology between basic zone and advanced zone, please reference CloudStack admin guide.  

 

Appendix

Appendix A:

Appendix B: