MaaS Integration for Baremetal Provisioning in Cloudstack

Similar documents
Baremetal with Apache CloudStack

Redhat OpenStack 5.0 and PLUMgrid OpenStack Networking Suite 2.0 Installation Hands-on lab guide

Active System Manager Version 7.5 User s Guide

Installation runbook for

Orchestration Workflow Tasks for PXE Boot

Creating Application Containers

Creating Application Containers

Be smart. Think open source.

Cisco Mini ACI Fabric and Virtual APICs

Citrix Connector 7.5 for Configuration Manager. Using Provisioning Services with Citrix Connector 7.5 for Configuration Manager

Scrutinizer Virtual Appliance Deployment Guide Page i. Scrutinizer Virtual Appliance Deployment Guide. plixer

Building physical clouds

Citrix CloudPlatform (powered by Apache CloudStack) Version 4.5 Concepts Guide

Citrix CloudPlatform (powered by Apache CloudStack) Version 4.5 Getting Started Guide

Configuring Cisco UCS Server Pools and Policies

Transparent Service Migration to the Cloud Clone existing VMs to CloudStack/OpenStack templates without user downtime. CloudOpen Seattle 2015

CloudPlatform (powered by Apache CloudStack) Version Installation Guide

Active System Manager Version 8.0 User s Guide

Tenant Onboarding. Tenant Onboarding Overview. Tenant Onboarding with Virtual Data Centers

CORD How to build a POD and automate deployments. #OpenCORD

Isn't it Ironic? Managing a bare metal cloud. devananda.github.io/talks/isnt-it-ironic.html. Devananda van der Veen

Managing the VM Lifecycle

INSTALLATION RUNBOOK FOR Triliodata + TrilioVault

Getting to Know Apache CloudStack

Cisco UCS Director Baremetal Agent Installation and Configuration Guide, Release 5.2

Release Notes for Cisco Application Policy Infrastructure Controller Enterprise Module, Release x

DriveScale Administration Guide version 1.3

Quick Start Guide to Compute Canada Cloud Service

Cisco Prime Service Catalog Virtual Appliance Quick Start Guide 2

Managing VMware vcenter Site Recovery Manager

cloudbase-init Documentation

Active System Manager Release 8.3 User s Guide

CloudStack Administration Guide

Active System Manager Release 8.2 User s Guide

OpenNebula on VMware: Cloud Reference Architecture

Ixia Developer KVM over CentOS deployment and configuration steps:

Apache CloudStack CloudStack Administrator's Guide

Configuring Global Service Profiles

Installation of Lubuntu Linux, Koha, DSpace and other software using LibLiveCD

Installing Cisco CMX in a VMware Virtual Machine

Configure HyperFlex Hardware Acceleration Cards

Installing and Upgrading Cisco Network Registrar Virtual Appliance

Automated Deployment of Private Cloud (EasyCloud)

Installing and Configuring Oracle VM on Oracle Cloud Infrastructure ORACLE WHITE PAPER NOVEMBER 2017

User Workspace Management

How do I patch custom OEM images? Are ESXi patches cumulative? VMworld 2017 Do stateless hosts keep SSH & SSL identities after reboot? With Auto Deplo

Securing Containers Using a PNSC and a Cisco VSG

Securing Containers Using a PNSC and a Cisco VSG

Configure the Cisco DNA Center Appliance

ISO Installation Guide. Version 1.2 December 2015

Adding and Configuring PXE Boot Requests

VMware Integrated OpenStack User Guide

Cisco UCS Director Baremetal Agent Installation and Configuration Guide, Release 5.0

Adding and Configuring PXE Boot Requests

This video is part of the Microsoft Virtual Academy.

Production Installation and Configuration. Openfiler NSA

70-745: Implementing a Software-Defined Datacenter

Active System Manager Release User s Guide

Installing Cisco Nexus 1000V for KVM

Version 1.24 Installation Guide for On-Premise Uila Deployment Hyper-V

RHOSP 12 Director Installation on MaxCore TM Platform

Multiple Disk VM Provisioning

Using the vrealize Orchestrator OpenStack Plug-In 2.0. Modified on 19 SEP 2017 vrealize Orchestrator 7.0

Red Hat CloudForms 4.0

SOA Software API Gateway Appliance 6.3 Administration Guide

DesktopPlayer for Windows

VMware Integrated OpenStack User Guide. VMware Integrated OpenStack 4.1

ZeroStack Quick Start Guide

Xen and CloudStack. Ewan Mellor. Director, Engineering, Open-source Cloud Platforms Citrix Systems

Red Hat Satellite 6.4

Windows Azure Services - At Different Levels

Installing and Configuring Oracle VM on Oracle Cloud Infrastructure O R A C L E W H I T E P A P E R D E C E M B E R

Cluster Server Generic Application Agent Configuration Guide - AIX, Linux, Solaris

Building a Big IaaS Cloud. David /

OCP Ready. and OCP Checkbox Overview

IaaS Integration for Multi- Machine Services. vrealize Automation 6.2

Red Hat Satellite 6.3

Creating a 2 node virtual SQL Server 2008 Cluster Configuration Using Windows 2003 MSCS

Installation and setup guide of 1.1 demonstrator

FileCruiser VM Quick Configuration Guide For Trial Version V1.0

Installing VMware vsphere 5.1 Components

Using DC/OS for Continuous Delivery

ECDS MDE 100XVB Installation Guide on ISR G2 UCS-E and VMWare vsphere Hypervisor (ESXi)

Red Hat Satellite 6.4

BRINGING HOST LIFE CYCLE AND CONTENT MANAGEMENT INTO RED HAT ENTERPRISE VIRTUALIZATION. Yaniv Kaul Director, SW engineering June 2016

Dell Lifecycle Controller Integration Version for Microsoft System Center 2012 Virtual Machine Manager User s Guide

KEMP360 Central - VMware vsphere. KEMP360 Central using VMware vsphere. Installation Guide

The article performs the following task:-

ElasterStack 3.2 User Administration Guide - Advanced Zone

DEPLOYING A 3SCALE API GATEWAY ON RED HAT OPENSHIFT

LENS Server Maintenance Guide JZ 2017/07/28

vcenter Operations Management Pack for NSX-vSphere

Gnostice StarDocs On-Premises API Virtual Appliance

OpenManage Integration for VMware vcenter Quick Install Guide for vsphere Client, Version 2.3.1

ForeScout Extended Module for ServiceNow

CPM. Quick Start Guide V2.4.0

Cisco ACI with Cisco AVS

HP FlexFabric Virtual Switch 5900v Technology White Paper

Let s manage agents. Tom Sightler, Principal Solutions Architect Dmitry Popov, Product Management

VMware Infrastructure Planner

Transcription:

MaaS Integration for Baremetal Provisioning in Cloudstack References Introduction High level use cases Document History Functional requirements & non-requirements Architecture and Design description Assumptions Design Adding MaaS provider Adding Hosts Adding templates Service Offering Create VM Workflow Stop VM Workflow Destroy VM Workflow Bonding Support Curtin Setup for Cloud-init IP Clearance References CLOUDSTACK-9913 - Getting issue details... STATUS Introduction Metal-as-a-Service (MaaS) is a project by Canonical to enable provisioning of baremetal servers. MaaS has plenty of features which make it very lucrative to be used as a baremetal orchestrator in Cloudstack. Some of the features of MaaS include Full API Support Official support for CentOS, Ubuntu and Windows images IPv6 support Can be deployed in a HA configuration Network bonding support Disk erase support Device auto-discovery Support for various power types and Chasis Disk and partition management This feature aims to add MaaS as an external baremetal provisioner in Advanced networks in Cloudstack. This does not replace the existing baremetal offering by Cloudstack. High level use cases 4. A user should be able to provision baremetal servers using MaaS in a zone with Advanced networking The provisioned servers should support bonding on the interface (if it is possible) The provisioned servers should be able to be added to multiple networks When the servers are released, the disk should be erased before returning to the user Document History Version Author Date Changes v0 Syed Ahmed 09-May-2017 Initial Draft Functional requirements & non-requirements

Allow a configurable option to enable MaaS for baremetal provisioning in Cloudstack Allow a configurable option to pass the information (IP, keys etc) required to connect to Cloudstack Adding a baremetal host by admin in Cloudstack should also add and commission the host on MaaS If the host is already present in MaaS it should be picked up by Cloudstack 4. Removing a baremetal host from Cloudstack should not remove the host from MaaS. This is done to prevent cases where Cloudstack may run into a bad state, should not affect MaaS 5. When a Baremetal is provisioned with a network, the ToR switches should be configured correctly to reflect the right VLAN 6. When additional networks are added to the baremetal from Cloudstack, the Top-of-Rack (ToR) switch should also be configured with respective VLANs removed from the baremetal from Cloudstack, the ToR switches should also release the VLANs 7. 8. 9. A user should be able to add a baremetal template which corresponds to the MaaS image. The URL field in the template specifies which MaaS template to use. A user should be able to delete a baremetal template from Cloudstack When a baremetal is provisioned: if the host has more than one physical interface connected to the switch as described by the rack config, MaaS will bond the interfaces if only one physical interface is present, MaaS should use that interface 10. When a baremetal is deleted: The ToR switch should be configured to remove the VLANs The disk should be deleted by MaaS. A config option to select between full disk erase or a fast disk erase may be used Architecture and Design description Assumptions 4. 5. 6. 7. MaaS will have its own network where it can PXE boot hosts (PXE network) MaaS will run and control a DHCP server in the PXE network When no VLAN is configured on the ToR switches, the host will be in the PXE network (ie default trunk VLAN is the PXE network) the IPMI is reachable from both Cloudstack and MaaS server MaaS images will be managed independently from Cloudstack CentOS, Ubuntu and Windows are the only OSes that are currently supported Only root disks are supported. No data disk support Design Adding MaaS provider There are two settings to enable MaaS in Cloudstack. The first setting defines which class to use for the baremetal resource external.baremetal.resource.classname = org.apache.cloudstack.compute.maas.maasresourceprovider This setting will enable MaaS as the handler for baremetal resources instead of <DEFAULT_BAREMETAL_CLASS> The MaasResourceProvider is configured via the following setting external.baremetal.system.url = MaasIP=1730.75;MaasKey=fGWswZhpUQrrKUxprD; MaasSecret=CUaKSPXngrtRGRACtLLQKCYLqrQxPgTC;MaasConsumerKey=6sxtWH3XCfKgkspC8J A typical MaaS key is of the form <MaasConsumerKey>:<MaasKey>:<MaasSecret> for example, the above URL is derived from the following MaaS key 6sxtWH3XCfKgkspC8J:fGWswZhpUQrrKUxprD:CUaKSPXngrtRGRACtLLQKCYLqrQxPgTC Adding Hosts Before adding hosts. We will setup the rack configuration. This is a JSON describing the layout of the hosts and how they are connected to the ToR switch. A sample rack config looks something like this:

{ } rack.conf example "racks": [ { "l2switch": { "ip": "1730.109", "username": "admin", "password": "password", "type": "Force10" }, "hosts": [ { "mac": "00:18:8b:52:79:80", "port": "1/1/1" } ] } ] The rack config can be added from the Global Settings -> Baremetal Rack Configuration tab. Once this is done, the hosts are added using the Infrastructure -> Hosts -> Add button. Make sure that the baremetal cluster is selected (if no baremetal cluster exists, create one first)

The IP/user/password/MAC are the IPMI credentials. CPU, # of Cores and Memory define the dimensions of the physical server. Cloudstack periodically checks the power of the host using IPMI. Adding templates Adding MaaS templates is similar to adding any other template except the URL field reflects the name of MaaS image. In the screenshot, centos7 is the name of the image in MaaS. This Doesn't download the image as it would do in a traditional image but creates a DB entry and the URL is passed to MaaS when the host is provisioned. Service Offering When creating a compute offering, make sure that BareMetalPlanner is selected and the CPU/Memory details match the host that was added

Create VM Workflow When a host is provisioned, a StartCommand is issued by cloud-server. This command is handled by the MaasResourceProvider. The provider verifies a list of constraints like The host exists in the DB, a default NIC is present on the host, the default NIC belongs to a valid network, the node is already discovered by MaaS. The plugin proceeds to the provisioning stage.there are two possible cases This is a new Baremetal VM that was provisioned The plugin checks if bonding can be enabled on the host. This is done by looking at the rack config and finding out the interfaces that are connected to the ToR. If there are more than one interfaces connected, the plugin attempts to bond those interfaces together. If it is not possible, then the provisining continues with a single NIC In both cases, the plugin sets up the MAC address of the interface to the one that is allocated by Cloudstack. This is needed because the DHCP request for this VM can be only recieved if the host's MAC and the mac generated by Cloudstack match. The next step is to call the deploymachine API of MaaS which installs the OS on the baremetal host. Once this call returns, our host is ready to be started 4. The plugin changes the VLAN on the ToR switch on the interfaces configured to the VLAN of the default NIC. After this, the host is in the correct netowrk. 5. The plugin sends a command to the IPMI set the first boot device to hard drive (intead of network) 6. Finally, it sends another IPMI command to boot the host. 7. Once the host is running, This is an already provisioned Baremetal VM that was in stopped state and is starting now In this case, the lasthostid field is set on the VM object and it is equal to the hostid of the physical host that handled the StartCommand request and the status of this node in MaaS is also Deployed (instead of Ready) Since the host is already deployed and in the correct network, the plugin issues an IPMI command to boot the host. When the host boots up, it gets the IP address from the VR that is running in the same network. Stop VM Workflow This is very simple. When a user stops a Baremetal VM, cloud-server sends the StopCommand to the MaaS plugin. The plugin will just issue an IPMI shutdown command and return back. Destroy VM Workflow A new command call DestroyCommand is added to Cloudstack. MaaS plugin handles this command and does the following

4. Shuts down the host by issuing an IPMI shutdown command Removes the VLAN from all the interfaces of the host that are connected to the ToR switch. After this, the host is in the PXE network which is accessible from MaaS Change the Boot order via IPMI to boot from network first Issues a releasemachine API call to MaaS which will PXE boot the host and erase the disk Bonding Support Bonding support is currently only tested for CentOS. Bonding is only done if there are more than one interface that are connected to the ToR from the physical host. The bonding mode is set to active-backup. Curtin Setup for Cloud-init You can modify the default template from MaaS by using preseed scripts. Below is an example of a script that removes cloud-init and sets the root password to "password". userdata in MAAS (/etc/maas/preseeds/curtin_userdata_centos) root@coe-hq-maas01: /etc/maas/preseeds # cat curtin_userdata_centos #cloud-config debconf_selections: maas: {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} syed-test: - &myscript #/bin/bash SCRIPT=$(readlink -f "$0"); if [ -f "/root/.init_done" ] then sed -i 's/yum remove -y cloud-init//' /etc/rc.local echo "Done done" > /root/.init_message exit fi # yum remove -y cloud-init echo "############### REMOVE CLOUD INIT ############ " echo "yum remove -y cloud-init" >> /etc/rc.local touch /root/.init_done echo "echo "password" passwd root --stdin" >> /etc/rc.local late_commands: maas: [wget, '--no-proxy', '{{node_disable_pxe_url}}', '--post-data', '{{node_disable_pxe_data}}', '-O', '/dev/null'] test_syed_script: ['curtin', 'in-target', '--', 'sh', '-c', *myscript ] power_state: mode: reboot IP Clearance No external dependecies are being added for this feature. All code will be developed within Cloudstack s scope.