cloudflare, plex and terraform docs

This commit is contained in:
Rasmus Wejlgaard 2023-11-12 22:17:43 +00:00
parent edbe8e82f3
commit 9b6697a327
3 changed files with 73 additions and 1 deletions

View file

@ -0,0 +1,31 @@
# Cloudflare
I'm using Cloudflare for a few things so below I will go into detail into each service I'm using on Cloudflare.
## DNS
This is the most self-explanatory. My primary domain `pez.sh` is bought on Hover.com with the DNS servers set to those of Cloudflare.
The various subdomains are managed via [Terraform](../terraform).
## Pages
Pages is a serverless offering that will automatically deploy and serve a website from a GitHub repository.
I have it setup to listen to any commits on my [pez.sh](https://github.com/rwejlgaard/pez.sh) repository so it'll redeploy automatically.
This is also managed via [Terraform](../terraform).
## Tunnels & Zero Trust
Another great offering from Cloudflare is `cloudflared`, a tunnelling solution that makes it very easy to share HTTP services and access them through subdomains on a cloudflare managed domain.
How this works is by installing `cloudflared` onto each server and then set up "routes" that links subdomains with a port on the server. All my HTTP-enabled services are deployed this way.
"What about authorization?" I hear you say! This leads me to the Zero Trust portion of this section.
As part of Cloudflare Zero Trust, we have Cloudflare Access which provides an easy to setup authorization/login screen to services that are exposed via tunnels.
Access allows me to have all my services behind single-sign-on, or I can choose to have it disabled if I want to expose a service to anyone.
Of course this is also managed via [Terraform](../terraform).

View file

@ -1,3 +1,29 @@
# Plex # Plex
\# TODO ## History
My Plex server is what started my homelab. I had two 3 TB drives laying around so I thought I should try out setting up a plex server.
This was hosted on a single Proxmox server on the hardware that would later turn into `london-a`. I thought I was being smart about the way I had it set up, using seperate VMs for each function of the setup with a VM serving the central storage over NFS.
I hadn't thought about the limitations of NFS when I set it up and I would often find that if I was downloading media while streaming I would reach the limits of NFS I/O.
Once I got hold of 3 new hard drives of 8 TBs (24 TB striped capacity). I bit the bullet and installed the OS on the bare metal which leads us to the current setup.
## Current Setup
My current plex setup is running on my `london-b` server. The server is rediculously overpowered as a media server, it's equipped with a Threadripper CPU and an Nvidia GTX 980.
The GPU helps a bit with transcoding while streaming but the CPU can easily transcode plenty fast by itself.
The storage is directly attached to the motherboard and my three 8 TB drives are striped to maximize the usable storage. I don't really care if I loose a disk, since it's only movies and TV shows anyway. Although, it would suck having to re-download everything.
I use the so-called "*arr" stack. Radarr, Sonarr & Prowlarr for movies, TV shows and trackers respectively.
For my download client I first went with Deluge which I **not** like. It was slow and sluggish, constantly corrupting downloads and not cleaning up after itself.
So I'm now using Transmission, which is brilliant. It's so good I'm able to have 100 active torrents at once!
## Future upgrades
I'm planning a rather large purchase to expand my raid array with 21 additional disks which would bring my total capacity to 192 TB (this will not be striped).

View file

@ -0,0 +1,15 @@
# Terraform
## Why
Terraform is ubiquitous in todays infrastructure engineering. The ability to maintain a single source of truth for infrastructure is a crucial part of maintaining stability and "known good" configurations.
It was without even thinking about it that I chose to use Terraform for my infrastructure configuration.
I was working on setting up a few things on Cloudflare and before I knew it I had the repository [pez-terraform](https://github.com/rwejlgaard/pez-terraform) created.
## How
The repository is not very complicated. I have two things I use Terraform for right now - Cloudflare and Azure.
I made the choice not to use modules and instead opted for just having all .tf files in the root with the service prefixed (e.g "cloudflare_dns.tf").