blob: d40a878783a498c4333ec2a4d85073ba43c39c1d [file] [log] [blame]
Zack Williams794532a2021-03-18 17:38:36 -07001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
Zack Williams5d2d6782021-08-26 13:08:44 -07005Fabric Switch Bootstrap (Beta)
6==============================
7
8.. note::
9
10 Fabric switches running the P4 UPF is a beta feature of the Aether 1.5
11 release, and the hardware and software setup is not required if using the
12 BESS UPF.
Zack Williams794532a2021-03-18 17:38:36 -070013
14The installation of the ONL OS image on the fabric switches uses the DHCP and
15HTTP server set up on the management server.
16
17The default image is downloaded during that installation process by the
18``onieboot`` role. Make changes to that roll and rerun the management playbook
19to download a newer switch image.
20
21Preparation
22-----------
23
24The switches have a single ethernet port that is shared between OpenBMC and
25ONL. Find out the MAC addresses for both of these ports and enter it into
26NetBox.
27
28Change boot mode to ONIE Rescue mode
29------------------------------------
30
31In order to reinstall an ONL image, you must change the ONIE bootloader to
32"Rescue Mode".
33
34Once the switch is powered on, it should retrieve an IP address on the OpenBMC
35interface with DHCP. OpenBMC uses these default credentials::
36
37 username: root
38 password: 0penBmc
39
40Login to OpenBMC with SSH::
41
42 $ ssh root@10.0.0.131
43 The authenticity of host '10.0.0.131 (10.0.0.131)' can't be established.
44 ECDSA key fingerprint is SHA256:...
45 Are you sure you want to continue connecting (yes/no)? yes
46 Warning: Permanently added '10.0.0.131' (ECDSA) to the list of known hosts.
47 root@10.0.0.131's password:
48 root@bmc:~#
49
50Using the Serial-over-LAN Console, enter ONL::
51
52 root@bmc:~# /usr/local/bin/sol.sh
53 You are in SOL session.
54 Use ctrl-x to quit.
55 -----------------------
56
57 root@onl:~#
58
59.. note::
60 If `sol.sh` is unresponsive, please try to restart the mainboard with::
61
Wei-Yu Chenf6c06422021-08-11 11:43:10 +080062 root@onl:~# wedge_power.sh reset
Zack Williams794532a2021-03-18 17:38:36 -070063
64
65Change the boot mode to rescue mode with the command ``onl-onie-boot-mode
66rescue``, and reboot::
67
68 root@onl:~# onl-onie-boot-mode rescue
69 [1053033.768512] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
70 [1053033.936893] EXT4-fs (sda3): re-mounted. Opts: (null)
71 [1053033.996727] EXT4-fs (sda3): re-mounted. Opts: (null)
72 The system will boot into ONIE rescue mode at the next restart.
73 root@onl:~# reboot
74
75At this point, ONL will go through it's shutdown sequence and ONIE will start.
76If it does not start right away, press the Enter/Return key a few times - it
77may show you a boot selection screen. Pick ``ONIE`` and ``Rescue`` if given a
78choice.
79
80Installing an ONL image over HTTP
81---------------------------------
82
83Now that the switch is in Rescue mode
84
85First, activate the Console by pressing Enter::
86
87 discover: Rescue mode detected. Installer disabled.
88
89 Please press Enter to activate this console.
90 To check the install status inspect /var/log/onie.log.
91 Try this: tail -f /var/log/onie.log
92
93 ** Rescue Mode Enabled **
94 ONIE:/ #
95
96Then run the ``onie-nos-install`` command, with the URL of the management
97server on the management network segment::
98
99 ONIE:/ # onie-nos-install http://10.0.0.129/onie-installer
100 discover: Rescue mode detected. No discover stopped.
101 ONIE: Unable to find 'Serial Number' TLV in EEPROM data.
102 Info: Fetching http://10.0.0.129/onie-installer ...
103 Connecting to 10.0.0.129 (10.0.0.129:80)
104 installer 100% |*******************************| 322M 0:00:00 ETA
105 ONIE: Executing installer: http://10.0.0.129/onie-installer
106 installer: computing checksum of original archive
107 installer: checksum is OK
108 ...
109
110The installation will now start, and then ONL will boot culminating in::
111
112 Open Network Linux OS ONL-wedge100bf-32qs, 2020-11-04.19:44-64100e9
113
114 localhost login:
115
116The default ONL login is::
117
118 username: root
119 password: onl
120
121If you login, you can verify that the switch is getting it's IP address via
122DHCP::
123
124 root@localhost:~# ip addr
125 ...
126 3: ma1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
127 link/ether 00:90:fb:5c:e1:97 brd ff:ff:ff:ff:ff:ff
128 inet 10.0.0.130/25 brd 10.0.0.255 scope global ma1
129 ...
130
131
132Post-ONL Configuration
133----------------------
134
135A ``terraform`` user must be created on the switches to allow them to be
136configured.
137
138This is done using Ansible. Verify that your inventory (Created earlier from the
139``inventory/example-aether.ini`` file) includes an ``[aetherfabric]`` section
140that has all the names and IP addresses of the compute nodes in it.
141
142Then run a ping test::
143
144 ansible -i inventory/sitename.ini -m ping aetherfabric
145
146This may fail with the error::
147
148 "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host's fingerprint to your known_hosts file to manage this host."
149
150Comment out the ``ansible_ssh_pass="onl"`` line, then rerun the ping test. It
151may ask you about authorized keys - answer ``yes`` for each host to trust the
152keys::
153
154 The authenticity of host '10.0.0.138 (<no hostip for proxy command>)' can't be established.
155 ECDSA key fingerprint is SHA256:...
156 Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
157
158Once you've trusted the host keys, the ping test should succeed::
159
160 spine1.role1.site | SUCCESS => {
161 "changed": false,
162 "ping": "pong"
163 }
164 leaf1.role1.site | SUCCESS => {
165 "changed": false,
166 "ping": "pong"
167 }
168 ...
169
170Then run the playbook to create the ``terraform`` user::
171
172 ansible-playbook -i inventory/sitename.ini playbooks/aetherfabric-playbook.yml
173
Hung-Wei Chiu6ed79102021-08-24 14:27:26 -0700174Once completed, the switch should now be ready for SD-Fabric runtime install.