one_knight_scripting

joined 1 year ago
[–] one_knight_scripting@lemmy.world 3 points 2 weeks ago* (last edited 2 weeks ago)

Here is a more or less automated install for root on zfs. Need at least three hdds preferably in an hba and can withstand the loss of at least one drive.

https://github.com/Reddimes/ubuntu-zfsraid10/tree/debian-raidz1

There is also an Ubuntu ZFS RAID 10 branch.

[–] one_knight_scripting@lemmy.world 4 points 2 weeks ago* (last edited 2 weeks ago)

I gotta give LibreElec a 👍. If your tv can do HDMI control, then using the remote to control Kodi works by default.

Jellyfish plugin works incredibly easily too. YouTube, not so much. Google API is not up to spec.

I would like to put in something that I over heard about the pi5, it apparently can run Android tv. Which would solve all your requirements.

[–] one_knight_scripting@lemmy.world 2 points 3 weeks ago* (last edited 2 weeks ago)

Heads up, this is going to be an incredibly detailed comment, sorry. So, at the time I stood up that cluster, it was not in Ceph. I had setup the host to run Ubuntu 24.04 with Root on ZFS and the host was simply connected to itself via NFS.

Here is the Github I created for the Root on ZFS installation, I'm not sure if you are familiar with ZFS but it is an incredibly feature rich filesystem. Similar to BTRFS, you can take snapshots of the server so basically if your host goes down you have a backup at least. On top of that, you get L2ARC caching. Basically, any time it reads or writes to my zpool, that is handled in the background by my NVMe SSD. It also caches the most frequently used files so that it doesn't have to read from a HDD everytime. I will admit that ZFS does use a lot of memory, but the L2ARC kinda saved me from that on this server.

Ultimately that cluster was not connected to CEPH, but simply NFS. Still, I created a Github repository which is basically just one command to get Ubuntu 24.04 installed with Root on ZFS. https://github.com/Reddimes/ubuntu-zfsraid10. Its not prefect, if it seems like it is frozen, just hit enter a couple times, I don't know where it is getting hung up and I'm too lazy to figure it out. After that, I followed this guide for turning it into a Cloudstack Host: https://rohityadav.cloud/blog/cloudstack-kvm/.

That was my initial setup. But now I have it setup significantly differently. I rebuilt my host, installed Ubuntu 24.04 to my NVMe drive this time. Did some fairly basic setup with Cephadm to deploy the osds. After the OSD's were deployed, I followed this guide for getting it setup with cloudstack: https://www.shapeblue.com/ceph-and-cloudstack-part-1/. The only other issue is that you do need a secondary storage server as well. I've personally decided to use NFS for that similar to my original setup. Now Ceph does use a LOT of memory. It is currently the only thing running on my host and I've attached a screenshot. 77GB!!! OoooWeee... A bit high. Admittedly, this is likely because I am not running just the Rados image store, but also an *arr stack in cephfs on it. And though I have 12 HDDS, some of them have smart poweron time exceeding 7 years. So ignore the scrubbing, please.

I do potentially see some issues, with ceph, the data is supposed to be redundant, but I've only provided one ip for it for the moment until I figure out the issues I'm having with my other server. That is some exploration that I've not done yet.

Finally takes a breath Anyways, the reason I choose Cloudstack was to delve into the DevOps space a little bit except home built and self-hosted. It is meant to be quite large, and be used by actual cloud providers. In fact, it is meant to have actual public IP addresses which get assigned to the Centos Firewalls that it creates for each network. In a homelab, I had to get a little creative and setup a "public" network on a vlan controlled by my hardware firewall. This does mean that if I actually want something to be public that I need to actually forward it from my hardware firewall, but otherwise, no issue. Going back to the DevOps learning path, not only can you set up linux servers with cloud-init user data, but Terraform works by default and it acts quite similar to Terraform and AWS.

The thing that is interesting about K8S deployments is that it is just the click of a single button. Sure, first you have to download the iso, or build your own with the built-in script, but Cloudstack manipulates the cloud-init user data of each node in the cluster to set it up automatically whether it is a control node, or a worker node. After that, you do need to update the virtual machines running it. I'm sure there is a proper way to use Ansible, but I've run into a couple of issue with it and did it manually via ssh.

Edit: Yes, those nodes were all VMs.

[–] one_knight_scripting@lemmy.world 1 points 3 weeks ago (2 children)

Yeah my storage was beefed up at the time. Zfs raid 10. But I've changed to using ceph for shared redundant storage.

[–] one_knight_scripting@lemmy.world 1 points 3 weeks ago (4 children)

I'm a little curious what you are using for a hypervisor. I'm using Apache Cloudstack. Apache Cloudstack had a lot of the same features as AWS and Azure. Basically, I have 1000 vlans prepared to stand up virtual networking. Cloudstack uses Centos to stand up virtual firewalls for the ones in use. These firewalls not only handle firewall rules, but can also do load balancing which I use for k8s. You can also make the networks HA by just checking a box when you stand it up. This runs a second firewall that only kicks in if the main one stops responding. The very reason I used Cloudstack was because of how easy it is to setup a k8s cluster. Biggest cluster I've stood up is 2 control nodes and 25 worker nodes, it took 12 minutes to deploy.

[–] one_knight_scripting@lemmy.world 2 points 1 month ago (1 children)

Yeah, those data questions are really loaded. I don't host for privacy or what not. It's because of a learning objective, to study, experiment, and run automated stock trading algorithms. I don't exactly have anything to hide from private companies.

[–] one_knight_scripting@lemmy.world 2 points 1 month ago (1 children)

Then what are your hands doing under the table?

...

WHAT ARE YOUR HANDS DOING UNDER THE TABLE??!!

[–] one_knight_scripting@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

I would argue for Apache Cloudstack personally.

Though I have used and like Proxmox as well.

What this cat said.

[–] one_knight_scripting@lemmy.world 2 points 3 months ago* (last edited 3 months ago)

Interesting. One other option is to use OrangePi for the server. OrangePi has ARC over HDMI and that would count as an input.

I did choose the WiSa surround sound system linked. I'll cannibalize it later to make better speakers. I like it because it is audio at 24 bit/96kHz. It also just uses the HDMI ARC.

Radio signal(I'm a comm/nav aircraft mechanic, I had to know):

  • 5 GHz spectrum
  • Fixed latency of 2.6 ms
[–] one_knight_scripting@lemmy.world 2 points 3 months ago (1 children)

Straight up, that is awesome. I absolutely love it.

29
DIY Sonos Project (lemmy.world)
submitted 3 months ago* (last edited 3 months ago) by one_knight_scripting@lemmy.world to c/selfhosted@lemmy.world
 

Hey Self Hosted!

Got a shower thought I wanna bounce off youse guys. It's half-baked but itching to become real: DIY Sonos-like surround sound using Raspberry Pis (or maybe other SBCs if Pi's not cut out for it). Need your brains to kick things off!

The Vision:

Server Pi

  • Acts as the brain. Takes 5.1 audio input from the TV (SPDIF? HDMI? Still figuring that out).

Client Pis

Wireless speakers running balenaSound or similar. Each handles a specific channel (front left, rear right, etc.). I do picture each of these being connected to a amplifier board. With some fancy wiring to give Raspberry pi voltages and power required for the amplifiers. (Something like this: https://a.co/d/fwkXuCm)

The Hurdles:

5.1 Audio Input

Can a Pi even handle 5.1 audio input? Do I need a fancy sound card/HAT? Or should I ditch the Pi for something beefier?

Channel Remapping Sorcery

Wiring all speakers the same (e.g., left channel only) but using Linux wizardry to assign which channel each speaker plays. Like, plug in a "rear right" speaker, tell the Pi "yo, you’re rear right now," and boom—it works. Possible? Or am I dreaming?

Why? Swapping speakers without rewiring = less headache. Plus, modularity.

First roadblock: Getting clean 5.1 into a Pi. Second headache: Software channel routing.

Anyone tackled something like this before? Am I reinventing a wheel that’s already on fire?

Edit: I think I may actually have found a solution even cheaper and I intended. Has anyone here ever heard of WiSa? Long story short it is a solution for Wireless Audio Cinemas. Mostly it is used in very expensive speakers, I'm talking like $5K USD for a whole system. However. I have found a much cheaper solution: https://a.co/d/fXkaMEX. This would be a good starter point for me because the server side already does everything that I want it to. The client side(speakers) are just about there... But I want to see better drivers and amplifiers. If I were to purchase this, I would use it as is initially, but eventually cannibalize the WiSa adapter, attach it to a strong amplifier, and mount the result in a better set of speakers.

 

Hello there Selfhosted community!

This is an announcement of the completion of a project I've been working on. A Script for installing Ubuntu 24.04 on a ZFS RAID 10. Now, I'd like to describe why I choose to develop this and how I'd like for other people to have access to it as well. Let us start with the hardware.

Now, I am using an old host. My host in particular was originally a BCDR device that was based on a ZFS raidz implementation. Since it was designed for ZFS, it doesn't even have a RAID card, it only has an HBA anyways. So for redundancy, ZFS is a good way to go. Now, even though this was a backup appliance, it did not have root on ZFS. Instead, it had a separate harddrive for the operating system and three individual disks for the zpool. This was not my goal.

So I did a little research and testing. I looked at two particular guides (Debian/Ubuntu). Now, I performed those steps a dozens of times because I kept messing up the little things. And to eliminate the human error(that's me) I decided to just go ahead and script the whole thing.

The Github Repository I linked contains all the code needed to setup a generic ubuntu-server host using a ZFS RAID 10.

Instructions for starting the script are easy. Boot up a live cd(https://ubuntu.com/download/server). Hit CTRL+ALT+F2 to go into the shell. Run the following command:

bash <(wget -qO- https://raw.githubusercontent.com/Reddimes/ubuntu-zfsraid10/refs/heads/main/tools/install.sh)

This command does clone the repository, changes directory into it, and runs the entrypoint(sudo ./init.sh). Hopefully, this should be easy to customize to meet your needs.

More Engineering details are on the Github.

view more: next ›