use SRV_SLAVE1 for os install and detect SRV_OEM 28/528/1
authordavidplunkett <dp7642@att.com>
Sat, 30 Mar 2019 00:48:21 +0000 (00:48 +0000)
committerdavidplunkett <dp7642@att.com>
Sat, 30 Mar 2019 00:48:21 +0000 (00:48 +0000)
Change-Id: Ic4b50caa5a9730313010ca2dd9cf665787cae905
Signed-off-by: davidplunkett <dp7642@att.com>
boot.ipxe.template
install_server_os.sh
serverrc.template

index 4bdf9cf..b7c986f 100644 (file)
@@ -21,7 +21,7 @@
     set myip @@SRV_IP@@
     set mynm @@SRV_NETMASK@@
     set mygw @@SRV_GATEWAY@@
-    set myinterface interface=@@SRV_BLD_INF@@
+    set myinterface interface=@@SRV_SLAVE1@@
     set mystaticnet netcfg/disable_autoconfig=true netcfg/vlan_id=@@SRV_VLAN@@ netcfg/get_ipaddress=@@SRV_IP@@ netcfg/get_netmask=@@SRV_NETMASK@@ netcfg/get_gateway=@@SRV_GATEWAY@@ netcfg/get_nameservers=@@SRV_DNS@@ netcfg/get_domain=@@SRV_DOMAIN@@ netcfg/confirm_static=true
     set ramdisk root=/dev/ram0 load_ramdisk=1 ramdisk_size=524288
     set iname initrd-@@SRV_OSVER@@
index b9796f8..1ab6628 100755 (executable)
@@ -165,8 +165,10 @@ if ! ping -c 3 $SRV_OOB_IP | grep time= ; then
 fi
 
 ## COLLECT ANY ADDITIONAL SERVER DATA NEEDED - FOR EXAMPLE, LOOKUP MAC FOR DELL NIC
+SRV_OEM=$(curl --insecure https://$SRV_OOB_IP/redfish/v1/ | grep -Poe '(?<="Oem":{")[^"]*(?=")')
+echo "Identified server as OEM [$SRV_OEM] using oob [$SRV_OOB_IP]"
 case $SRV_OEM in
-    Dell|DELL)
+    Dell)
     if [ -z "$SRV_MAC" ]; then
         SRV_MAC=$(. $REDFISH_ROOT/get_dellnicmac.sh --nic $SRV_HTTP_BOOT_DEV)
         if [ "$?" -ne 0 ]; then
@@ -176,7 +178,7 @@ case $SRV_OEM in
         echo "Using SRV_MAC [$SRV_MAC] for nic [$SRV_HTTP_BOOT_DEV]"
     fi
     ;;
-    HP|HPE)
+    Hpe)
     if [ -z "$SRV_MAC" ]; then
         echo "ERROR:  HPE required variable SRV_MAC missing from rc file [$RCFILE]"
         exit 1;
@@ -314,7 +316,7 @@ fi
 
 ## CREATE CONFIG FILES AND APPLY UNLESS CALLED WITH --no-apply-hw
 case $SRV_OEM in
-    Dell|DELL)
+    Dell)
         if [ -n "$SRV_BIOS_TEMPLATE" ]; then
             . $REDFISH_ROOT/apply_dellxml.sh --template $SRV_BIOS_TEMPLATE
             echo "Completed update with status [$?]"
@@ -327,7 +329,7 @@ case $SRV_OEM in
             sleep 20
         fi
     ;;
-    HP|HPE)
+    Hpe)
         if [ -n "$SRV_BIOS_TEMPLATE" ]; then
             . $REDFISH_ROOT/apply_hpejson.sh --template $SRV_BIOS_TEMPLATE
             echo "Completed update with status [$?]"
index 08a34c8..b513bcf 100644 (file)
@@ -20,9 +20,6 @@
 # host name for server
 SRV_NAME=aknode44
 
-# server oem - Dell or HPE (case sensitive)
-SRV_OEM=Dell
-
 # out of band interface information for server (idrac/ilo/etc)
 SRV_OOB_IP=192.168.41.254
 SRV_OOB_USR=root
@@ -31,9 +28,6 @@ SRV_OOB_PWD=calvin
 # mac address of server to be used during the build - not required for Dell 10G servers
 # SRV_MAC=3c:fd:fe:b8:10:60
 
-# the build interface is the nic used by the Ubuntu installed to load the OS
-SRV_BLD_INF=enp94s0f0
-
 # the boot device is the device name on which the OS will be loaded
 SRV_BOOT_DEVICE=sda
 
@@ -46,7 +40,7 @@ SRV_BIOS_TEMPLATE=dell_r740_g14_uefi_base.xml.template
 SRV_BOOT_TEMPLATE=dell_r740_g14_uefi_httpboot.xml.template
 SRV_HTTP_BOOT_DEV=NIC.Slot.3-1-1
 
-# tempalte to run to configure OS after first boot
+# template to run to configure OS after first boot
 # current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template
 SRV_FIRSTBOOT_TEMPLATE=firstboot.sh.template
 
@@ -64,11 +58,11 @@ SRV_DOMAIN=lab.akraino.org
 SRV_DNSSEARCH=lab.akraino.org
 SRV_NTP=ntp.ubuntu.org
 
-# root password for server being built
-SRV_PWD=akraino,d
-
-# network bond information
+# network bond information - NOTE: SRV_SLAVE1 will be used for OS install
 SRV_BOND=bond0
 SRV_SLAVE1=enp94s0f0
 SRV_SLAVE2=enp94s0f1
 
+# password to set for root after OS is installed
+SRV_PWD=akraino,d
+