blob: df60ea7e0f46e7d69ddcf05d581dda0a2cf64500 [file] [log] [blame]
Hung-Wei Chiu77c969e2020-10-23 18:13:07 +00001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
Charles Chan4a107222020-10-30 17:23:48 -07005Hardware Installation
6=====================
Hung-Wei Chiu77c969e2020-10-23 18:13:07 +00007
Zack Williams9026f532020-11-30 11:34:32 -07008Once the hardware has been ordered, the installation can be planned and
9implemented. This document describes the installation of the servers and
10software.
Zack Williams34c30e52020-11-16 10:55:00 -070011
12Installation of the fabric switch hardware is covered in :ref:`OS Installation
13- Switches <switch-install>`.
14
15Installation of the radio hardware is covered in :ref:`eNB Installation
16<enb-installation>`.
17
Zack Williams9026f532020-11-30 11:34:32 -070018Site Bookkeeping
19----------------
Zack Williams34c30e52020-11-16 10:55:00 -070020
21The following items need to be added to `NetBox
22<https://netbox.readthedocs.io/en/stable>`_ to describe each edge site:
23
241. Add a Site for the edge (if one doesn't already exist), which has the
25 physical location and contact information for the edge.
26
Zack Williams9026f532020-11-30 11:34:32 -0700272. Add equipment Racks to the Site (if they don't already exist).
Zack Williams34c30e52020-11-16 10:55:00 -070028
293. Add a Tenant for the edge (who owns/manages it), assigned to the ``Pronto``
30 or ``Aether`` Tenant Group.
31
Zack Williams9026f532020-11-30 11:34:32 -0700324. Add a VRF (Routing Table) for the edge site. This is usually just the name
33 of the site. Make sure that ``Enforce unique space`` is checked, so that IP
34 addresses within the VRF are forced to be unique, and that the Tenant Group
35 and Tenant are set.
Zack Williams34c30e52020-11-16 10:55:00 -070036
375. Add a VLAN Group to the edge site, which groups the site's VLANs and
Zack Williams9026f532020-11-30 11:34:32 -070038 requires that they have a unique VLAN number.
Zack Williams34c30e52020-11-16 10:55:00 -070039
406. Add VLANs for the edge site. These should be assigned a VLAN Group, the
41 Site, and Tenant.
42
43 There can be multiple of the same VLAN in NetBox (VLANs are layer 2, and
44 local to the site), but not within the VLAN group.
45
46 The minimal list of VLANs:
47
48 * ADMIN 1
49 * UPLINK 10
50 * MGMT 800
51 * FAB 801
52
53 If you have multiple deployments at a site using the same management server,
54 add additional VLANs incremented by 10 for the MGMT/FAB - for example:
55
56 * DEVMGMT 810
57 * DEVFAB 801
58
597. Add IP Prefixes for the site. This should have the Tenant and VRF assigned.
60
61 All edge IP prefixes fit into a ``/22`` sized block.
62
63 The description of the Prefix contains the DNS suffix for all Devices that
64 have IP addresses within this Prefix. The full DNS names are generated by
65 combining the first ``<devname>`` component of the Device names with this
66 suffix.
67
Zack Williamsa7c170f2020-11-25 12:59:49 -070068 An examples using the ``10.0.0.0/22`` block. There are 4 edge
Zack Williams34c30e52020-11-16 10:55:00 -070069 prefixes, with the following purposes:
70
71 * ``10.0.0.0/25``
Zack Williamsa7c170f2020-11-25 12:59:49 -070072
Zack Williams34c30e52020-11-16 10:55:00 -070073 * Has the Server BMC/LOM and Management Switch
74 * Assign the ADMIN 1 VLAN
75 * Set the description to ``admin.<deployment>.<site>.aetherproject.net`` (or
76 ``prontoproject.net``).
77
78 * ``10.0.0.128/25``
Zack Williamsa7c170f2020-11-25 12:59:49 -070079
Zack Williams34c30e52020-11-16 10:55:00 -070080 * Has the Server Management plane, Fabric Switch Management/BMC
81 * Assign MGMT 800 VLAN
82 * Set the description to ``<deployment>.<site>.aetherproject.net`` (or
83 ``prontoproject.net``).
84
Zack Williamsa7c170f2020-11-25 12:59:49 -070085 * ``10.0.1.0/25``
86
87 * IP addresses of the qsfp0 port of the Compute Nodes to Fabric switches, devices
88 connected to the Fabric like the eNB
Zack Williams34c30e52020-11-16 10:55:00 -070089 * Assign FAB 801 VLAN
Zack Williamsa7c170f2020-11-25 12:59:49 -070090 * Set the description to ``fab1.<deployment>.<site>.aetherproject.net`` (or
Zack Williams34c30e52020-11-16 10:55:00 -070091 ``prontoproject.net``).
92
Zack Williamsa7c170f2020-11-25 12:59:49 -070093 * ``10.0.1.128/25``
94
95 * IP addresses of the qsfp1 port of the Compute Nodes to fabric switches
96 * Assign FAB 801 VLAN
97 * Set the description to ``fab2.<deployment>.<site>.aetherproject.net`` (or
98 ``prontoproject.net``).
99
100 Additionally, these edge prefixes are used for Kubernetes but don't need to
101 be created in NetBox:
102
Zack Williams34c30e52020-11-16 10:55:00 -0700103 * ``10.0.2.0/24``
Zack Williamsa7c170f2020-11-25 12:59:49 -0700104
Zack Williams34c30e52020-11-16 10:55:00 -0700105 * Kubernetes Pod IP's
106
107 * ``10.0.3.0/24``
Zack Williamsa7c170f2020-11-25 12:59:49 -0700108
Zack Williams34c30e52020-11-16 10:55:00 -0700109 * Kubernetes Cluster IP's
110
1118. Add Devices to the site, for each piece of equipment. These are named with a
112 scheme similar to the DNS names used for the pod, given in this format::
113
114 <devname>.<deployment>.<site>
115
116 Examples::
117
118 mgmtserver1.ops1.tucson
119 node1.stage1.menlo
120
121 Note that these names are transformed into DNS names using the Prefixes, and
122 may have additional components - ``admin`` or ``fabric`` may be added after
123 the ``<devname>`` for devices on those networks.
124
125 Set the following fields when creating a device:
126
127 * Site
128 * Tenant
129 * Rack & Rack Position
130 * Serial number
131
132 If a specific Device Type doesn't exist for the device, it must be created,
133 which is detailed in the NetBox documentation, or ask the OPs team for help.
134
Zack Williams9026f532020-11-30 11:34:32 -0700135 See `Rackmount of Equipment`_ below for guidance on how equipment should be
136 mounted in the Rack.
137
Zack Williamsa7c170f2020-11-25 12:59:49 -07001389. Add Services to the management server:
139
140 * name: ``dns``
141 protocol: UDP
142 port: 53
143
144 * name: ``tftp``
145 protocol: UDP
146 port: 69
147
Zack Williams9026f532020-11-30 11:34:32 -0700148 These are used by the DHCP and DNS config to know which servers offer
149 DNS or TFTP service.
Zack Williamsa7c170f2020-11-25 12:59:49 -0700150
15110. Set the MAC address for the physical interfaces on the device.
Zack Williams34c30e52020-11-16 10:55:00 -0700152
153 You may also need to add physical network interfaces if aren't already
154 created by the Device Type. An example would be if additional add-in
155 network cards were installed.
156
Zack Williamsa7c170f2020-11-25 12:59:49 -070015711. Add any virtual interfaces to the Devices. When creating a virtual
Zack Williams34c30e52020-11-16 10:55:00 -0700158 interface, it should have it's ``label`` field set to the physical network
159 interface that it is assigned
160
161 These are needed are two cases for the Pronto deployment:
162
163 1. On the Management Server, there should bet (at least) two VLAN
164 interfaces created attached to the ``eno2`` network port, which
165 are used to provide connectivity to the management plane and fabric.
166 These should be named ``<name of vlan><vlan ID>``, so the MGMT 800 VLAN
167 would become a virtual interface named ``mgmt800``, with the label
168 ``eno2``.
169
170 2. On the Fabric switches, the ``eth0`` port is shared between the OpenBMC
171 interface and the ONIE/ONL installation. Add a ``bmc`` virtual
Zack Williamsa7c170f2020-11-25 12:59:49 -0700172 interface with a label of ``eth0`` on each fabric switch, and check the
173 ``OOB Management`` checkbox.
Zack Williams34c30e52020-11-16 10:55:00 -0700174
Zack Williamsa7c170f2020-11-25 12:59:49 -070017512. Create IP addresses for the physical and virtual interfaces. These should
Zack Williams34c30e52020-11-16 10:55:00 -0700176 have the Tenant and VRF set.
177
178 The Management Server should always have the first IP address in each
179 range, and they should be incremental, in this order. Examples are given as
180 if there was a single instance of each device - adding additional devices
181 would increment the later IP addresses.
182
183 * Management Server
Zack Williamsa7c170f2020-11-25 12:59:49 -0700184
Zack Williams34c30e52020-11-16 10:55:00 -0700185 * ``eno1`` - site provided public IP address, or blank if DHCP
Zack Williamsa7c170f2020-11-25 12:59:49 -0700186 provided
187
Zack Williams34c30e52020-11-16 10:55:00 -0700188 * ``eno2`` - 10.0.0.1/25 (first of ADMIN) - set as primary IP
189 * ``bmc`` - 10.0.0.2/25 (next of ADMIN)
190 * ``mgmt800`` - 10.0.0.129/25 (first of MGMT)
Zack Williamsa7c170f2020-11-25 12:59:49 -0700191 * ``fab801`` - 10.0.1.1/25 (first of FAB)
Zack Williams34c30e52020-11-16 10:55:00 -0700192
193 * Management Switch
Zack Williamsa7c170f2020-11-25 12:59:49 -0700194
Zack Williams34c30e52020-11-16 10:55:00 -0700195 * ``gbe1`` - 10.0.0.3/25 (next of ADMIN) - set as primary IP
196
197 * Fabric Switch
Zack Williamsa7c170f2020-11-25 12:59:49 -0700198
Zack Williams34c30e52020-11-16 10:55:00 -0700199 * ``eth0`` - 10.0.0.130/25 (next of MGMT), set as primary IP
200 * ``bmc`` - 10.0.0.131/25
201
202 * Compute Server
Zack Williamsa7c170f2020-11-25 12:59:49 -0700203
Zack Williams34c30e52020-11-16 10:55:00 -0700204 * ``eth0`` - 10.0.0.132/25 (next of MGMT), set as primary IP
205 * ``bmc`` - 10.0.0.4/25 (next of ADMIN)
206 * ``qsfp0`` - 10.0.1.2/25 (next of FAB)
207 * ``qsfp1`` - 10.0.1.3/25
208
209 * Other Fabric devices (eNB, etc.)
Zack Williamsa7c170f2020-11-25 12:59:49 -0700210
Zack Williams34c30e52020-11-16 10:55:00 -0700211 * ``eth0`` or other primary interface - 10.0.1.4/25 (next of FAB)
212
Zack Williamsa7c170f2020-11-25 12:59:49 -070021313. Add DHCP ranges to the IP Prefixes for IP's that aren't reserved. These are
214 done like any other IP Address, but with the ``Status`` field is set to
215 ``DHCP``, and they'll consume the entire range of IP addresses given in the
216 CIDR mask.
217
218 For example ``10.0.0.32/27`` as a DHCP block would take up 1/4 of the ADMIN
219 prefix.
220
Zack Williamse8cb1212020-12-03 09:48:58 -070022114. Add router IP reservations to the IP Prefix for both Fabric prefixes. These
222 are IP addresses that:
223
224 - Have the last usable address in range (in a ``/25``, this would be
225 ``.126`` or ``.254``)
226
227 - Have a ``Status`` of ``Reserved``, and the VRF, Tenant Group, and Tenant
228 set.
229
230 - The Description must start with the word ``router``, such as: ``router
231 for for leaf1 Fabric``
232
23315. Add Cables between physical interfaces on the devices
Zack Williams34c30e52020-11-16 10:55:00 -0700234
235 TODO: Explain the cabling topology
236
Zack Williams9026f532020-11-30 11:34:32 -0700237Rackmount of Equipment
238----------------------
Zack Williams34c30e52020-11-16 10:55:00 -0700239
Zack Williams9026f532020-11-30 11:34:32 -0700240Most of the Pronto equipment has a 19" rackmount form factor.
Zack Williams34c30e52020-11-16 10:55:00 -0700241
Zack Williams9026f532020-11-30 11:34:32 -0700242Guidelines for mounting this equipment:
Zack Williams34c30e52020-11-16 10:55:00 -0700243
Zack Williams9026f532020-11-30 11:34:32 -0700244- The EdgeCore Wedge Switches have a front-to-back (aka "port-to-power") fan
245 configuration, so hot air exhaust is out the back of the switch near the
246 power inlets, away from the 32 QSFP network ports on the front of the switch.
Zack Williams34c30e52020-11-16 10:55:00 -0700247
Zack Williams9026f532020-11-30 11:34:32 -0700248- The full-depth 1U and 2U Supermicro servers also have front-to-back airflow
249 but have most of their ports on the rear of the device.
Zack Williams34c30e52020-11-16 10:55:00 -0700250
Zack Williams9026f532020-11-30 11:34:32 -0700251- Airflow through the rack should be in one direction to avoid heat being
252 pulled from one device into another. This means that to connect the QSFP
253 network ports from the servers to the switches, cabling should be routed
254 through the rack from front (switch) to back (server). Empty rack spaces
255 should be reserved for this purpose.
Zack Williams34c30e52020-11-16 10:55:00 -0700256
Zack Williams9026f532020-11-30 11:34:32 -0700257- The short-depth management HP Switch and 1U Supermicro servers should be
258 mounted on the rear of the rack. They both don't generate an appreciable
259 amount of heat, so the airflow direction isn't a significant factor in
260 racking them.
Zack Williams34c30e52020-11-16 10:55:00 -0700261
262Inventory
263---------
264
265Once equipment arrives, any device needs to be recorded in inventory if it:
266
2671. Connects to the network (has a MAC address)
2682. Has a serial number
2693. Isn't a subcomponent (disk, add-in card, linecard, etc.) of a larger device.
270
271The following information should be recorded for every device:
272
273- Manufacturer
274- Model
275- Serial Number
276- MAC address (for the primary and any management/BMC/IPMI interfaces)
277
278This information should be be added to the corresponding Devices ONF NetBox
279instance. The accuracy of this information is very important as it is used in
280bootstrapping the systems.
281
282Once inventory has been completed, let the Infra team know, and the pxeboot
283configuration will be generated to have the OS preseed files corresponding to the
284new servers based on their serial numbers.
285
Zack Williams34c30e52020-11-16 10:55:00 -0700286Cabling and Network Topology
287----------------------------
288
289TODO: Add diagrams of network here, and cabling plan
290
291Management Switch Bootstrap
292---------------------------
293
294TODO: Add instructions for bootstrapping management switch, from document that
295has the linked config file.
296
Zack Williams9026f532020-11-30 11:34:32 -0700297Software Bootstrap
298------------------
Zack Williams34c30e52020-11-16 10:55:00 -0700299
300Management Server Bootstrap
301"""""""""""""""""""""""""""
302
303The management server is bootstrapped into a customized version of the standard
304Ubuntu 18.04 OS installer.
305
306The `iPXE boot firmware <https://ipxe.org/>`_. is used to start this process
307and is built using the steps detailed in the `ipxe-build
308<https://gerrit.opencord.org/plugins/gitiles/ipxe-build>`_. repo, which
309generates both USB and PXE chainloadable boot images.
310
311Once a system has been started using these images started, these images will
312download a customized script from an external webserver to continue the boot
313process. This iPXE to webserver connection is secured with mutual TLS
314authentication, enforced by the nginx webserver.
315
316The iPXE scripts are created by the `pxeboot
317<https://gerrit.opencord.org/plugins/gitiles/ansible/role/pxeboot>`_ role,
318which creates both a boot menu, downloads the appropriate binaries for
319bootstrapping an OS installation, and creates per-node installation preseed files.
320
321The preseed files contain configuration steps to install the OS from the
322upstream Ubuntu repos, as well as customization of packages and creating the
323``onfadmin`` user.
324
325TODO: convert instructions for bootstrapping the management server with iPXE here.
326
327Once the OS is installed on the management server, Ansible is used to remotely
328install software on the management server.
329
330To checkout the ONF ansible repo and enter the virtualenv with the tooling::
331
332 mkdir infra
333 cd infra
334 repo init -u ssh://<your gerrit username>@gerrit.opencord.org:29418/infra-manifest
335 repo sync
336 cd ansible
337 make galaxy
338 source venv_onfansible/bin/activate
339
Zack Williamsa7c170f2020-11-25 12:59:49 -0700340Obtain the ``undionly.kpxe`` iPXE artifact for bootstrapping the compute
Zack Williams9026f532020-11-30 11:34:32 -0700341servers, and put it in the ``playbook/files`` directory.
Zack Williamsa7c170f2020-11-25 12:59:49 -0700342
Zack Williams34c30e52020-11-16 10:55:00 -0700343Next, create an inventory file to access the NetBox API. An example is given
344in ``inventory/example-netbox.yml`` - duplicate this file and modify it. Fill
345in the ``api_endpoint`` address and ``token`` with an API key you get out of
346the NetBox instance. List the IP Prefixes used by the site in the
347``ip_prefixes`` list.
348
349Next, run the ``scripts/netbox_edgeconfig.py`` to generate a host_vars file for
350the management server. Assuming that the management server in the edge is
351named ``mgmtserver1.stage1.menlo``, you'd run::
352
353 python scripts/netbox_edgeconfig.py inventory/my-netbox.yml > inventory/host_vars/mgmtserver1.stage1.menlo.yml
354
Zack Williamsa7c170f2020-11-25 12:59:49 -0700355One manual change needs to be made to this output - edit the
356``inventory/host_vars/mgmtserver1.stage1.menlo.yml`` file and add the following
Zack Williamse8cb1212020-12-03 09:48:58 -0700357to the bottom of the file, replacing the IP addresses with the management
358server IP address for each segment.
359
360In the case of the Fabric that has two leaves and IP ranges, add the Management
361server IP address used for the leaf that it is connected to, and then add a
362route for the other IP address range for the non-Management-connected leaf that
363is via the Fabric router address in that range.
364
365This configures the `netplan <https://netplan.io>`_ on the management server,
366and will be automated away soon::
Zack Williamsa7c170f2020-11-25 12:59:49 -0700367
368 # added manually
369 netprep_netplan:
370 ethernets:
371 eno2:
372 addresses:
373 - 10.0.0.1/25
374 vlans:
375 mgmt800:
376 id: 800
377 link: eno2
378 addresses:
379 - 10.0.0.129/25
380 fabr801:
381 id: 801
382 link: eno2
383 addresses:
Zack Williamse8cb1212020-12-03 09:48:58 -0700384 - 10.0.1.129/25
385 routes:
386 - to: 10.0.1.0/25
387 via: 10.0.1.254
388 weight: 100
Zack Williamsa7c170f2020-11-25 12:59:49 -0700389
Zack Williams9026f532020-11-30 11:34:32 -0700390Using the ``inventory/example-aether.ini`` as a template, create an
391:doc:`ansible inventory <ansible:user_guide/intro_inventory>` file for the
392site. Change the device names, IP addresses, and ``onfadmin`` password to match
393the ones for this site. The management server's configuration is in the
394``[aethermgmt]`` and corresponding ``[aethermgmt:vars]`` section.
Zack Williams34c30e52020-11-16 10:55:00 -0700395
396Then, to configure a management server, run::
397
Zack Williams9026f532020-11-30 11:34:32 -0700398 ansible-playbook -i inventory/sitename.ini playbooks/aethermgmt-playbook.yml
Zack Williams34c30e52020-11-16 10:55:00 -0700399
400This installs software with the following functionality:
401
402- VLANs on second Ethernet port to provide connectivity to the rest of the pod.
403- Firewall with NAT for routing traffic
404- DHCP and TFTP for bootstrapping servers and switches
405- DNS for host naming and identification
Zack Williamsa7c170f2020-11-25 12:59:49 -0700406- HTTP server for serving files used for bootstrapping switches
Zack Williams9026f532020-11-30 11:34:32 -0700407- Downloads the Tofino switch image
408- Creates user accounts for administrative access
Zack Williams34c30e52020-11-16 10:55:00 -0700409
410Compute Server Bootstrap
411""""""""""""""""""""""""
412
413Once the management server has finished installation, it will be set to offer
414the same iPXE bootstrap file to the computer.
415
416Each node will be booted, and when iPXE loads select the ``Ubuntu 18.04
417Installer (fully automatic)`` option.
Zack Williamsa7c170f2020-11-25 12:59:49 -0700418
419The nodes can be controlled remotely via their BMC management interfaces - if
420the BMC is at ``10.0.0.3`` a remote user can SSH into them with::
421
422 ssh -L 2443:10.0.0.3:443 onfadmin@<mgmt server ip>
423
424And then use their web browser to access the BMC at::
425
426 https://localhost:2443
427
428The default BMC credentials for the Pronto nodes are::
429
430 login: ADMIN
431 password: Admin123
432
Zack Williams9026f532020-11-30 11:34:32 -0700433The BMC will also list all of the MAC addresses for the network interfaces
434(including BMC) that are built into the logic board of the system. Add-in
435network cards like the 40GbE ones used in compute servers aren't listed.
436
437To prepare the compute nodes, software must be installed on them. As they
438can't be accessed directly from your local system, a :ref:`jump host
439<ansible:use_ssh_jump_hosts>` configuration is added, so the SSH connection
440goes through the management server to the compute systems behind it. Doing this
441requires a few steps:
442
443First, configure SSH to use Agent forwarding - create or edit your
444``~/.ssh/config`` file and add the following lines::
445
446 Host <management server IP>
447 ForwardAgent yes
448
449Then try to login to the management server, then the compute node::
450
451 $ ssh onfadmin@<management server IP>
452 Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-54-generic x86_64)
453 ...
454 onfadmin@mgmtserver1:~$ ssh onfadmin@10.0.0.138
455 Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-54-generic x86_64)
456 ...
457 onfadmin@node2:~$
458
459Being able to login to the compute nodes from the management node means that
460SSH Agent forwarding is working correctly.
461
462Verify that your inventory (Created earlier from the
463``inventory/example-aether.ini`` file) includes an ``[aethercompute]`` section
464that has all the names and IP addresses of the compute nodes in it.
465
466Then run a ping test::
467
468 ansible -i inventory/sitename.ini -m ping aethercompute
469
470It may ask you about authorized keys - answer ``yes`` for each host to trust the keys::
471
472 The authenticity of host '10.0.0.138 (<no hostip for proxy command>)' can't be established.
473 ECDSA key fingerprint is SHA256:...
474 Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
475
476You should then see a success message for each host::
477
478 node1.stage1.menlo | SUCCESS => {
479 "changed": false,
480 "ping": "pong"
481 }
482 node2.stage1.menlo | SUCCESS => {
483 "changed": false,
484 "ping": "pong"
485 }
486 ...
487
488Once you've seen this, run the playbook to install the prerequisites (Terraform
489user, Docker)::
490
491 ansible-playbook -i inventory/sitename.ini playbooks/aethercompute-playbook.yml
492
493Note that Docker is quite large and may take a few minutes for installation
494depending on internet connectivity.
495
496Now that these compute nodes have been brought up, the rest of the installation
497can continue.