Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

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 Workflow

A new command call DestroyCommand is added to Cloudstack. MaaS plugin handles this command and does the following

  1. Shuts down the host

...

  1. by issuing an IPMI shutdown command
  2. 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
  3. Change the Boot order via IPMI to boot from network first
  4. Issues a releaseMachine API call to MaaS which will PXE boot the host and erase the disk

 

Destroy Workflow

...

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

Code Block
titleuserdata 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

 abcd

IP Clearance

No external dependecies are being added for this feature. All code will be developed within Cloudstack’s scope.