Baremetal with Apache CloudStack ApacheCon Europe 2016

Jaydeep Marfatia

Cloud, IOT and Analytics Me

Director of Product Management Products Accelerite

Background

Project lead for open source project XenMan/ConVirt

Co-Founder Convirture Corp.

Architect for Oracle 10g Enterprise Manager

2 © 2016 Accelerite. All Rights Reserved. Apache CloudStack • Highly available, highly scalable Infrastructure (IaaS) platform

• Easy to deploy, turnkey solution that includes the entire "stack" of features most organizations want with an IaaS cloud

• Used by many enterprises for their private cloud, as well as for running large public clouds !

• CloudStack currently supports the most popular : VMware, KVM, Citrix XenServer, Hyper-V and more

3 © 2016 Accelerite. All Rights Reserved. Accelerite

• Enterprise Infrastructure software company

• Acquired CloudPlatform from Citrix early this year

• Commercial product based on CloudStack

• 50+ engineers and adding more

4 © 2016 Accelerite. All Rights Reserved. Recent contributions by Accelerite

• Template upload from browser • DHCP/DNS Offload • LDAP integration • CoreOS/Docker on CloudStack • VPN enhancements • VMWare Networking improvements • Baremetal enhancements • 200+ Bug fixes in the product

5 © 2016 Accelerite. All Rights Reserved. CloudStack User Console

7 © 2016 Accelerite. All Rights Reserved. Admin Console

8 © 2016 Accelerite. All Rights Reserved. Self-service VM Provisioning

Zone Template Compute Disk Affinity Network Launch

9 © 2016 Accelerite. All Rights Reserved. Monitoring Cloud Infrastructure

10 © 2016 Accelerite. All Rights Reserved. © 2016 Accelerite. All rights reserved. Baremetal Team Team

• Harikrishna Patnala – Apache Committer, working on CloudStack 4+ years Expertise : Baremetal and Virtual Router

• Jayapal Uradi – Apache Committer, 4+ years

Expertise : CloudStack Networking

• Suresh Sadhu – Quality Assurance of CloudStack, 5+ years

Expertise : All rounder

12 © 2016 Accelerite. All Rights Reserved. Motivation for Baremetal Why Baremetal?

• Meet high performance computing requirements

• Hadoop, Spark, HPC

• Take advantage of specialized hardware

• GPUs, Blade Micro-servers

• Databases

• Virtual Desktop Infrastructure management

• Desired for Docker Containers

14 © 2016 Accelerite. All Rights Reserved. Requirements

16 © 2016 Accelerite. All Rights Reserved. Data Center

Switch

Servers Rack

Secondary Storage

17 © 2016 Accelerite. All Rights Reserved. Workload Partitioning

Switch

Hadoop

Rack

Kubernetes

Secondary Storage

18 © 2016 Accelerite. All Rights Reserved. Multi-Tenancy

Switch

Tenant 1

Rack

Tenant 2

Secondary Storage

19 © 2016 Accelerite. All Rights Reserved. Multi-Tenancy and Workload partitioning

Switch

Tenant 1

Rack Tenant 1 - DB

Tenant 2

Secondary Storage

20 © 2016 Accelerite. All Rights Reserved. Data Center – VMs and Baremetal

Rack

Tenant 1 Network

Tenant 2 Network

21 © 2016 Accelerite. All Rights Reserved. Baremetal in CloudStack

• Ability to deploy Baremetal servers as easy as spinning up a VM

• Multi-tenant Baremetal orchestration with network isolation

• Flexibility of using mixed environments of VM and Baremetal

• DB tier on Baremetal and other tiers on VMs for a multi-tier application

• Extensible architecture for different flavors of hardware and network elements

22 © 2016 Accelerite. All Rights Reserved. What all do we need ? PXE server

• Basic Networking

• Flat network

• External PXE/DHCP/DNS Servers • Advanced Networking

• Isolation using VLANs

• Additionally VR acts as PXE

• All VM networking services mapped to Baremetal

24 © 2016 Accelerite. All Rights Reserved. Advanced Networking

Network isolation with VLAN

Hypervisor 2 1 Hypervisor 2

Guest1 Guest1 Guest1 Guest1 VR VM1 VM2 VM3

Public VLAN99 VLAN2000

Switch Management Storage

Public VLAN99

Console, Storage VMs

© 2016 Accelerite. All Rights Reserved. Hypervisor 2 Advanced Networking

Network isolation with VLAN

Hypervisor 2 Hypervisor 1 Hypervisor 2

Guest1 Guest2 Guest1 Guest2 Guest2 Guest1 Guest1 Guest2 VR VR VM1 VM1 VM2 VM2 VM3 VM3

Public VLAN99 VLAN2000

VLAN2001 Switch Management Storage

Public VLAN99

Console, Storage VMs

© 2016 Accelerite. All Rights Reserved. Hypervisor 2 Advanced Networking

VLAN based isolation

Networking services: • DHCP • DNS • Source NAT • Static NAT • Port Forwarding • Load Balancing • Firewall • VPN • PXE

© 2016 Accelerite. All Rights Reserved. Templates

• PXE Server hosts the Installer Kernels and PXE Kickstart, NFS Kickstart files Server/VR Installer Kernels T F • Template Registration is T done by giving the URL P from where OS Packages Baremetal OS Package can be retrieved HTTP Host Repository

28 © 2016 Accelerite. All Rights Reserved. Example Template URL • ks=http_link_to_kickstartfile;kernel=nfs_path_to_pxe_kernel;initrd=nfs_pa th_to_pxe_initrd • ks=http://10.147.28.7/export/home/hari/rhel65/ks1.ks;kernel=10.147.2 8.7:/export/home/hari/rhel65/RHEL65/images/pxeboot/vmlinuz;initrd=1 0.147.28.7:/export/home/hari/rhel65/RHEL65/images/pxeboot/initrd.im g

29 © 2016 Accelerite. All Rights Reserved. Service Offering

• Service offering allows administrator to determine size of the VM in terms of CPU and memory

• e.g. small vm  2 cpu, 512 MB ram

• For , CPU and memory information is specified while adding the host along with a tag and IPMI details

• e.g. host-44, 8 cpu, 32 GB ram –tag ssd_bm, ipmi info : ip, user, password

• Tagging scheme is used to map service offerings and baremetal host

• e.g. SSD baremetal medium – 8 cpu, 32 GB ram – tag ssd_bm

30 © 2016 Accelerite. All Rights Reserved. Switch Configuration • Switch credentials • Switch topology information • host – switch port mapping Switch

{ "racks": [ Baremetal { Nodes "l2Switch": { "ip": "10.147.28.11", "username": "admin", "password": "password", "type": "Force10” }, "hosts": MS Node [ VR on Hypervisor { "mac": "d4:ae:52:7a:a5:9c", "port": "tengigabitethernet:0/30" }, { "mac": "d4:ae:52:7a:a5:9d", "port": "tengigabitethernet:0/31" Template } ] Storage } ] 31} © 2016 Accelerite. All Rights Reserved. Provisioning Flow Baremetal Provisioning Flow – Advanced Zone

1. User Requests Baremetal Instance Physical VR (w/ PXE & 2. Management Server configures PXE Switch DHCP on VR and physical switch with DHCP/DNS) VLANS

3. Baremetal host started with IPMI command to PXE boot

4. Host gets DHCP Management 5. Host pulls PXE image ManagementServer Management BaremetalServer 6. Image is pulled and installed Server Hosts

7. Host pulls user data from VR

33 © 2016 Accelerite. All Rights Reserved. Windows Baremetal Provisioning (Approach)

• Windows Deployment server needs to be programmed

• Need to invoke powershell commands from Linux

• Agent to be present in WDS Server

• Using RPC/or Event Queue mechanism, send Powershell commands to WDS

• AD / DHCP is used for authentication and PXE booting

34 © 2016 Accelerite. All Rights Reserved. Windows Baremetal Provisioning Flow

1. User Requests Baremetal Instance DHCP/DNS Switch Active 2. Management Server configures WDS Directory WDS (w/ PXE) Server with PXE, switch configured

3. Baremetal host started with IPMI command to PXE boot

4. Host gets DHCP Management 5. Host pulls PXE image ManagementServer Management BaremetalServer 6. Image is pulled and installed Server Hosts

7. Host pulls user data from VR

35 © 2016 Accelerite. All Rights Reserved. Baremetal Use Case for Container Deployment

1. Install CoreOS on Baremetal hosts 2. Setup networking – Basic or Isolated (program the switch) 3. Create k8s cluster using cloud- config sent via userdata service on VR Node1 CoreOS 4. Use Kubernetes dashboard within Images CloudStack UI to deploy and manage containers Kubernetes Node2 5. All CloudStack tenanting and Cluster isolation features apply cloud-config Master Mgmt Virtual Dashboard Server Router

36 © 2016 Accelerite. All Rights Reserved. Extensibility Network Switch Plugin

<> BaremetalSwitchBackend • getSwitchBackendType() • prepareVlan() • removePortFromVlan()

Force10BaremetalSwitchBackend

public static final String TYPE = "Force10"

• getSwitchBackendType() { return TYPE } • prepareVlan() • removePortFromVlan()

38 © 2016 Accelerite. All Rights Reserved. Network Switch Plugin • Currently, a Force10 switch is implemented • To Extend to other types, implement following two methods as a plugin

Arista plugin Implementation Details: 1.Implement AristaBaremetalSwitchBackend. and implement the interface BaremetalSwitchBackend. For example interface refer to https://github.com/apache/CloudStack/blob/master/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networ kservice/Force10BaremetalSwitchBackend.java. 2. Need to implement the following three functions with appropriate actions for Arista switches in the above file. (definition of interface is in https://github.com/apache/CloudStack/blob/master/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networ kservice/BaremetalSwitchBackend.java): public interface BaremetalSwitchBackend { String getSwitchBackendType(); void prepareVlan(BaremetalVlanStruct struct); void removePortFromVlan(BaremetalVlanStruct struct); } 3. Add AristaBaremetalSwitchBackend bean configuration into https://github.com/apache/CloudStack/blob/master/plugins/hypervisors/baremetal/resources/META- INF/CloudStack/core/spring-baremetal-core-context.xml.

39 © 2016 Accelerite. All Rights Reserved. Looking forward Baremetal Projects : Contributions welcome

• WDS integration (WIP)

• Baremetal in VPC Network

• Add switch integration from different vendors

• NIC Bonding

• RAID

• UEFI Boot

• Redfish integration

• Auto-discovery of hosts and NIC details

41 © 2016 Accelerite. All Rights Reserved. Q&A