diff --git a/README.md b/README.md index 9d0cc55..1fd4a1a 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,21 @@ # casa -Welcome to my home server repository, where Home Assistant and other services are hosted. +Welcome to my casa repository, where Home Assistant and other services are hosted. This repository is dedicated to documenting and maintaining the server configuration and workflows. The primary goal is to establish an k3s cluster capable of isolating services and communications related to home automation at the network level. -The server operates within its own VLAN (`homesrv`) but requires controlled communication with other VLANs, such as `IOT Vlan` +The server operates within its own VLAN (`casa`) but requires controlled communication with other VLANs, such as `IOT Vlan` **Table of Contents:** -- [Host Setup](#host-setup) - [Home Assistant](#home-assistant) - [Lyrion Music Server (LMS)](#lyrion-music-server-lms) - [Mosquitto](#mosquitto) - [Wyoming](#wyoming) - [Zigbee2mqtt](#zigbee2mqtt) +- [Hosting Setup](#hosting-setup) - [Development, Maintenance and Deployment](#development-maintenance-and-deployment) -## Host Setup - -For more information Host Setup check [readme](.docs/master-node.md). - ## Home Assistant [Git Repo](/:root/marcio.fernandes/homeAssistant) @@ -65,6 +61,10 @@ Zigbee to MQTT bridge, get rid of your proprietary Zigbee bridges Attached SONOFF Universal Zigbee 3.0 USB Dongle Plus to the Proxmox node and configure USB passthrough so the VM can use it. +## Hosting Setup + +For more information about k3s cluster hosting setup check [readme](./docs/k3s-cluster.md). + ## Development, Maintenance and Deployment Using visual studio code an dev container. diff --git a/docs/master-node.md b/docs/k3s-cluster.md similarity index 60% rename from docs/master-node.md rename to docs/k3s-cluster.md index b7d858c..e1846b1 100644 --- a/docs/master-node.md +++ b/docs/k3s-cluster.md @@ -1,15 +1,41 @@ -# Master Node +# Casa k3s cluster + +**Table of Contents:** + +- [Nodes](#nodes) + - [Master Node](#master-node) + - [worker node](#worker-node) + +## Nodes + +**Setup user for ssh access:** + +``` bash +apt install sudo +usermod -aG sudo mf + +``` + +**Disable swap:** + +``` bash +swapoff -a +Edit /etc/fstab and comment out any swap entries: +# /swapfile none swap sw 0 0 +``` + +**Other Packages:** + +``` bash +sudo apt update -y | sudo apt install curl btop -y +``` + +### Master Node - debian 12 - 2g ram - 24Gb disk -**Table of Contents:** - -- [Host Setup](#host-setup) - -## Host Setup - ``` bash ip a # check ethernet name @@ -31,29 +57,26 @@ nameserver 192.168.14.1 EOF ``` -**Setup user for ssh access:** - -``` bash -apt install sudo -usermod -aG sudo mf - -``` - -**Disable swap:** - -``` bash -swapoff -a -Edit /etc/fstab and comment out any swap entries: -# /swapfile none swap sw 0 0 -``` - -**Other Packages:** - -``` bash -sudo apt update -y | sudo apt install curl btop -y -# /swapfile none swap sw 0 0 -``` - ``` bash curl -sfL https://get.k3s.io | sh - ``` + +### worker node + +- debian 12 +- 4g ram +- 8Gb OS disk +- 16Gb data disk + +``` bash +# execute on server to get token +cat /var/lib/rancher/k3s/server/node-token +``` + +**Setup worker node:** + +``` bash +# execute on server to get token +cat /var/lib/rancher/k3s/server/node-token +curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="agent --server https://casa.dev.lan:6443 --token " sh -s - +```