blob: e0543d2873c20fb8debb2dfa6b45d115b3f5f2cd [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
22114. Add Cables between physical interfaces on the devices
Zack Williams34c30e52020-11-16 10:55:00 -0700222
223 TODO: Explain the cabling topology
224
Zack Williams9026f532020-11-30 11:34:32 -0700225Rackmount of Equipment
226----------------------
Zack Williams34c30e52020-11-16 10:55:00 -0700227
Zack Williams9026f532020-11-30 11:34:32 -0700228Most of the Pronto equipment has a 19" rackmount form factor.
Zack Williams34c30e52020-11-16 10:55:00 -0700229
Zack Williams9026f532020-11-30 11:34:32 -0700230Guidelines for mounting this equipment:
Zack Williams34c30e52020-11-16 10:55:00 -0700231
Zack Williams9026f532020-11-30 11:34:32 -0700232- The EdgeCore Wedge Switches have a front-to-back (aka "port-to-power") fan
233 configuration, so hot air exhaust is out the back of the switch near the
234 power inlets, away from the 32 QSFP network ports on the front of the switch.
Zack Williams34c30e52020-11-16 10:55:00 -0700235
Zack Williams9026f532020-11-30 11:34:32 -0700236- The full-depth 1U and 2U Supermicro servers also have front-to-back airflow
237 but have most of their ports on the rear of the device.
Zack Williams34c30e52020-11-16 10:55:00 -0700238
Zack Williams9026f532020-11-30 11:34:32 -0700239- Airflow through the rack should be in one direction to avoid heat being
240 pulled from one device into another. This means that to connect the QSFP
241 network ports from the servers to the switches, cabling should be routed
242 through the rack from front (switch) to back (server). Empty rack spaces
243 should be reserved for this purpose.
Zack Williams34c30e52020-11-16 10:55:00 -0700244
Zack Williams9026f532020-11-30 11:34:32 -0700245- The short-depth management HP Switch and 1U Supermicro servers should be
246 mounted on the rear of the rack. They both don't generate an appreciable
247 amount of heat, so the airflow direction isn't a significant factor in
248 racking them.
Zack Williams34c30e52020-11-16 10:55:00 -0700249
250Inventory
251---------
252
253Once equipment arrives, any device needs to be recorded in inventory if it:
254
2551. Connects to the network (has a MAC address)
2562. Has a serial number
2573. Isn't a subcomponent (disk, add-in card, linecard, etc.) of a larger device.
258
259The following information should be recorded for every device:
260
261- Manufacturer
262- Model
263- Serial Number
264- MAC address (for the primary and any management/BMC/IPMI interfaces)
265
266This information should be be added to the corresponding Devices ONF NetBox
267instance. The accuracy of this information is very important as it is used in
268bootstrapping the systems.
269
270Once inventory has been completed, let the Infra team know, and the pxeboot
271configuration will be generated to have the OS preseed files corresponding to the
272new servers based on their serial numbers.
273
Zack Williams34c30e52020-11-16 10:55:00 -0700274Cabling and Network Topology
275----------------------------
276
277TODO: Add diagrams of network here, and cabling plan
278
279Management Switch Bootstrap
280---------------------------
281
282TODO: Add instructions for bootstrapping management switch, from document that
283has the linked config file.
284
Zack Williams9026f532020-11-30 11:34:32 -0700285Software Bootstrap
286------------------
Zack Williams34c30e52020-11-16 10:55:00 -0700287
288Management Server Bootstrap
289"""""""""""""""""""""""""""
290
291The management server is bootstrapped into a customized version of the standard
292Ubuntu 18.04 OS installer.
293
294The `iPXE boot firmware <https://ipxe.org/>`_. is used to start this process
295and is built using the steps detailed in the `ipxe-build
296<https://gerrit.opencord.org/plugins/gitiles/ipxe-build>`_. repo, which
297generates both USB and PXE chainloadable boot images.
298
299Once a system has been started using these images started, these images will
300download a customized script from an external webserver to continue the boot
301process. This iPXE to webserver connection is secured with mutual TLS
302authentication, enforced by the nginx webserver.
303
304The iPXE scripts are created by the `pxeboot
305<https://gerrit.opencord.org/plugins/gitiles/ansible/role/pxeboot>`_ role,
306which creates both a boot menu, downloads the appropriate binaries for
307bootstrapping an OS installation, and creates per-node installation preseed files.
308
309The preseed files contain configuration steps to install the OS from the
310upstream Ubuntu repos, as well as customization of packages and creating the
311``onfadmin`` user.
312
313TODO: convert instructions for bootstrapping the management server with iPXE here.
314
315Once the OS is installed on the management server, Ansible is used to remotely
316install software on the management server.
317
318To checkout the ONF ansible repo and enter the virtualenv with the tooling::
319
320 mkdir infra
321 cd infra
322 repo init -u ssh://<your gerrit username>@gerrit.opencord.org:29418/infra-manifest
323 repo sync
324 cd ansible
325 make galaxy
326 source venv_onfansible/bin/activate
327
Zack Williamsa7c170f2020-11-25 12:59:49 -0700328Obtain the ``undionly.kpxe`` iPXE artifact for bootstrapping the compute
Zack Williams9026f532020-11-30 11:34:32 -0700329servers, and put it in the ``playbook/files`` directory.
Zack Williamsa7c170f2020-11-25 12:59:49 -0700330
Zack Williams34c30e52020-11-16 10:55:00 -0700331Next, create an inventory file to access the NetBox API. An example is given
332in ``inventory/example-netbox.yml`` - duplicate this file and modify it. Fill
333in the ``api_endpoint`` address and ``token`` with an API key you get out of
334the NetBox instance. List the IP Prefixes used by the site in the
335``ip_prefixes`` list.
336
337Next, run the ``scripts/netbox_edgeconfig.py`` to generate a host_vars file for
338the management server. Assuming that the management server in the edge is
339named ``mgmtserver1.stage1.menlo``, you'd run::
340
341 python scripts/netbox_edgeconfig.py inventory/my-netbox.yml > inventory/host_vars/mgmtserver1.stage1.menlo.yml
342
Zack Williamsa7c170f2020-11-25 12:59:49 -0700343One manual change needs to be made to this output - edit the
344``inventory/host_vars/mgmtserver1.stage1.menlo.yml`` file and add the following
Zack Williams9026f532020-11-30 11:34:32 -0700345to the bottom of the file, replacing the IP addresses with *only the lowest
346numbered IP address* the management server has on each VLAN (if >1 IP address
347is assigned to a VLAN or Interface, the DHCP server will fail to run). This
348configures the `netplan <https://netplan.io>`_ on the management server, and
349will be automated away soon::
Zack Williamsa7c170f2020-11-25 12:59:49 -0700350
351 # added manually
352 netprep_netplan:
353 ethernets:
354 eno2:
355 addresses:
356 - 10.0.0.1/25
357 vlans:
358 mgmt800:
359 id: 800
360 link: eno2
361 addresses:
362 - 10.0.0.129/25
363 fabr801:
364 id: 801
365 link: eno2
366 addresses:
367 - 10.0.1.1/25
368
Zack Williams9026f532020-11-30 11:34:32 -0700369Using the ``inventory/example-aether.ini`` as a template, create an
370:doc:`ansible inventory <ansible:user_guide/intro_inventory>` file for the
371site. Change the device names, IP addresses, and ``onfadmin`` password to match
372the ones for this site. The management server's configuration is in the
373``[aethermgmt]`` and corresponding ``[aethermgmt:vars]`` section.
Zack Williams34c30e52020-11-16 10:55:00 -0700374
375Then, to configure a management server, run::
376
Zack Williams9026f532020-11-30 11:34:32 -0700377 ansible-playbook -i inventory/sitename.ini playbooks/aethermgmt-playbook.yml
Zack Williams34c30e52020-11-16 10:55:00 -0700378
379This installs software with the following functionality:
380
381- VLANs on second Ethernet port to provide connectivity to the rest of the pod.
382- Firewall with NAT for routing traffic
383- DHCP and TFTP for bootstrapping servers and switches
384- DNS for host naming and identification
Zack Williamsa7c170f2020-11-25 12:59:49 -0700385- HTTP server for serving files used for bootstrapping switches
Zack Williams9026f532020-11-30 11:34:32 -0700386- Downloads the Tofino switch image
387- Creates user accounts for administrative access
Zack Williams34c30e52020-11-16 10:55:00 -0700388
389Compute Server Bootstrap
390""""""""""""""""""""""""
391
392Once the management server has finished installation, it will be set to offer
393the same iPXE bootstrap file to the computer.
394
395Each node will be booted, and when iPXE loads select the ``Ubuntu 18.04
396Installer (fully automatic)`` option.
Zack Williamsa7c170f2020-11-25 12:59:49 -0700397
398The nodes can be controlled remotely via their BMC management interfaces - if
399the BMC is at ``10.0.0.3`` a remote user can SSH into them with::
400
401 ssh -L 2443:10.0.0.3:443 onfadmin@<mgmt server ip>
402
403And then use their web browser to access the BMC at::
404
405 https://localhost:2443
406
407The default BMC credentials for the Pronto nodes are::
408
409 login: ADMIN
410 password: Admin123
411
Zack Williams9026f532020-11-30 11:34:32 -0700412The BMC will also list all of the MAC addresses for the network interfaces
413(including BMC) that are built into the logic board of the system. Add-in
414network cards like the 40GbE ones used in compute servers aren't listed.
415
416To prepare the compute nodes, software must be installed on them. As they
417can't be accessed directly from your local system, a :ref:`jump host
418<ansible:use_ssh_jump_hosts>` configuration is added, so the SSH connection
419goes through the management server to the compute systems behind it. Doing this
420requires a few steps:
421
422First, configure SSH to use Agent forwarding - create or edit your
423``~/.ssh/config`` file and add the following lines::
424
425 Host <management server IP>
426 ForwardAgent yes
427
428Then try to login to the management server, then the compute node::
429
430 $ ssh onfadmin@<management server IP>
431 Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-54-generic x86_64)
432 ...
433 onfadmin@mgmtserver1:~$ ssh onfadmin@10.0.0.138
434 Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-54-generic x86_64)
435 ...
436 onfadmin@node2:~$
437
438Being able to login to the compute nodes from the management node means that
439SSH Agent forwarding is working correctly.
440
441Verify that your inventory (Created earlier from the
442``inventory/example-aether.ini`` file) includes an ``[aethercompute]`` section
443that has all the names and IP addresses of the compute nodes in it.
444
445Then run a ping test::
446
447 ansible -i inventory/sitename.ini -m ping aethercompute
448
449It may ask you about authorized keys - answer ``yes`` for each host to trust the keys::
450
451 The authenticity of host '10.0.0.138 (<no hostip for proxy command>)' can't be established.
452 ECDSA key fingerprint is SHA256:...
453 Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
454
455You should then see a success message for each host::
456
457 node1.stage1.menlo | SUCCESS => {
458 "changed": false,
459 "ping": "pong"
460 }
461 node2.stage1.menlo | SUCCESS => {
462 "changed": false,
463 "ping": "pong"
464 }
465 ...
466
467Once you've seen this, run the playbook to install the prerequisites (Terraform
468user, Docker)::
469
470 ansible-playbook -i inventory/sitename.ini playbooks/aethercompute-playbook.yml
471
472Note that Docker is quite large and may take a few minutes for installation
473depending on internet connectivity.
474
475Now that these compute nodes have been brought up, the rest of the installation
476can continue.