Skip to content

Commit f65e4b6

Browse files
committed
Add new computer setup steps in user_auth
1 parent a6075f1 commit f65e4b6

2 files changed

Lines changed: 43 additions & 184 deletions

File tree

compute/computer_setup/computer_setup.rst

Lines changed: 29 additions & 183 deletions
Original file line numberDiff line numberDiff line change
@@ -14,70 +14,12 @@ Once the hardware has been connected up, setup proceeds as follows.
1414

1515
**Important note about reinstalls vs. fresh installs:** At this point in the project, we are unlikely to have a completely fresh set of hardware and drives to set up. The below instructions were written under the assumption of a fresh install, so take care not to perform destructive actions like repartitioning on drives with data you want to **keep**. See :doc:`migration` for examples of what those data might be.
1616

17-
BIOS
18-
----
19-
20-
For a new main board, the BIOS should be updated to the latest version.
21-
This is necessary to ensure that the USB ports behave properly, as well
22-
as to ensure that the iKVM module works.
23-
24-
The following settings should also be changed within the BIOS setup menu (reboot, then press F1 when prompted to enter).
25-
26-
For all of AOC/ICC/RTC
27-
~~~~~~~~~~~~~~~~~~~~~~
28-
29-
::
30-
31-
Boot
32-
|
33-
-- Network Device BBS Priorities -- set all to "disabled"
34-
-- Hard Drive BBS Priorities -- set "disabled" for all non-boot SSDs
35-
36-
Advanced
37-
|
38-
-- ACPI Settings
39-
|
40-
-- Enable Hibernation [Disabled]
41-
-- ACPI Suspend State [Suspend Disabled]
42-
-- APM
43-
|
44-
-- Restore AC Power Loss [Power OFF]
45-
46-
(Note that the BIOS likes to reshuffle boot order when drives appear and
47-
disappear in testing or RAID swapping. Disabling non-boot drives ensures
48-
it doesn’t accidentally try to boot from them.)
49-
50-
For ICC/RTC
51-
~~~~~~~~~~~
52-
53-
::
54-
55-
AI Tweaker
56-
|
57-
-- Spread Spectrum [Disabled] {This is critical for allowing PCIe expanion to work}
58-
59-
Advanced
60-
|
61-
-- PCI Subsystem Settings
62-
|
63-
-- Above 4G Decoding [Enabled] {This is critical for allowing PCIe expansion to work}
64-
65-
IntelRCSetup
66-
|
67-
--Processor Configuration
68-
|
69-
-- DCU Mode [32KB 8Way Without ECC] {This is default, ECC not needed for new-style target and host cards}
70-
|
71-
--Miscellaneous Configuration
72-
|
73-
-- Active Video [Onboard Device] {Prevents sending video to a GPU}
74-
7517
OS Installation
7618
---------------
7719

78-
The computers in MagAO-X run Rocky Linux 9.
20+
The computers in MagAO-X run Rocky Linux or Fedora (KDE edition).
7921

80-
**Workstations:** If you are installing a workstation, go to https://rockylinux.org/alternative-images and download the appropriate KDE ISO (x86_64, version 9). (**Note:** As of July 27, 2023, when you get to the installer desktop there is a message about the KDE Connect daemon crashing immediately after boot. It can be safely ignored.)
22+
**Workstations:** If you are installing a workstation, go to https://fedoraproject.org/kde/download/ and download the live ISO for Intel/AMD systems, which includes the installer.
8123

8224
**Rack computers:** If you are installing one of the rack computers, go to https://rockylinux.org/download and download the appropriate minimal ISO (x86_64, version 9).
8325

@@ -97,7 +39,7 @@ In the box at lower left, fill in the machine name (i.e. ``exao1`` for AOC, ``ex
9739
Date & Time
9840
~~~~~~~~~~~
9941

100-
- Timezone: America/Phoenix
42+
- Timezone: Etc/UTC
10143

10244
Partitions
10345
~~~~~~~~~~
@@ -114,104 +56,8 @@ See :doc:`migration` if you're migrating to a new OS or new drives because you'l
11456

11557
- On the data drives (should be 3 or more identical drives):
11658

117-
- All space as ``/data`` - RAID 5
118-
119-
Detailed steps
120-
^^^^^^^^^^^^^^
121-
122-
- *If this is a reinstall:*
123-
124-
- Click on the arrow next to “CentOS Linux…” to expand the list of
125-
existing partitions.
126-
- Click one to select and click the ``-`` button at the bottom of
127-
the list
128-
- Check the box saying
129-
``Delete all filesystems which are only used by CentOS Linux ...``
130-
and confirm
131-
132-
- Choose partitioning scheme = Standard Partition in drop down menu
133-
- Then press ``+`` button:
134-
135-
- Mount Point: ``/boot``
136-
- Desired Capacity: ``1 GiB``
137-
- Now press ``Modify``
138-
139-
- Select the 2x 500 GB O/S drives (Ctrl-click)
140-
- Press select
141-
142-
- Device Type: ``RAID - RAID 1``
143-
- File System: ``XFS``
144-
145-
- Press ``Update Settings``
146-
- Then press ``+`` button:
147-
148-
- Mount Point: swap
149-
- Desired Capacity: 16 GiB
150-
- Now press ``Modify``
151-
152-
- Select the 2 500 GB O/S drives (Ctrl-click)
153-
- Press select
154-
155-
- Device Type: ``RAID - RAID 1``
156-
- File System: ``XFS``
157-
- Press ``Update Settings``
158-
159-
- Then press ``+`` button:
160-
161-
- Mount Point: ``/``
162-
- Desired Capacity: **blank**
163-
- Now press ``Modify``
164-
165-
- Select the 2x 500 GB O/S drives (Ctrl-click)
166-
- Press select
167-
168-
- Device Type: ``RAID - RAID 1``
169-
- File System: ``XFS``
170-
- Change Desired Capacity to **blank** (again)
171-
- Press Update Settings
172-
173-
- should be using all available space for ``/``
174-
175-
- Then press ``+`` button:
176-
177-
- Mount Point: ``/data``
178-
- Desired Capacity: **blank**
179-
- Now press ``Modify``
180-
181-
- Ctrl-click to select all the data drives (>500GB)
182-
- Press select
183-
184-
- Device Type: ``RAID - RAID 5``
185-
- File System: ``XFS``
186-
- Change Desired Capacity to **blank** (again)
187-
- Press Update Settings
188-
189-
- Should now have the full capacity for RAID 5 (N-1)
190-
191-
If you are prompted for a location to install the UEFI boot loader, you
192-
have somehow booted in UEFI mode instead of Legacy Boot / BIOS mode.
193-
(This has been observed booting from a liveUSB, despite UEFI boot being
194-
disabled in BIOS, but it goes away after reordering boot options in the
195-
BIOS interface and attempting to boot again.)
196-
197-
Software
198-
~~~~~~~~
199-
200-
**ICC/RTC:**
201-
202-
From the list on the Left:
203-
204-
- Select “Minimal install”
205-
206-
**AOC:**
207-
208-
From the list on the Left:
209-
210-
- Select “KDE Plasma Workspaces”
211-
212-
From the list on the right:
213-
214-
- Select “Development Tools”
59+
- All space as ``/data`` - RAID 5 **only ICC/RTC**
60+
- All space as ``/home`` - RAID 5 **only AOC**
21561

21662
Begin the installation
21763
~~~~~~~~~~~~~~~~~~~~~~
@@ -254,11 +100,11 @@ takes some time for the initial synchronization of the drives. (Like,
254100
Configure network interface naming
255101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
256102

257-
SystemD, udev, and Dell have conspired to implement something called
103+
SystemD and udev have conspired to implement something called
258104
“predictable network interface names” that could more accurately be
259105
called “unpredictable network interface names”.
260106

261-
**Rocky 9.2:**
107+
**Rocky 9 and Fedora 42:**
262108

263109
The old way seems to have gone, but there are now ""`SystemD Link Files <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_managing_networking/consistent-network-interface-device-naming_configuring-and-managing-networking#assigning-additional-names-to-network-interface-using-systemd-link-files_consistent-network-interface-device-naming>`_"?
264110

@@ -373,29 +219,29 @@ You should also trust the `tailscale0` interface in the firewall::
373219

374220
sudo firewall-cmd --zone trusted --add-interface tailscale0 && sudo firewall-cmd --zone trusted --add-interface tailscale0 --permanent
375221

376-
Configure ``/data`` array options
377-
---------------------------------
378-
379-
We should be able to boot with zero of the drives in the ``/data`` array
380-
without systemd dropping to a recovery prompt.
381-
382-
Edit ``/etc/fstab``, and on the line for ``/data`` replace ``defaults``
383-
with the options ``noauto,x-systemd.automount``.
384-
385222
Setup ssh
386223
---------
387224

388225
- For setup, you should add your public key to the ``/home/xdev/.ssh/authorized_keys`` file, and
389-
make sure you can log in (as ``xdev``) with it without requiring a password.
226+
make sure you can log in (as ``xdev``) without being prompted for a password.
390227

391228
- Now configure ``sshd`` to require key-based authentication. Do this by creating a file with ``sudo vim /etc/ssh/sshd_config.d/disable_password.conf``::
392229

393230
PasswordAuthentication no
394231

395232
- And finally, reload the sshd ``systemctl reload sshd``
396233

397-
Setup network attached storage (NAS)
398-
------------------------------------
234+
Configure ``/data`` array options (RTC and ICC only)
235+
----------------------------------------------------
236+
237+
We should be able to boot with zero of the drives in the ``/data`` array
238+
without systemd dropping to a recovery prompt.
239+
240+
Edit ``/etc/fstab``, and on the line for ``/data`` replace ``defaults``
241+
with the options ``noauto,x-systemd.automount``.
242+
243+
Setup network attached storage (NAS) (optional)
244+
-----------------------------------------------
399245

400246
Follow the steps in :doc:`../nas` to create the ``/srv/nas`` mount.
401247

@@ -408,7 +254,7 @@ monitors will work right. **You’ll want ``ssh`` access in case anything
408254
goes wrong, so make sure it’s working!**
409255

410256
0. Before starting, make sure everything’s up to date:
411-
``yum update -y``
257+
``dnf update -y``
412258

413259
1. Download CUDA 10.1 from
414260
https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.168_418.67_linux.run
@@ -417,7 +263,7 @@ goes wrong, so make sure it’s working!**
417263
and take note of where it is saved
418264

419265
2. Install prerequisites:
420-
``sudo yum install -y kernel-devel kernel-headers``
266+
``sudo dnf install -y kernel-devel kernel-headers``
421267

422268
3. As root, edit the line in ``/etc/default/grub`` that reads
423269

@@ -475,10 +321,10 @@ goes wrong, so make sure it’s working!**
475321

476322
18. Once everything’s working satisfactorily, we want to lock the kernel
477323
version (so that we don’t end up accidentally removing graphical
478-
boot capabilities with a ``yum update -y``):
324+
boot capabilities with a ``dnf update -y``):
479325

480-
1. ``sudo yum install -y yum-versionlock``
481-
2. ``sudo yum versionlock kernel kernel-headers kernel-devel``
326+
1. ``sudo dnf install -y dnf-versionlock``
327+
2. ``sudo dnf versionlock kernel kernel-headers kernel-devel``
482328

483329
.. _automated_provisioning:
484330

@@ -493,15 +339,15 @@ Log in via ``ssh`` as ``xdev``.
493339
::
494340

495341
$ cd
496-
$ git clone https://github.com/magao-x/MagAOX.git
342+
$ git clone https://github.com/magao-x/magao-x-setup.git
497343

498344
2. Switch to the ``magao-x-setup`` directory you just
499345
cloned (i.e. ``cd ~/magao-x-setup``) to perform
500346
pre-provisioning steps (i.e. steps requiring a reboot to take effect)
501347

502348
::
503349

504-
$ cd ~/MagAOX/setup
350+
$ cd ~/magao-x-setup/
505351
$ ./pre_provision.sh
506352

507353
This sets up an ``xsup`` user and the ``magaox`` and ``magaox-dev``
@@ -532,7 +378,7 @@ Log in via ``ssh`` as ``xdev``.
532378

533379
::
534380

535-
$ sudo yum install -y tmux
381+
$ sudo dnf install -y tmux
536382

537383
(It's used by the system, so it'll get installed anyway, but you
538384
might want it when you run the install.)
@@ -564,7 +410,7 @@ Log in via ``ssh`` as ``xdev``.
564410

565411
::
566412

567-
$ cd //MagAOX/setup
413+
$ cd /opt/MagAOX/source/MagAOX/setup
568414
$ bash ./provision.sh
569415

570416
If you installed and invoked ``tmux`` in the previous step, this
@@ -636,4 +482,4 @@ Verify bootloader installation / RAID correctness
636482
Next steps
637483
----------
638484

639-
**Continue with setting up :doc:`../user_auth`**
485+
**Continue with setting up :ref:`new_computer_setup`**

compute/user_auth.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ Any users who have previously logged in will be able to log in with their cached
5353

5454
Users whose accounts are removed **may still be able to access the servers** until their credentials expire from that server's cache. To expire all cache entries immediately, use ``sss_cache -E``.
5555

56-
5756
Giving people and computers access to secrets
5857
---------------------------------------------
5958

@@ -111,6 +110,8 @@ That will look like this::
111110

112111
5. Commit and push your changes to GitHub.
113112

113+
.. _add_a_server:
114+
114115
Updating secrets repository to add a server
115116
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116117

@@ -137,3 +138,15 @@ After the secret files have been updated, you still need to deploy them to the n
137138

138139
5. Commit and push your changes to GitHub.
139140

141+
.. _new_computer_setup:
142+
143+
New computer setup
144+
------------------
145+
146+
When you have just finished the mostly-automated provisioning, you have a computer with two user accounts: ``xdev`` and ``xsup``. To enable login with MagAO-X accounts, you will need to:
147+
148+
1. Get the newly-generated public key from ``/etc/ssh/ssh_host_ed25519_key.pub`` and follow :ref:`add_a_server`
149+
2. Run the ``install_sssd.sh`` script from https://github.com/magao-x/magao-x-setup/blob/main/steps/install_sssd.sh
150+
3. Open up a root terminal (``sudo -i``) and keep it around in case something breaks in the next step
151+
4. Add the necessary symlink to ``hush-hush/deploy-local.d/`` and run ``deploy.sh xdev@$NEW_COMPUTER_HOSTNAME``
152+
5. Verify you can now log in with your MagAO-X account and the appropriate groups are applied and SSH authorized keys are accepted

0 commit comments

Comments
 (0)