TODO.org: Update TODOs

This commit is contained in:
Collin J. Doering 2023-04-02 11:59:43 -04:00
parent 4ea84b04fa
commit 41127138de
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022
1 changed files with 227 additions and 11 deletions

238
TODO.org
View File

@ -1086,6 +1086,14 @@ CLOSED: [2023-04-01 Sat 23:29] DEADLINE: <2023-04-04 Tue>
#+end_src
** Backlog :backlog:
DEADLINE: <1990-05-08 Tue>
*** TODO Setup data volumes for all vms, migrating persistent data to them
DEADLINE: <2023-07-01 Sat>
For the purposes of backups, it would be preferred that all important vm data is stored on a
separate volume that is attached to the vm. The reason for this, is because then external
backups of this data can be made (using proxmox backup server replication), without having to
backup the ~/gnu/store~ and other files that can simply be recreated by ~guix~.
*** TODO Improve metrics collection [0/4] :metrics:
**** TODO Make prometheus setup production ready and used everywhere [0%] :metrics:
**** TODO Setup [[https://github.com/msroest/sabnzbd_exporter][sabnzbd_exporter]] (Prometheus exporter for sabnzbd) :home_network:metrics:
@ -1131,6 +1139,27 @@ DEADLINE: <2023-04-30 Sun>
- [ ] [[id:831d3046-3412-4f9b-a66e-cf34e8808250][Sonarr]]
- [ ] [[id:789e5ec4-f800-478a-a1d8-c0fb58a5bd3a][Radarr]]
- [ ] [[id:817e3ed9-0857-40cb-8515-682d69ac943d][Lidarr]]
*** TODO Setup loki (and associated services) in a High-Availability configuration
- [ ] loki
- [ ] Storage considerations
I originally was thinking of just storing logs on disk, but after further consideration
and consultation of the [[https://grafana.com/docs/loki/latest/operations/storage/filesystem][loki documentation]], decided it would be best to use the s3
backend with my local ceph/rados powered s3. See the [[https://grafana.com/docs/loki/latest/operations/storage/filesystem][s3-exapnded-config.yaml]] they provide
in their documentation as a starting point.
- [ ] rsyslog (syslog collector)
- [ ] promtail
- [ ] orchestrating deployment
I expect this to be done with ~guix deploy~ (but would require support for running
docker-compose from guix).
*** TODO Setup guix on personal pinebook pro
*** TODO Setup guix on dell personal laptop
** Ideas :spike:
DEADLINE: <1990-05-08 Tue>
*** TODO Setup [[https://github.com/home-assistant/core][home-assistant]] accessible on ~<SOMETHING>.home.rekahsoft.ca~
@ -1172,11 +1201,19 @@ Checked indicates VMs that use docker/docker-compose (and either depend on files
- [X] [[file:.guix/rekahsoft/guix-config/vms/searx0-home-rekahsoft-ca.scm]]
- [X] [[file:.guix/rekahsoft/guix-config/vms/vault0-home-rekahsoft-ca.scm]]
** TODO [#A] Setup btrfs backups (using [[id:86cd693b-b56e-40a4-a56d-7b912c62e6f2][Btrbk]] + cron) [0%]
** TODO [#A] Setup btrfs backup system [0%]
DEADLINE: <2023-04-04 Tue>
*** TODO Setup local 'time-machine' like backups of personal data (using [[id:86cd693b-b56e-40a4-a56d-7b912c62e6f2][Btrbk]] + cron)
- [ ] Personal "Work" laptop
- [ ] Personal laptop
- [ ] pinebook pro
*** TODO Setup remote (in home-network) backup solution for btrbk
This requires a host with a btrfs volume available for backup storage.
** DOING Add missing vm's to Prometheus configuration [75%] :home_network:
DEADLINE: <2023-04-08 Sat>
@ -1238,7 +1275,7 @@ DEADLINE: <2023-04-08 Sat>
- [X] [[file:./.guix/rekahsoft/guix-config/vms/searx0-home-rekahsoft-ca.scm]]
- [X] [[file:./.guix/rekahsoft/guix-config/vms/vault0-home-rekahsoft-ca.scm]]
** DOING [#A] Make loki setup production ready and used everywhere [0%] :metrics:
** DOING [#A] Make loki setup production ready and used everywhere [25%] :metrics:
DEADLINE: <2023-04-15 Sat>
- State "DOING" from "TODO" [2023-03-01 Wed 11:37]
- Note taken on [2021-07-29 Thu 11:51] \\
@ -1247,8 +1284,10 @@ DEADLINE: <2023-04-15 Sat>
- https://www.gnu.org/software/inetutils/manual/html_node/syslogd-invocation.html#syslogd-invocation
- https://github.com/prometheus/snmp_exporter
- https://www.robustperception.io/snmp-monitoring-with-prometheus
*** NEXT Setup loki permanent log storage :logging:
*** DONE Setup loki permanent log storage :logging:
CLOSED: [2023-04-02 Sun 08:57]
- State "DONE" from "NEXT" [2023-04-02 Sun 08:57]
- State "NEXT" from "TODO" [2023-04-02 Sun 08:50]
I was having issues getting this to work until I came across the following [[https://github.com/grafana/loki/pull/1834][loki PR]].
@ -1284,14 +1323,191 @@ configuration file in place.
Alternatively, the docker-configuration could be updated to support setting logging
configuration and other options.
** DOING [#A] Setup guix on lenovo t80s personal laptop
DEADLINE: <2023-03-19 Sun>
- State "DOING" from "TODO" [2022-03-14 Mon 11:50]
*** TODO Setup loki (and associated services) in a High-Availability configuration
*** Notes
- [ ] Storage considerations
I originally was thinking of just storing logs on disk, but after further consideration and
consultation of the [[https://grafana.com/docs/loki/latest/operations/storage/filesystem][loki documentation]], decided it would be best to use the s3 backend with
my local ceph/rados powered s3. See the [[https://grafana.com/docs/loki/latest/operations/storage/filesystem][s3-exapnded-config.yaml]] they provide in their
documentation as a starting point.
**** Partitioning
***** TODO Create disk partition table and layout
#+begin_src bash
# TODO: Create gpt labeled disk
#+end_src
***** Create EFI partition
#+begin_src bash
parted /dev/nvme0n1p1 set 1 esp on
mkfs.fat -F32 /dev/nvme0n1p1
#+end_src
***** Create LUKS container on remainder of disk
#+begin_src bash
cryptsetup luksFormat -l crypt /dev/nvme0n1p2
#+end_src
****** Unlock LUKS container after creation
#+begin_src bash
cryptsetup luksOpen /dev/nvme0n1p2
#+end_src
***** Create LVM2 container inside of LUKS container
****** Create Physical Volume (pv)
#+begin_src bash
pvcreate /dev/mapper/crypt
#+end_src
****** Create Volume Group (vg)
#+begin_src bash
vgcreate vg0 /dev/mapper/crypt
#+end_src
****** Create Logical Volume/s (vg)
#+begin_src bash
vgcreate -L 442G vg0 -n root
vgcreate -l +100%FREE vg0 -n swap
#+end_src
***** Create btrfs 'pool' (file-system) and subvolumes
****** Create btrfs file-system
#+begin_src bash
mkfs.btrfs -l root /dev/vg0/root
#+end_src
****** Create btrfs subvolumes
First mount the btrfs top-level file-system.
#+begin_src bash
mount /dev/vg0/root /mnt
#+end_src
Then create the root subvolume.
#+begin_src bash
btrfs subvolume create /mnt/@
#+end_src
Unmount the top-level btrfs file-system.
#+begin_src bash
umount /mnt
#+end_src
Mount the root subvolume.
#+begin_src bash
mount -o subvol=@,compress=zstd /dev/vg0/root /mnt
#+end_src
Create nested subvolumes for ~/gnu/store~ and ~/home~.
#+begin_src bash
mkdir -p /mnt/gnu /mnt/var/log
btrfs subvolume create /mnt/gnu/store
btrfs subvolume create /mnt/home
# TODO: Should have created these
#btrfs subvolume create /mnt/var/log
#+end_src
***** Create and activate swap
#+begin_src bash
mkswap -l swap /dev/vg0/swap
swapon /dev/vg0/swap
#+end_src
***** Prepare ~/mnt~ for Guix installation
Create ~/boot/efi~ directory for UEFI boot and mount the ESP partition there.
#+begin_src bash
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
#+end_src
Both root and swap are already mounted and ready due to earlier steps.
**** Install Guix
Start ~cow-store~ to allow later steps to write store changes to ~/mnt/gnu/store~ as well as
to bootstrap the system.
#+begin_src bash
herd start cow-store /mnt
#+end_src
#+begin_src bash
guix system init /mnt/etc/config.scm /mnt
#+end_src
***** DONE Figure out how config file should be retrieved
CLOSED: [2022-04-20 Wed 11:47]
- State "DONE" from "TODO" [2022-04-20 Wed 11:47]
Figured out. This should be done through a channel, and is now implemented in the
[[https://git.home.rekahsoft.ca/rekahsoft-public/guix-machines][guix-machines]] repository.
***** DONE Determine what setup looks like if non-free firmware is required
CLOSED: [2022-04-20 Wed 11:48]
- State "DONE" from "TODO" [2022-04-20 Wed 11:48]
This is going to require using a pre-built guix image that includes the appropriate firmware
and blob loader (non-libre linux kernel).
***** TODO Streamline setup as my own disk image
**** Setup user-space
***** Setup flatpak
Flatpak comes installed on Guix without any system of user remotes. Additionally, a
~/var/lib/flatpak~ folder does not exist by default on arch. It could be created, with a
group controlling its permissions, but I instead prefer to keep this to be managed on a
per-user basis. As such, add flathub as a user remote:
#+begin_src sh :results output
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
#+end_src
****** DONE Look into output
CLOSED: [2022-04-20 Wed 11:48]
- State "DONE" from "TODO" [2022-04-20 Wed 11:48]
#+begin_src text
Note that the directories
'/var/lib/flatpak/exports/share'
'/home/collin/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
#+end_src
****** TODO Install flatpak applications
I don't currently know which applications I will be using from flatpak. It will be a fallback
if the package is not available in Non-Guix or Guix repositories, and cannot be easily
packaged.
I will need to develop a nice way to automatically make sure flatpak applications are
installed. For the time being, I will just keep track of what has been installed here.
#+begin_src bash
flatpak install flathub us.zoom.Zoom
flatpak install flathub com.slack.Slack
#+end_src
- [ ]