From d480f8760abfb3800745396232395ad0b7ba8e03 Mon Sep 17 00:00:00 2001 From: cxhong Date: Tue, 8 May 2018 01:44:25 -0400 Subject: [PATCH] Add Copycds/nodeset/syncfiles support to onie switches support (#5173) --- .../onie_switches/os_cumulus/install.rst | 29 +++++++++++++------ .../onie_switches/os_cumulus/manage.rst | 18 ++++++++++++ .../onie_switches/os_cumulus/prepare.rst | 24 +++++++++++++++ 3 files changed, 62 insertions(+), 9 deletions(-) diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst index b10dd9a79..bd1be9f69 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst @@ -41,16 +41,27 @@ xCAT provides support for detecting and installing the Cumulus Linux OS into ONI switchdiscover --range -#. Set the ``provmethod`` attribute of the target switch(es) to the Cumulus Linux install image: :: +#. Run the ``nodeset`` command to set the ``provmethod`` attribute of the target switch(es) to the Cumulus Linux install image and prepare the DHCP/BOOTP lease information for the switch: :: - chdef frame[01-04]sw1 \ - provmethod="/install/custom/sw_os/cumulus/cumulus-linux-3.1.0-bcm-armel.bin" + # nodeset frame01sw1 osimage=cumulus3.5.2-armel + # lsdef frame01sw1 + Object name: frame01sw1 + arch=armv7l + groups=switch,edge_switch + ip=172.21.208.03 + mac=8C:EA:1B:E8:78:C0 + mgt=switch + netboot=onie + nodetype=switch + postbootscripts=otherpkgs + postscripts=syslog,remoteshell + provmethod=cumulus3.5.2-armel + switch=mid08 + switchport=3 + switchtype=onie + usercomment=Edgecore Networks Switch -#. Run ``makedhcp`` to prepare the DHCP/BOOTP lease information for the switch: :: - - makedhcp -a frame[01-04]sw1 - - Executing the ``makedhcp`` command will kick off the network install of the ONIE enabled switch. If there is no OS pre-loaded on the switch, the switch continues to send a DHCPREQUEST out to the network. After ``makedhcp`` is run against the switch, an entry is added to the leases file that will respond to the request with the Cumulus Linux installer file. :: + ``nodeset`` will executing the ``makedhcp`` command and kick off the network install of the ONIE enabled switch. If there is no OS pre-loaded on the switch, the switch continues to send a DHCPREQUEST out to the network. After ``makedhcp`` is run against the switch, an entry is added to the leases file that will respond to the request with the Cumulus Linux installer file. :: host frame1sw1 { dynamic; @@ -59,7 +70,7 @@ xCAT provides support for detecting and installing the Cumulus Linux OS into ONI supersede server.ddns-hostname = "frame1sw1"; supersede host-name = "frame1sw1"; if substring (option vendor-class-identifier, 0, 11) = "onie_vendor" { - supersede www-server = "http://192.168.27.1/install/custom/sw_os/cumulus/cumulus-linux-3.1.0-bcm-armel.bin"; + supersede www-server = "http://192.168.27.1/install/cumulus3.5.2/armel/cumulus-linux-3.5.2-bcm-armel.bin"; } } diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst index b2976f56a..31986c698 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst @@ -1,6 +1,24 @@ Switch Management ================= +Sync File support +------------------ + +xCAT supports synchronize of configuration files for cumulus switches. + +#. Use instructions in doc: :ref:`The_synclist_file` to set up syncfile. +#. Add syncfile to cumulus osimage. :: + + # chdef -t osimage cumulus3.5.2-armel synclists=/tmp/synclists + 1 object definitions have been created or modified. + +#. run ``updatenode`` to sync the files to cumulus switches. :: + + # updatenode mid08tor03 -F + File synchronization has completed for nodes: "mid08tor03" + + + Switch Port and VLAN Configuration ---------------------------------- diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst index e68fd0895..8fbdc1073 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst @@ -17,3 +17,27 @@ Prepare the Cumulus Linux files on the xCAT Management Node. cp cumulus-linux-3.1.0-bcm-armel.bin /install/custom/sw_os/cumulus/ +Cumulus osimage +--------------- + +xCAT can able to create a cumulus osimage defintion via ``copycds`` command. ``copycds`` will copy cumulus installer to a destination directory, and create several relevant osimage definitions. **cumulus-** is the default osimage name. :: + + #run copycds command + # copycds cumulus-linux-3.5.2-bcm-armel.bin + +The ``pkgdir`` attribute will contain full path of cumulus installer as **/install/cumulus//**. :: + + # lsdef -t osimage cumulus3.5.2-armel + Object name: cumulus3.5.2-armel + description=Cumulus Linux + imagetype=linux + osarch=armel + osname=cumulus + osvers=cumulus3.5.2 + pkgdir=/install/cumulus3.5.2/armel/cumulus-linux-3.5.2-bcm-armel.bin + provmethod=install + + + + +