You can deploy the openSUSE operating system on a server using a server YAML file or a hardware profile.
The following sample YAML files show the attributes and values for openSUSE deployment on Dell PowerEdge R650 and R750 servers.
The autoyast configdata contains sections of XML code. Valid XML elements require a start and end tag. PCDATA that you enter between the start and end tags is parsed. Some but not all elements have attributes associated with them.
- These files are only for reference. You must use the sample files provided with Bare Metal Orchestrator deployment.
- Comments in the YAML file start with a hash character (#) and is followed by a text or the name of the attribute. You can remove # to un-comment and edit the attribute value.
- Comments in the XML sections of the autoyast configdata use the following format:
<!--This is a comment-->
- Replace what appears between italicized, bold chevrons (
< >
) with user-supplied content. For example:password:<REPLACE_THIS>
In the XML sections, chevrons are omitted from user-supplied content fields. For example:
<user_password>REPLACE_THIS</user_password>
Sample server YAML file for openSUSE deployment
apiVersion: mw.dell.com/v4
kind: Server
metadata:
name: opensuse-server1
labels:
site: gc
spec:
bmcEndPoint: "https://<BMC-IP>"
userName: root
password: <REPLACE_THIS>
bios:
attributes:
bootMode: Uefi
serialPortAddress: Com2
bmc:
- attributes:
rfsIgnoreCertWarning: "Yes"
serialRedirectEnable: Enabled
operatingsystemname: "opensuse15.3"
# set overwriteInstallation to true while editing existing servers to overwrite existing OS and to trigger a fresh installation
overwriteInstallation: false
operatingsystemconfig:
autoConfigureBoss: false
#installVolumeID: ""
installVolumeTypeOrder:
- type: BOSS
- type: SDCARD
- type: NVME
- type: HBA
- type: RAID
name: "<VIRTUAL_DISK_NAME>"
configtype: "autoyast"
configdata: |
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<mode>
<!--Confirm is set to false for all the settings to get automatically accepted so that installation can start-->
<confirm config:type="boolean">false</confirm>
<!--Machine shuts down after everything is installed and configured at the end of second stage if set to true-->
<final_halt config:type="boolean">false</final_halt>
</mode>
</general>
<timezone>
<!--Whether the hardware clock uses local time or UTC. Values: localtime/UTC.-->
<hwclock>UTC</hwclock>
<!--Time zone. A list of available time zones can be found under /usr/share/YaST2/data/timezone_raw.ycp-->
<timezone>REPLACE_THIS</timezone>
</timezone>
<networking>
<!--Merge the network config from running system with the one defined in profile using this field-->
<keep_install_network config:type="boolean">true</keep_install_network>
<dns>
<!--Host name, excluding the domain name part-->
<hostname>REPLACE_THIS</hostname>
<nameservers config:type="list">
<!--Name Server IP. Multiple IPs can also be provided by adding the below line with different IP multiple times-->
<nameserver>REPLACE_THIS</nameserver>
</nameservers>
</dns>
<interfaces config:type="list">
<interface>
<!--boot protocol can be static or dhcp. If dhcp is used then only the device name startmode can be supplied-->
<bootproto>static</bootproto>
<!--broadcast IP address (Not required with dhcp bootproto)-->
<broadcast>REPLACE_THIS</broadcast>
<!--Interface name like em1, em2, p1p1 etc-->
<device>REPLACE_THIS</device>
<!--Optional: Ethtool options during device activation. Not required with dhcp bootproto-->
<ethtool_options>autoneg on</ethtool_options>
<!--IP Address assigned to the interface (Not required with dhcp bootproto)-->
<ipaddr>REPLACE_THIS</ipaddr>
<!--Netmask (Not required with dhcp bootproto). for example: 255.255.255.0.-->
<netmask>REPLACE_THIS</netmask>
<!--When to bring up an interface-->
<startmode>onboot</startmode>
</interface>
</interfaces>
<routing>
<routes config:type="list">
<route>
<!--Route Destination (Required with static bootproto, not with dhcp)-->
<destination>default</destination>
<!--Gateway IP address (Required with static bootproto, not with dhcp)-->
<gateway>REPLACE_THIS</gateway>
<!--Interface associated to the route (Required with static bootproto, not with dhcp)-->
<device>REPLACE_THIS</device>
</route>
</routes>
</routing>
</networking>
<!--Optional. Added to automatically start system SSH service after the openssh is installed-->
<services-manager>
<services>
<disable config:type="list"/>
<enable config:type="list">
<service>sshd</service>
</enable>
</services>
</services-manager>
<software>
<install_recommended config:type="boolean">true</install_recommended>
<packages config:type="list">
<!--Required package to run the second stage in the installed system correctly-->
<package>autoyast2-installation</package>
<package>autoyast2</package>
<!--Optional packages. User can add or remove package from this list.-->
<package>openssh</package>
<package>vim-data</package>
<package>zypper</package>
<package>iputils</package>
<package>vim</package>
<package>bash</package>
<package>curl</package>
</packages>
<patterns config:type="list">
<pattern>base</pattern>
</patterns>
</software>
<!--Required for installing OS on a specific drive and formating the data from the drive-->
<partitioning config:type="list">
<drive>
<use>all</use>
<device>/dev/sda</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<format config:type="boolean">true</format>
<mount>/</mount>
<size>max</size>
</partition>
</partitions>
</drive>
</partitioning>
<!--Multiple users can be defined in this section. To be able to login, make sure root user is setup-->
<users config:type="list">
<user>
<!--If encrypted password is provided, set the below field to true-->
<encrypted config:type="boolean">false</encrypted>
<!--Provide plain text password if above value is false. Otherwise SHA512 encrypted password-->
<user_password>REPLACE_THIS</user_password>
<!--Username-->
<username>dell</username>
</user>
<user>
<!--If encrypted password is provided, set the below field to true-->
<encrypted config:type="boolean">true</encrypted>
<!--Provide plain text password if above value is false. Otherwise SHA512 encrypted password. -->
<user_password>REPLACE_THIS</user_password>
<!--Username-->
<username>root</username>
</user>
</users>
<!--REQUIRED: Below section is critical for a successful OS installation. Please don't change-->
<scripts>
<pre-scripts config:type="list">
<script>
<filename>repartition.sh</filename>
<interpreter>shell</interpreter>
<source>
<![CDATA[#
PICKFIRSTVOLUME={{.PickFirstVolume}}
SASADDRESS={{.SASAddress}}
TARGET={{.Target}}
SERIALNUMBER={{.SerialNumber}}
DEVICETYPE={{.DeviceType}}
cp /tmp/profile/autoinst.xml /tmp/profile/modified.xml
case $DEVICETYPE in
### NVMe ###
"nvme") DEVICENAME="$(ls -al /dev/disk/by-id/ | grep $SERIALNUMBER | awk '{print $11}' | cut -c 7- | head -n 1)"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### SD CARD ###
"usb") DEVICENAME="$(ls -al /dev/disk/by-id | grep usb | awk '{print $11}' | cut -c 7- | head -n 1)"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### HBA ###
"hba") PCI="$(lspci | grep -i sas | awk '{print $1}')"
DEVICENAME="$(ls -al /sys/block | grep $PCI | head -n 1 | awk '{print $9}')"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### BOSS ###
"boss") DEVICENAME="$(ls -al /dev/disk/by-id/ | grep -i ata | awk '{print $11}' | cut -c 7- | head -n 1)"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### RAID ###
"raid") if [[ $PICKFIRSTVOLUME == "Yes" ]]; then
DEVICENAME="$(lsscsi -u | awk -F: '{print $3"\t"$4}' | awk -v var1="${SASADDRESS:5}" '{ if($4 ~ var1) print $5}' | head -1 )"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME:5}<\/device>/g" /tmp/profile/modified.xml
else
PCI="$(lspci | grep -i 'RAID bus controller')"
if [[ $PCI == *"12GSAS/PCIe Secure"* ]]; then
TARGET="$((TARGET - 128))"
fi
DEVICENAME="$(lsscsi -u | awk -F: '{print $3"\t"$4}' | awk -v var1="${SASADDRESS:5}" -v var2="$TARGET" '{ if($4 ~ var1 && $1==var2) print $5}')"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME:5}<\/device>/g" /tmp/profile/modified.xml
fi
;;
esac
]]>
</source>
</script>
</pre-scripts>
<post-scripts config:type="list">
<script>
<filename>init-script-end.sh</filename>
<interpreter>shell</interpreter>
<source>
<![CDATA[#
!bin/sh
echo sol_verify_complete bmo_ip_details_delimiter TBD bmo_ip_details_delimiter > /dev/ttyS1
exit 0
]]>
</source>
</script>
</post-scripts>
</scripts>
</profile>
Sample hardware profile YAML file for openSUSE deployment
apiVersion: mw.dell.com/v4
kind: HardwareProfile
metadata:
name: hwp-suse-os-install
labels:
site: gc
spec:
apply: false
preview: true
selectors:
model: dell-R750
# Add fields here
server:
bios:
attributes:
bootMode: Uefi
serialPortAddress: Com2
bmc:
- attributes:
rfsIgnoreCertWarning: "Yes"
serialRedirectEnable: Enabled
operatingsystemname: "opensuse15.3"
# set overwriteInstallation to true while editing existing servers to overwrite existing OS and to trigger a fresh installation
overwriteInstallation: false
operatingsystemconfig:
autoConfigureBoss: true
#installVolumeID: ""
installVolumeTypeOrder:
- type: BOSS
- type: SDCARD
- type: NVME
- type: HBA
- type: RAID
name: "<VIRTUAL_DISK_NAME>"
configtype: "autoyast"
configdata: |
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<mode>
<!--Confirm is set to false for all the settings to get automatically accepted so that installation can start-->
<confirm config:type="boolean">false</confirm>
<!--Machine shuts down after everything is installed and configured at the end of second stage if set to true-->
<final_halt config:type="boolean">false</final_halt>
</mode>
</general>
<timezone>
<!--Whether the hardware clock uses local time or UTC. Values: localtime/UTC.-->
<hwclock>UTC</hwclock>
<!--Time zone. A list of available time zones can be found under /usr/share/YaST2/data/timezone_raw.ycp-->
<timezone>REPLACE_THIS</timezone>
</timezone>
<networking>
<!--Merge the network config from running system with the one defined in profile using this field-->
<keep_install_network config:type="boolean">true</keep_install_network>
<dns>
<!--Host name, excluding the domain name part-->
<hostname>REPLACE_THIS</hostname>
<nameservers config:type="list">
<!--Name Server IP. Multiple IPs can also be provided by adding the below line with different IP multiple times-->
<nameserver>REPLACE_THIS</nameserver>
</nameservers>
</dns>
<interfaces config:type="list">
<interface>
<!--boot protocol can be static or dhcp. If dhcp is used then only the device name startmode can be supplied-->
<bootproto>static</bootproto>
<!--broadcast IP address (Not required with dhcp bootproto)-->
<broadcast>REPLACE_THIS</broadcast>
<!--Interface name like em1, em2, p1p1 etc-->
<device>REPLACE_THIS</device>
<!--Optional: Ethtool options during device activation. Not required with dhcp bootproto-->
<ethtool_options>autoneg on</ethtool_options>
<!--IP Address assigned to the interface (Not required with dhcp bootproto)-->
<ipaddr>REPLACE_THIS</ipaddr>
<!--Netmask (Not required with dhcp bootproto). for example: 255.255.255.0.-->
<netmask>REPLACE_THIS</netmask>
<!--When to bring up an interface-->
<startmode>onboot</startmode>
</interface>
</interfaces>
<routing>
<routes config:type="list">
<route>
<!--Route Destination (Required with static bootproto, not with dhcp)-->
<destination>default</destination>
<!--Gateway IP address (Required with static bootproto, not with dhcp)-->
<gateway>REPLACE_THIS</gateway>
<!--Interface associated to the route (Required with static bootproto, not with dhcp)-->
<device>REPLACE_THIS</device>
</route>
</routes>
</routing>
</networking>
<!--Optional. Added to automatically start system SSH service after the openssh is installed-->
<services-manager>
<services>
<disable config:type="list"/>
<enable config:type="list">
<service>sshd</service>
</enable>
</services>
</services-manager>
<software>
<install_recommended config:type="boolean">true</install_recommended>
<packages config:type="list">
<!--Required package to run the second stage in the installed system correctly-->
<package>autoyast2-installation</package>
<package>autoyast2</package>
<!--Optional packages. User can add or remove package from this list.-->
<package>openssh</package>
<package>vim-data</package>
<package>zypper</package>
<package>iputils</package>
<package>vim</package>
<package>bash</package>
<package>curl</package>
</packages>
<patterns config:type="list">
<pattern>base</pattern>
</patterns>
</software>
<!--Required for installing OS on a specific drive and formating the data from the drive-->
<partitioning config:type="list">
<drive>
<use>all</use>
<device>/dev/sda</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<format config:type="boolean">true</format>
<mount>/</mount>
<size>max</size>
</partition>
</partitions>
</drive>
</partitioning>
<!--Multiple users can be defined in this section. To be able to login, make sure root user is setup-->
<users config:type="list">
<user>
<!--If encrypted password is provided, set the below field to true-->
<encrypted config:type="boolean">false</encrypted>
<!--Provide plain text password if above value is false. Otherwise SHA512 encrypted password-->
<user_password>REPLACE_THIS</user_password>
<!--Username-->
<username>dell</username>
</user>
<user>
<!--If encrypted password is provided, set the below field to true-->
<encrypted config:type="boolean">true</encrypted>
<!--Provide plain text password if above value is false. Otherwise SHA512 encrypted password. -->
<user_password>REPLACE_THIS</user_password>
<!--Username-->
<username>root</username>
</user>
</users>
<!--REQUIRED: Below section is critical for a successful OS installation. Please don't change-->
<scripts>
<pre-scripts config:type="list">
<script>
<filename>repartition.sh</filename>
<interpreter>shell</interpreter>
<source>
<![CDATA[#
PICKFIRSTVOLUME={{.PickFirstVolume}}
SASADDRESS={{.SASAddress}}
TARGET={{.Target}}
SERIALNUMBER={{.SerialNumber}}
DEVICETYPE={{.DeviceType}}
cp /tmp/profile/autoinst.xml /tmp/profile/modified.xml
case $DEVICETYPE in
### NVMe ###
"nvme") DEVICENAME="$(ls -al /dev/disk/by-id/ | grep $SERIALNUMBER | awk '{print $11}' | cut -c 7- | head -n 1)"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### SD CARD ###
"usb") DEVICENAME="$(ls -al /dev/disk/by-id | grep usb | awk '{print $11}' | cut -c 7- | head -n 1)"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### HBA ###
"hba") PCI="$(lspci | grep -i sas | awk '{print $1}')"
DEVICENAME="$(ls -al /sys/block | grep $PCI | head -n 1 | awk '{print $9}')"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### BOSS ###
"boss") DEVICENAME="$(ls -al /dev/disk/by-id/ | grep -i ata | awk '{print $11}' | cut -c 7- | head -n 1)"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME}<\/device>/g" /tmp/profile/modified.xml
;;
### RAID ###
"raid") if [[ $PICKFIRSTVOLUME == "Yes" ]]; then
DEVICENAME="$(lsscsi -u | awk -F: '{print $3"\t"$4}' | awk -v var1="${SASADDRESS:5}" '{ if($4 ~ var1) print $5}' | head -1 )"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME:5}<\/device>/g" /tmp/profile/modified.xml
else
PCI="$(lspci | grep -i 'RAID bus controller')"
if [[ $PCI == *"12GSAS/PCIe Secure"* ]]; then
TARGET="$((TARGET - 128))"
fi
DEVICENAME="$(lsscsi -u | awk -F: '{print $3"\t"$4}' | awk -v var1="${SASADDRESS:5}" -v var2="$TARGET" '{ if($4 ~ var1 && $1==var2) print $5}')"
sed -i "s/<device>\/dev\/sda<\/device>/<device>\/dev\/${DEVICENAME:5}<\/device>/g" /tmp/profile/modified.xml
fi
;;
esac
]]>
</source>
</script>
</pre-scripts>
<post-scripts config:type="list">
<script>
<filename>init-script-end.sh</filename>
<interpreter>shell</interpreter>
<source>
<![CDATA[#
!bin/sh
echo sol_verify_complete bmo_ip_details_delimiter TBD bmo_ip_details_delimiter > /dev/ttyS1
exit 0
]]>
</source>
</script>
</post-scripts>
</scripts>
</profile>