Hung-Wei Chiu | 77c969e | 2020-10-23 18:13:07 +0000 | [diff] [blame] | 1 | .. |
| 2 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 3 | SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | ============= |
| 6 | Bootstrapping |
| 7 | ============= |
| 8 | |
Charles Chan | 4a10722 | 2020-10-30 17:23:48 -0700 | [diff] [blame^] | 9 | OS Installation - Switches |
| 10 | ========================== |
| 11 | |
| 12 | .. note:: |
| 13 | |
| 14 | This part will be done automatically once we have a DHCP and HTTP server set up in the infrastructure. |
| 15 | For now, we need to download and install the ONL image manually. |
| 16 | |
| 17 | Install ONL with Docker |
| 18 | ----------------------- |
| 19 | First, enter **ONIE rescue mode**. |
| 20 | |
| 21 | Set up IP and route |
| 22 | ^^^^^^^^^^^^^^^^^^^ |
| 23 | .. code-block:: console |
| 24 | |
| 25 | # ip addr add 10.92.1.81/24 dev eth0 |
| 26 | # ip route add default via 10.92.1.1 |
| 27 | |
| 28 | - `10.92.1.81/24` should be replaced by the actual IP and subnet of the ONL. |
| 29 | - `10.92.1.1` should be replaced by the actual default gateway. |
| 30 | |
| 31 | Download and install ONL |
| 32 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | |
| 34 | .. code-block:: console |
| 35 | |
| 36 | # wget https://github.com/opennetworkinglab/OpenNetworkLinux/releases/download/v1.3.2/ONL-onf-ONLPv2_ONL-OS_2020-10-09.1741-f7428f2_AMD64_INSTALLED_INSTALLER |
| 37 | # sh ONL-onf-ONLPv2_ONL-OS_2020-10-09.1741-f7428f2_AMD64_INSTALLED_INSTALLER |
| 38 | |
| 39 | The switch will reboot automatically once the installer is done. |
| 40 | |
| 41 | .. note:: |
| 42 | |
| 43 | Alternatively, we can `scp` the ONL installer into ONIE manually. |
| 44 | |
| 45 | Setup BMC for remote console access |
| 46 | ----------------------------------- |
| 47 | Log in to the BMC from ONL by |
| 48 | |
| 49 | .. code-block:: console |
| 50 | |
| 51 | # ssh root@192.168.0.1 # pass: 0penBmc |
| 52 | |
| 53 | on `usb0` interface. |
| 54 | |
| 55 | Once you are in the BMC, run the following commands to setup IP and route (or offer a fixed IP with DHCP) |
| 56 | |
| 57 | .. code-block:: console |
| 58 | |
| 59 | # ip addr add 10.92.1.85/24 dev eth0 |
| 60 | # ip route add default via 10.92.1.1 |
| 61 | |
| 62 | - `10.92.1.85/24` should be replaced by the actual IP and subnet of the BMC. |
| 63 | Note that it should be different from the ONL IP. |
| 64 | - `10.92.1.1` should be replaced by the actual default gateway. |
| 65 | |
| 66 | BMC uses the same ethernet port as ONL management so you should give it an IP address in the same subnet. |
| 67 | BMC address will preserve during ONL reboot, but won’t be preserved during power outage. |
| 68 | |
| 69 | To log in to ONL console from BMC, run |
| 70 | |
| 71 | .. code-block:: console |
| 72 | |
| 73 | # /usr/local/bin/sol.sh |
| 74 | |
| 75 | If `sol.sh` is unresponsive, please try to restart the mainboard with |
| 76 | |
| 77 | .. code-block:: console |
| 78 | |
| 79 | # wedge_power.sh restart |
| 80 | |
| 81 | Setup network and host name for ONL |
| 82 | ----------------------------------- |
| 83 | |
| 84 | .. code-block:: console |
| 85 | |
| 86 | # hostnamectl set-hostname <host-name> |
| 87 | |
| 88 | # vim.tiny /etc/hosts # update accordingly |
| 89 | # cat /etc/hosts # example |
| 90 | 127.0.0.1 localhost |
| 91 | 10.92.1.81 menlo-staging-spine-1 |
| 92 | |
| 93 | # vim.tiny /etc/network/interfaces.d/ma1 # update accordingly |
| 94 | # cat /etc/network/interfaces.d/ma1 # example |
| 95 | auto ma1 |
| 96 | iface ma1 inet static |
| 97 | address 10.92.1.81 |
| 98 | netmask 255.255.255.0 |
| 99 | gateway 10.92.1.1 |
| 100 | dns-nameservers 8.8.8.8 |