User Tools

Site Tools


nndocs:initial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nndocs:initial [2023/10/23 21:00] – [Naptastic Network Playbook] nfs/rdma fuckery naptasticnndocs:initial [2024/12/05 18:16] (current) – stub out thing naptastic
Line 1: Line 1:
 ===== Naptastic Network Playbook ===== ===== Naptastic Network Playbook =====
- +====Partition drives====
-== Pre-install ==+
 Partitioning: The most recent rebuild was shark, for which I took Debian's default EFI setup for the 2TB OS drive. I only changed / to BTRFS instead of ext4. Debian installs itself to a subvolume named @root and makes that subvolume the default, so it's ready for snapshotting backups. Partitioning: The most recent rebuild was shark, for which I took Debian's default EFI setup for the 2TB OS drive. I only changed / to BTRFS instead of ext4. Debian installs itself to a subvolume named @root and makes that subvolume the default, so it's ready for snapshotting backups.
  
-    apt -y install curl vim whois+Add /mnt/snapshots in fstab.
  
-Make sure to enable contrib, non-free, non-free-firmware in /etc/apt/sources.list.+====Move ~ to a BTRFS subvolume==== 
 +Separate snapshotting the OS from snapshotting your files.
  
-Comment out svcrdma in /etc/rdma/modules/rdma.conf or nfs-kernel-server won't startI'm not sure what's **actually** needed to make NFS/RDMA work.+====SSH key for root==== 
 +  mkdir /root/.ssh 
 +  chmod 700 /root/.ssh 
 +  curl https://keys.naptastic.com/david/naptastic.pub >> /root/.ssh/authorized_keys
  
-==== All systems ==== +====Reconfigure SSH==== 
-  * network interface namesCan I automate this? (Of course I can.) +Configure ssh for a high-numbered port, and not to allow password-based logins. Restart sshd. Verify that 'ssh root@localhost' fails. (You didn't forward your agentdid you?).
-  * Profile stuff: Bash, Vim, ? Can I automate this? (Of course I can.) +
-  * Network stuffToo much goddamn customization. +
-  * disable journald; configure logging for everything. +
-    * Make a list of things that need to log +
-    * How exactly do I want logging set up?+
  
-=== All systems with Mellanox adapters === +====Backups==== 
-  * mst* installer +Create /mnt/snapshots. Create an entry in /etc/fstab the same as for / but with "subvol=/":
-  * copy production opensm configuration in case you have take over as SM +
-  * (what needs to change here for VMs using virtual functions?)+
  
-If your host is going to do audio stufffollow the LAD playbook. Which also badly need an update.+  # / was on /dev/nvme0n1p2 during installation 
 +  UUID=some-long-string /               btrfs   noatime,nodiratime,subvol=@rootfs 0       0 
 +  UUID=some-long-string /mnt/snapshots  btrfs   noatime,nodiratime,subvol=/ 0       0
  
-If your host is going to host web stuff, follow the LAMP playbook but keep in mind it's badly out-of-date. Be prepared to search, read docs, look for a better way. +====Install Shorewall==== 
-===== Getting Started =====+  * customize interfaces, rules, policy...? 
 +  * /etc/default/shorewall 
 +  * /etc/shorewall/shorewall.conf 
 +  * systemctl enable 
 +  * reboot a bunch of times because it's not passing traffic for no reason
  
-Perform a network install of Debian.+====Pick the best mirror==== 
 +If the repo is installed or mounted locally: 
 +  deb file:///mnt/debian bookworm main contrib non-free non-free-firmware 
 +  deb-src file:///mnt/debian bookworm main contrib non-free
  
-run the naptastic installer if it didn't run as part of the installer:+If you have to get it via HTTP: 
 +  deb http://mirror.narf.rocks/debian/ bookworm main contrib non-free non-free-firmware 
 +  deb-src http://mirror.narf.rocks/debian/ bookworm main contrib non-free non-free-firmware
  
-  curl https://naptastic.com/initial.sh | /bin/bash+If you have to use public mirrors (RIP): 
 +  deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware 
 +  deb-src http://deb.debian.org/debianbookworm main contrib non-free non-free-firmware
  
-  # This is not necessary unless the installer failed to do it. +====Remove crap==== 
-  mkdir /root/.ssh +  apt -y remove update-notifier pulseaudio-module-bluetooth bluez blueman bluez-cups bluez-obexd modemmanager rtkit
-  chmod 700 /root/.ssh +
-  curl https://keys.naptastic.com/david/naptastic.pub >> /root/.ssh/authorized_keys+
  
-Configure ssh for a high-numbered portand not to allow password-based logins. Restart sshd. Verify that 'ssh root@localhost' fails. (You didn't forward your agentdid you?).+====Install extra packages==== 
 +(This is set up so you can triple-click each block you needcopy/paste or middle-paste into your terminalthen press enter at the end and install everything in one transaction.)
  
-== Check out /etc ==+  apt -y install curl vim whois
  
-(You forwarded your agent, right?)+Hardware hosts add: 
 +   smartmontools mdadm qemu-kvm gparted
  
-    git clone git@github.com:naptastic/etc +Desktops
-    cp -a etc/* /etc/ # does this actually copy .git? Check to make sure, alright? +   hexchat synaptic terminator fonts-lohit-knda fonts-knda keepassx evolution virt-manager network-manager-gnome
-    cd /etc +
-    git status+
  
-and see where you stand.+Audio workstations: 
 +   qjackctl alsa-tools-gui eq10q jalv jamin lilv-utils
  
-Remember: We play with live ammo. Don't `git rm` something unless you're on a host-specific branch.+If you plan to compile your own kernel: 
 +   bison flex libssl-dev ncurses-dev libelf-dev
  
-== Networking ==+====Networking==== 
 +===Device Names=== 
 +  ln -s /dev/null /etc/systemd/network/99-default.link
  
-  ln -s /dev/null /etc/systemd/network/99-default.link # the installer does this+Here is what a link file looks like for an Ethernet device: 
 +  $ cat /etc/systemd/network/20-igb0.link  
 +  # 
 +  # Remember to `update-initramfs -u` after changing this file! 
 +  # 
 +  [Match] 
 +  MACAddress=b4:2e:99:38:a9:66 
 +   
 +  [Link] 
 +  Name=emo0 
 +  MTUBytes=9000
  
-check /etc/network/interfaces because the device name is probably wrong thereTODO Fix that on fresh installs kthx+  * emoX for ports on the motherboard 
 +  * enX for (multi-)gigabit stand-up cards 
 +  * ibX for InfiniBand IPoIB devices (these do not need .link files though) 
 +  * mlxX for Mellanox devices in Ethernet mode
  
-The answer, somehow, is Netplan; I just don't like that answer muchThe answer should be to //remove// layers of complexitynot add themJust name my devices eth0 and eth1dammit, or give me control over the naming.+===Port Conventions=== 
 +is 0-indexedPort 0 on a stand-up card is the farthest from the motherboard. On a motherboardit's the left-most port if there's more than one portI configure ConnectX-3 cards to be InfiniBand on port 0 and Ethernet on port 1so a system ends up with interfaces named ib0 and mlx1.
  
-Some of my systems are using ifupdown, and some I'm not sure how they work, and some don't work right. Linux networking is fucking terrible. +===InfiniBand=== 
-   +  * [[infiniband]] 
-== Disable TTY screen blanking (Only necessary on Debian Jessie and older==+  * mst* installer 
 +  * copy production opensm configuration in case you have take over as SM 
 +  * (what needs to change here for VMs using virtual functions?)
  
-Add this to ''/etc/rc.local'' above the ''exit 0'' line:+Comment out svcrdma in /etc/rdma/modules/rdma.conf or nfs-kernel-server won't start. I'm not sure what's **actually** needed to make NFS/RDMA work.
  
-  sh -c 'setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1'+===Ethernet configuration=== 
 +Is a total mess right now. I don't know what I'm doing or how I want to do it.
  
-===== Options =====+====Hugepages==== 
 +Useful for databases, PHP, Factorio, and probably other things! Add something like this to /etc/sysctl.conf:
  
-maybe you feel like it, maybe you don't. idk. **This will be replaced with customized preseed files**.+  vm.nr_hugepages=512
  
-== For all systems ==+To make a non-persistent change,
  
-  apt -y remove update-notifier pulseaudio-module-bluetooth bluez blueman bluez-cups bluez-obexd modemmanager rtkit +  sysctl -w vm.nr_hugepages=512
  
-== For hardware boxes ==+Make sure your locked memory limit is equal to or greater than the amount of RAM you're reserving for hugepages.
  
-  apt -y install smartmontools qemu-kvm gparted+====Shell profile==== 
 +  * Profile stuff: Bash, Vim, ? Can I automate this? (Of course I can.)
  
-== If you are using a graphical desktop environment ==+====Logging==== 
 +  * disable journald; configure logging for everything. 
 +  * Make a list of things that need to log
  
-(this needs an update: not sure about fonts packages. Also some network-manager-*-gnome packages might be useful depending on what kind of networking you're doing.)+====Email==== 
 +lol, not yet
  
-  apt -y install hexchat synaptic terminator fonts-lohit-knda fonts-knda keepassx evolution virt-manager network-manager-gnome+====Disable TTY screen blanking==== 
 +I don't know when this is necessary anymore. Add this to ''/etc/rc.local'' above the ''exit 0'' line:
  
-== If you plan to do audio work ==+  sh -c 'setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1'
  
-  apt -y install qjackctl alsa-tools-gui eq10q jalv jamin lilv-utils+====Audio workstations====
   cat >> /etc/pulse/daemon.conf   cat >> /etc/pulse/daemon.conf
   default-sample-format = s24le   default-sample-format = s24le
Line 96: Line 130:
   ^D   ^D
  
-== If you plan to compile your own kernel == +More on [[lad]].
- +
-  apt -y install bison flex libssl-dev ncurses-dev libelf-dev+
nndocs/initial.1698094851.txt.gz · Last modified: 2023/10/23 21:00 by naptastic