Replace ONL with SONiC

Change-Id: I8b52a79401fbf70aaceac25549048a73fb22dae6
diff --git a/VERSION b/VERSION
index b6bb93f..88c5fb8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.0-dev
+1.4.0
diff --git a/architecture.rst b/architecture.rst
index c62f132..ecd5cc9 100644
--- a/architecture.rst
+++ b/architecture.rst
@@ -369,11 +369,11 @@
 advantage of P4 and programmable ASICs, Intel Tofino or Broadcom Trident 4 are more
 appropriate choices.
 
-ONL and ONIE
-^^^^^^^^^^^^
-The SD-Fabric switch software stack includes Open Network Linux (ONL) and Open Network
+SONiC and ONIE
+^^^^^^^^^^^^^^
+The SD-Fabric switch software stack includes SONiC and Open Network
 Install Environment (ONIE) from OCP. The switches are shipped with ONIE, a boot loader that
-enables the installation of the target OS as part of the provisioning process. ONL, a Linux
+enables the installation of the target OS as part of the provisioning process. SONiC, a Linux
 distribution for bare metal switches, is used as the base operating system. It ships with a number
 of additional drivers for bare metal switch hardware elements (e.g., LEDs, SFPs) that are typically
 unavailable in normal Linux distributions for bare metal servers (e.g., Ubuntu).
diff --git a/deployment.rst b/deployment.rst
index 3d424c9..9463bdf 100644
--- a/deployment.rst
+++ b/deployment.rst
@@ -57,150 +57,69 @@
 
    Finally, we are going to install SD-Fabric with the information we prepared in Step 1 to 5.
 
-Step 1: Provision Switches
---------------------------
+Step 1: Access to the switch console
 
-We follow Open Network Install Environment (ONIE) way to install Open Network Linux (ONL) image to switch.
-To work with the SD-Fabric environment, we have customized the ONL image to support related packages and dependencies.
+There are two ways to access the switch console:
 
-Image source file can be found on ONF repository `opennetworkinglab/OpenNetworkLinux <https://github.com/opennetworkinglab/OpenNetworkLinux>`_.
-You can also download pre-compiled artifacts from `Github Release page <https://github.com/opennetworkinglab/OpenNetworkLinux/releases>`_
+ * Access via Baseboard Management Controller(BMC)
+ * Access via console interface
 
+Access via the BMC
+^^^^^^^^^^^^^^^^^^
 
-.. note::
-    If you're not familiar with ONIE/ONL environment, please check `Getting Started <https://github.com/opencomputeproject/OpenNetworkLinux/blob/master/docs/GettingStarted.md>`_ to
-    see how to install the ONL image to an ONIE supported switch.
-
-Below is an example about how to install the ONL image.
-
-1. Prepare a server which is accessible by the switch and then download the
-pre-compiled installer from the release page.
+For some platforms, you can connect to an embedded system loaded with BMC system.
+For example, Wedge100BF series is loaded with OpenBMC system that allows you to connect it via SSH
+When the switch started, OpenBMC uses DHCP to initiate it's IP address. You may setting up static DHCP record on
+your DHCP server or checkout the DHCP lease file from the DHCP server to get the IP address.
 
 .. code-block::
 
-   wget https://github.com/opennetworkinglab/OpenNetworkLinux/releases/download/v1.4.3/ONL-onf-ONLPv2_ONL-OS_2021-07-16.2159-5195444_AMD64_INSTALLED_INSTALLER -o onl-installer
-   sudo python -m http.server 80
+   $ ssh root@[Open BMC IP]
 
-2. Reboot the switch to enter ONIE installation mode
+The default user and password is `root`` and `0penBmc`.
 
-   In order to reinstall an ONL image, you must change the ONIE bootloader to
-   "Rescue Mode".
+In the OpenBMC system you can use Serial-over-LAN(sol) to access the main board.
 
-   Once the switch is powered on, it should retrieve an IP address on the OpenBMC
-   interface with DHCP. Here we use ``10.0.0.131`` as an example.
-   OpenBMC uses these default credentials
+Access via console interface
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-   .. code-block::
+If the platform doesn't support BMC, you can attach your laptop/PC to the switch with a
+console cable and use the following command to access it:
 
-      username: root
-      password: 0penBmc
+.. code-block::
 
-   Login to OpenBMC with SSH:
+   $ screen /dev/[console device] [baud rate]
 
-   .. code-block::
+The `console device` may be vary, it will usually be something like `ttyUSB...`, `tty.usb.....`.
+Please checkout the console cable vendor for more information.
 
-      $ ssh root@10.0.0.131
-      The authenticity of host '10.0.0.131 (10.0.0.131)' can't be established.
-      ECDSA key fingerprint is SHA256:...
-      Are you sure you want to continue connecting (yes/no)? yes
-      Warning: Permanently added '10.0.0.131' (ECDSA) to the list of known hosts.
-      root@10.0.0.131's password:
-      root@bmc:~#
+The `baud rate` can also be vary, depends on the switch vendor.
+Please checkout the switch user manual or contact vendor to get the information.
 
-   Using the Serial-over-LAN Console, enter ONL
+Step 2: Provision Switches
+--------------------------
 
-   .. code-block::
+We follow Open Network Install Environment (ONIE) way to install SONiC image to switch.
+To work with the SD-Fabric environment, we have customized the SONiC image to support related features.
 
-      root@bmc:~# /usr/local/bin/sol.sh
-      You are in SOL session.
-      Use ctrl-x to quit.
-      -----------------------
+You can download pre-compiled images from `Github Release page <https://github.com/stratum/sonic-base-image/releases>`_
 
-      root@onl:~#
-
-   .. note::
-
-      If `sol.sh` is unresponsive, please try to restart the mainboard with
-
-      .. code-block::
-
-         root@onl:~# wedge_power.sh reset
-
-   Change the boot mode to rescue mode and reboot
-
-   .. code-block::
-
-      root@onl:~# onl-onie-boot-mode rescue
-      [1053033.768512] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
-      [1053033.936893] EXT4-fs (sda3): re-mounted. Opts: (null)
-      [1053033.996727] EXT4-fs (sda3): re-mounted. Opts: (null)
-      The system will boot into ONIE rescue mode at the next restart.
-
-      root@onl:~# reboot
-
-   At this point, ONL will go through it's shutdown sequence and ONIE will start.
-   If it does not start right away, press the Enter/Return key a few times - it
-   may show you a boot selection screen. Pick ``ONIE`` and ``Rescue`` if given a
-   choice.
-
-3. Install ONL installer
-
-   Now that the switch is in Rescue mode
-
-   Then run the ``onie-nos-install`` command, with the URL of the management
-   server (here we use ``10.0.0.129`` as an example) on the management network segment
-
-   .. code-block::
-
-      ONIE:/ # onie-nos-install http://10.0.0.129/onie-installer
-      discover: Rescue mode detected. No discover stopped.
-      ONIE: Unable to find 'Serial Number' TLV in EEPROM data.
-      Info: Fetching http://10.0.0.129/onie-installer ...
-      Connecting to 10.0.0.129 (10.0.0.129:80)
-      installer            100% |*******************************|   322M  0:00:00 ETA
-      ONIE: Executing installer: http://10.0.0.129/onie-installer
-      installer: computing checksum of original archive
-      installer: checksum is OK
-      ...
-
-   The installation will now start, and then ONL will boot culminating in
-
-   .. code-block::
-
-      Open Network Linux OS ONL-wedge100bf-32qs, 2020-11-04.19:44-64100e9
-
-      localhost login:
-
-      The default ONL login is::
-
-      username: root
-      password: onl
-
-   If you login, you can verify that the switch is getting it's IP address via DHCP
-
-   .. code-block::
-
-      root@localhost:~# ip addr
-      ...
-      3: ma1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
-            link/ether 00:90:fb:5c:e1:97 brd ff:ff:ff:ff:ff:ff
-            inet 10.0.0.130/25 brd 10.0.0.255 scope global ma1
-      ...
-
-4. (Optional) Setup switch IP and hostname after the installation if DHCP is not available
-
-.. warning::
-
-   Stop and return to :ref:`Post-ONL configuration <aether:edge_deployment/fabric_switch_bootstrap:post-onl configuration>`
-   and continue the remaining steps there if you came from Aether docs.
-   Otherwise, please continue the rest of the page here.
+.. note::
+    If you're not familiar with ONIE/SONiC environment, please check `Getting Started <https://github.com/sonic-net/SONiC/wiki/Quick-Start>`_ to
+    see how to install the SONiC to an ONIE supported switch.
 
 
-Step 2: Configure switches as special Kubernetes nodes
+Once SONiC is started on the switch, you need to disable SONiC services before deploy Stratum on it.
+Otherwise Stratum containers won't be started.
+
+.. code-block::
+
+   admin@sonic$ sudo systemctl stop sonic.target sonic-delayed.taget
+   admin@sonic$ sudo systemctl disable sonic.target sonic-delayed.taget
+
+Step 3: Configure switches as special Kubernetes nodes
 ------------------------------------------------------
 
-Our `ONL <https://github.com/opennetworkinglab/OpenNetworkLinux>`_ version
-includes all packages required by running the Kubernetes on top of it.
 Once the Kubernetes is ready, the `Stratum <https://opennetworking.org/stratum/>`_ application will be deployed to the switch to manage it.
 
 Unlike server, switch has less CPU and memory resources and we should avoid
@@ -229,17 +148,17 @@
      leaf1   Ready    worker   27d   v1.18.8
      leaf2   Ready    worker   27d   v1.18.8
 
-Step 3: Prepare ONOS network configuration
+Step 4: Prepare ONOS network configuration
 ------------------------------------------
    See :ref:`onos_network_config` for instructions
 
-Step 4: Prepare Stratum chassis configuration
+Step 5: Prepare Stratum chassis configuration
 ---------------------------------------------
    See See :ref:`stratum_chassis_config` for instructions
 
 .. _install_sd_fabric:
 
-Step 5: Install SD-Fabric with Helm
+Step 6: Install SD-Fabric with Helm
 -----------------------------------
 
 To install SD-Fabric into your Kubernetes cluster, follow instructions
diff --git a/dict.txt b/dict.txt
index cd3b88f..d0d1c6f 100644
--- a/dict.txt
+++ b/dict.txt
@@ -2,6 +2,7 @@
 Aether
 Analytics
 Atomix
+BMC
 Broadcom
 CLI
 CNI
diff --git a/specification.rst b/specification.rst
index c8fa016..4cb59ba 100644
--- a/specification.rst
+++ b/specification.rst
@@ -248,7 +248,7 @@
 
 White Box Switch Software
 -------------------------
-- Open source ONL, ONIE, Docker, Kubernetes
+- Open source SONiC, ONIE, Docker, Kubernetes
 - Stratum available from ONF
 
 .. rubric:: Footnotes
diff --git a/testing/system.rst b/testing/system.rst
index fc7bc69..319c4b3 100644
--- a/testing/system.rst
+++ b/testing/system.rst
@@ -65,7 +65,7 @@
     * Switch Failure Tests - Setup a flow from between hosts connected to different leaves, disable a spine used by
       the flow, verify and measure how fast the flow is rerouted to another spine.
 
-       * `ONL Reboot <https://github.com/opennetworkinglab/OnosSystemTest/tree/master/TestON/tests/USECASE/SegmentRouting/SRStaging/SRONLReboot>`_ - Simulate a switch failure by restarting ONL on the switch.
+       * `Switch OS Reboot <https://github.com/opennetworkinglab/OnosSystemTest/tree/master/TestON/tests/USECASE/SegmentRouting/SRStaging/SRONLReboot>`_ - Simulate a switch failure by restarting ONL on the switch.
 
        * `Stratum Restart <https://github.com/opennetworkinglab/OnosSystemTest/tree/master/TestON/tests/USECASE/SegmentRouting/SRStaging/SRstratumRestart>`_ - Simulate a switch failure by killing the stratum agent on the switch.
 
diff --git a/troubleshooting.rst b/troubleshooting.rst
index 981072e..6dccd14 100644
--- a/troubleshooting.rst
+++ b/troubleshooting.rst
@@ -11,18 +11,17 @@
 control plane software and data plane software are containerized and deployed as Kubernetes services in SD-Fabric.
 Please refer to :ref:`architecture_design` for further details.
 
-ONL troubleshooting
--------------------
+SONiC troubleshooting
+---------------------
 
-Can't reboot into ONL, loops on ONIE installer mode
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Can't reboot into SONiC, loops on ONIE installer mode
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Sometimes an ONL installation is incomplete or problematic, and reinstalling it
+Sometimes an SONiC installation is incomplete or problematic, and reinstalling it
 doesn't result in a working system.
 
 If this is the case, reboot into ONIE Rescue mode and use ``parted`` to delete
-all the ``ONL-`` prefixed partitions, then reinstall with an ``onie-installer``
-image.
+all the ``SONiC`` related partitions, then reinstall the SONiC image.
 
 K8s troubleshooting
 -------------------
@@ -62,8 +61,8 @@
       compute1   Ready    controlplane,etcd,worker   39d   v1.18.8   10.76.28.74   <none>        Ubuntu 18.04.6 LTS             5.4.0-73-generic           docker://20.10.9
       compute2   Ready    controlplane,etcd,worker   39d   v1.18.8   10.76.28.72   <none>        Ubuntu 18.04.5 LTS             5.4.0-73-generic           docker://19.3.15
       compute3   Ready    controlplane,etcd,worker   39d   v1.18.8   10.76.28.68   <none>        Ubuntu 18.04.5 LTS             5.4.0-73-generic           docker://19.3.15
-      leaf1      Ready    worker                     39d   v1.18.8   10.76.28.70   <none>        Debian GNU/Linux 9 (stretch)   4.14.49-OpenNetworkLinux   docker://19.3.15
-      leaf2      Ready    worker                     39d   v1.18.8   10.76.28.71   <none>        Debian GNU/Linux 9 (stretch)   4.14.49-OpenNetworkLinux   docker://19.3.15
+      leaf1      Ready    worker                     39d   v1.18.8   10.76.28.70   <none>        Debian GNU/Linux 10 (buster)   4.19.0-12-2-amd64          docker://18.9.8
+      leaf2      Ready    worker                     39d   v1.18.8   10.76.28.71   <none>        Debian GNU/Linux 10 (buster)   4.19.0-12-2-amd64          docker://18.9.8
 
 You should have at least `3+N` available nodes, where N depends on the deployed network topology. Please note that ONOS
 cannot be scheduled on the network devices (these are special worker nodes), and different ONOS cannot share the same worker
@@ -358,7 +357,7 @@
 ^^^^^^^
 To execute following BF Shell commands,
 
-- Login to Stratum switch by `ssh root@<switch_ip>`. Default password is `onl`
+- Login to Stratum switch via `ssh`.
 - Attach to Stratum docker container by `docker attach \`docker ps | grep stratum-bfrt | awk \'{print $1}\'\``
 
   - Hit `enter` for the prompt