You can deploy the Ubuntu 20.04 LTS operating system on a server using a server YAML file or a hardware profile. Optionally, you can also use a Netplan configuration file to configure network bonding during the operating system deployment. For example, if you want to set up access to the server using SSH.
The following sample YAML files show the attributes and values for Ubuntu 20.04 LTS deployment on Dell PowerEdge 14th generation servers, Dell PowerEdge 15th generation servers, and validated HPE iLO servers.
The hardware profile includes a sample network bonding configuration in the configdata
section.
- These files are only for reference. You must use the sample files provided with Bare Metal Orchestrator deployment.
- The comments in the YAML file start with a hash character (#) and are followed by a text or the name of the attribute. You can remove # to un-comment and edit the attribute value.
- Replace what appears between italicized, bold chevrons (
< >
) with user-supplied content. For example:password: <REPLACE_THIS>
Sample server YAML file for Ubuntu 20.04 LTS deployment
apiVersion: mw.dell.com/v4
kind: Server
metadata:
name: ubuntu-os
labels:
site: gc
spec:
bmcEndPoint: "https://<BMC-IP>"
userName: <USERNAME>
password: <PASSWORD>
powerstate: "On"
bios:
attributes:
bootMode: Uefi
# For R650/R750 use 'Com2' otherwise 'Com1'
serialPortAddress: <REPLACE_THIS>
bmc:
- attributes:
rfsIgnoreCertWarning: "Yes"
serialRedirectEnable: Enabled
# This YAML support only Ubuntu 20.04
operatingsystemname: "ubuntu-media"
operatingsystemconfig:
autoConfigureBoss: false
networkingDetails:
hostName: <REPLACE_THIS>
dnsServer:
- <REPLACE_THIS>
ipAddressDetails:
ipAddress: <REPLACE_THIS>
gateway: <REPLACE_THIS>
# installVolumeID: "Disk.Virtual.0:RAID.Slot.2-1"
installVolumeTypeOrder:
- type: BOSS
- type: SDCARD
- type: NVME
- type: RAID
name: "NAME_OF_VIRTUAL_DISK"
- type: HBA
configtype: "cloud-init"
configdata: |
#cloud-config
autoinstall:
drivers:
install: false
identity:
# do not replace this.
hostname: {{.OSNetworkingDetails.HostName}}
# command to encrypt a password
# openssl passwd -1 -stdin <<< <PASSWORD>
password: <REPLACE_WITH_ENCODED_PASSWORD>
# Name of user.
realname: <REPLACE_THIS>
# User login info. May match 'realname'.
username: <REPLACE_THIS>
kernel:
package: linux-generic
apt:
# true merges the source List
# false replaces the default souce list
preserve_sources_list: false
# to configure apt-get to install packages from special repos
# configure new repo addresses here
primary:
- arches: [i386, amd64]
uri: "http://archive.ubuntu.com/ubuntu"
- arches: [default]
uri: "http://ports.ubuntu.com/ubuntu-ports"
# used to choose closest mirror
geoip: true
# packages is Optional stanza, please uncomment to install packages during
# installation. Example package name: dkms. A working network configuration is
# needed access repositories.
# packages:
# - <PACKAGE_NAME>
keyboard:
layout: us
toggle: null
variant: ''
locale: en_US.UTF-8
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
layout:
name: lvm
match:
# Do not remove this.
# It will be automatically updated with the serial number of the
# storage device.
serial: DEVICE_SERIAL_NUMBER
network:
version: 2
ethernets:
# Arbitrary ID only used for reference. Create another stanza to match
# multiple NICs. If using multiple NICs use unique ids.
id0:
match:
#for more filter parameters, please refer to netplan documentation
macaddress: <REPLACE_THIS>
# Optional: Only use if you want to change interface name for the NIC
set-name: {{.OSNetworkingDetails.IPDetails.NICName}}
# If dhcp server will be used then
# delete the `addresses`/'gateway'/'namesevers' stanza and uncomment
# the dhcp4 line below
#dhcp4: true
#Define the bond static IP and gateway
# not needed if dhcp is set true
addresses:
- {{.OSNetworkingDetails.IPDetails.IPAddress}}
# not needed if dhcp is set true
gateway4: {{.OSNetworkingDetails.IPDetails.Gateway}}
# not needed if dhcp is set true
nameservers: not needed if dhcp is set true
addresses:
{{.OSNetworkingDetails.IPDetails.dnsServer}}
early-commands:
- |
#!/usr/bin/env bash
PICKFIRSTVOLUME={{.PickFirstVolume}}
TARGET={{.Target}}
SERIALNUMBER={{.SerialNumber}}
DEVICETYPE={{.DeviceType}}
auto_install_serial_number="*"
case $DEVICETYPE in
"hba") PCI="$(lspci | grep -i sas | awk '{print $1}')"
DeviceName="$(ls -al /sys/block | grep $PCI | head -n 1 | awk '{print $9}')"
;;
"nvme") DeviceName="$(ls -al /dev/disk/by-id/ | grep $SERIALNUMBER | awk '{print $11}' | cut -c 7- | head -n 1)"
;;
"raid") if [ $PICKFIRSTVOLUME = "Yes" ]; then
PCI="$(lspci | grep -i 'RAID bus controller' | awk '{print $1}' | head -n1)"
DeviceName="$(ls -al /dev/disk/by-path/ | grep ${PCI} | head -n 1 | cut -d '/' -f3)"
else
PCI="$(lspci | grep -i 'RAID bus controller')"
# For series 11 PERC controller
if [ $PCI = *"12GSAS/PCIe Secure"* ]; then
TARGET="$((TARGET - 128))"
fi
pcislot="$(echo $PCI | awk '{print $1}')"
DeviceName="$(ls -al /dev/disk/by-path/ | awk -F ${pcislot} '{print $2}' | awk -F: -v var="$TARGET" '{ if($3 == var && $4 !~ "part") print $4 }' | awk -F\/ '{print $3}')"
fi
;;
"usb") DeviceName="$(ls -al /dev/disk/by-id | grep usb | awk '{print $11}' | cut -c 7- | head -n 1)"
;;
"boss") DeviceName="$(ls -al /dev/disk/by-id/ | grep -i ata | awk '{print $11}' | cut -c 7- | head -n 1)"
;;
esac
auto_install_serial_number="$(udevadm info --query=all --name=$DeviceName | grep -i id_serial= | cut -d '=' -f 2)"
sed -i "s/DEVICE_SERIAL_NUMBER/$auto_install_serial_number/g" /autoinstall.yaml
user-data:
runcmd:
- |
#!/usr/bin/env bash
echo -e "sol_verify_complete" > /dev/ttyS1
echo -e "bmo_driver_details" > /dev/ttyS1
echo -e "bmo_driver_details" > /dev/ttyS1
echo -e "bmo_ip_details_delimiter" > /dev/ttyS1
echo "$(ip -4 addr |egrep "en[a-z][0-9]+|eth[0-9]+" | grep "inet" | cut -d " " -f 11):$(hostname -I | cut -d " " -f 1)" > /dev/ttyS1
echo -e "bmo_ip_details_delimiter" > /dev/ttyS1
updates: security
version: 1
Sample hardware profile YAML file for Ubuntu 20.04 LTS deployment with network bonding configured
apiVersion: mw.dell.com/v4
kind: HardwareProfile
metadata:
name: hwp-ubuntu-os
labels:
site: gc
spec:
apply: false
preview: true
# Add fields here
server:
powerState: "On"
bios:
attributes:
bootMode: Uefi
# For R650/R750 use 'Com2' otherwise 'Com1'
serialPortAddress: <REPLACE_THIS>
bmc:
- attributes:
serialRedirectEnable: Enabled
rfsIgnoreCertWarning: "Yes"
# This YAML supports only Ubuntu 20.04
operatingsystemname: "ubuntu-media"
operatingsystemconfig:
autoConfigureBoss: false
#installVolumeID: "Disk.Virtual.0:RAID.Slot.2-1"
networkingDetails:
hostName: <REPLACE_THIS>
installVolumeTypeOrder:
- type: BOSS
- type: SDCARD
- type: NVME
- type: RAID
name: "NAME_OF_VIRTUAL_DISK"
- type: HBA
configtype: "cloud-init"
configdata: |
#cloud-config
autoinstall:
drivers:
install: false
identity:
hostname: {{.OSNetworkingDetails.HostName}}
# command to encrypt a password
# openssl passwd -1 -stdin <<< <PASSWORD>
password: <REPLACE_WITH_ENCODED_PASSWORD>
# Name of user.
realname: <REPLACE_THIS>
# User login info. May match 'realname'.
username: <REPLACE_THIS>
kernel:
package: linux-generic
apt:
# true merges the source List
# false replaces the default souce list
preserve_sources_list: false
# to configure apt-get to install packages from special repos
# configure new repo addresses here
primary:
- arches: [i386, amd64]
uri: "http://archive.ubuntu.com/ubuntu"
- arches: [default]
uri: "http://ports.ubuntu.com/ubuntu-ports"
# used to choose closest mirror
geoip: true
# packages is Optional stanza, please uncomment to install packages during
# installation, but this needs a working network configuration
# to access repositories.
# packages:
# - <PACKAGE_NAME>
keyboard:
layout: us
toggle: null
variant: ''
locale: en_US.UTF-8
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
layout:
name: lvm
match:
#Do not remove this. It will be automatically updated with the
#serial number of the storage device.
serial: DEVICE_SERIAL_NUMBER
network:
version: 2
ethernets:
# Arbitrary ID only for reference. Does not affect the name of the interface
# id0 will be used to create bonds
id0:
match:
# Follows Naming convetion of Ubuntu
# Prefix: en--> Ethernet
# Prefix: wl--> Wireless Local network.
# Prefix: ww--> Wireless wide area network
# this selects all interfaces of Ethernet interfaces
# id0 is the group with all ethernet connections
# for more filter parameters, refer to the netplan documentation
name: en*
dhcp4: false
bonds:
bond0: # name of the bond
#set all the physical interfaces grouped by id0 for the bond0
interfaces:
#use ids specified in ethernets stanza
- id0
dhcp4: true
early-commands:
- |
#!/usr/bin/env bash
PICKFIRSTVOLUME={{.PickFirstVolume}}
TARGET={{.Target}}
SERIALNUMBER={{.SerialNumber}}
DEVICETYPE={{.DeviceType}}
case $DEVICETYPE in
"hba") PCI="$(lspci | grep -i sas | awk '{print $1}')"
DeviceName="$(ls -al /sys/block | grep $PCI | head -n 1 | awk '{print $9}')"
;;
"nvme") DeviceName="$(ls -al /dev/disk/by-id/ | grep $SERIALNUMBER | awk '{print $11}' | cut -c 7- | head -n 1)"
;;
"raid") if [ $PICKFIRSTVOLUME = "Yes" ]; then
PCI="$(lspci | grep -i 'RAID bus controller' | awk '{print $1}' | head -n1)"
DeviceName="$(ls -al /dev/disk/by-path/ | grep ${PCI} | head -n 1 | cut -d '/' -f3)"
else
PCI="$(lspci | grep -i 'RAID bus controller')"
# For series 11 PERC controller
if [ $PCI = *"12GSAS/PCIe Secure"* ]; then
TARGET="$((TARGET - 128))"
fi
pcislot="$(echo $PCI | awk '{print $1}')"
DeviceName="$(ls -al /dev/disk/by-path/ | awk -F ${pcislot} '{print $2}' | awk -F: -v var="$TARGET" '{ if($3 == var && $4 !~ "part") print $4 }' | awk -F\/ '{print $3}')"
fi
;;
"usb") DeviceName="$(ls -al /dev/disk/by-id | grep usb | awk '{print $11}' | cut -c 7- | head -n 1)"
;;
"boss") DeviceName="$(ls -al /dev/disk/by-id/ | grep -i ata | awk '{print $11}' | cut -c 7- | head -n 1)"
;;
esac
auto_install_serial_number="$(udevadm info --query=all --name=$DeviceName | grep -i id_serial= | cut -d '=' -f 2)"
sed -i "s/DEVICE_SERIAL_NUMBER/$auto_install_serial_number/g" /autoinstall.yaml
user-data:
runcmd:
- |
#!/usr/bin/env bash
echo -e "sol_verify_complete" > /dev/ttyS1
echo -e "bmo_driver_details" > /dev/ttyS1
echo -e "bmo_driver_details" > /dev/ttyS1
echo -e "bmo_ip_details_delimiter" > /dev/ttyS1
echo "$(ip -4 addr |egrep "en[a-z][0-9]+|eth[0-9]+" | grep "inet" | cut -d " " -f 11):$(hostname -I | cut -d " " -f 1)" > /dev/ttyS1
echo -e "bmo_ip_details_delimiter" > /dev/ttyS1
updates: security
version: 1