Skip to content

homelab - 1. 总体规划 #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
he-sb opened this issue Nov 26, 2022 · 3 comments
Open

homelab - 1. 总体规划 #47

he-sb opened this issue Nov 26, 2022 · 3 comments
Labels
homelab related to homelab Linux Based on Linux Notes Methodology Series Belong to a series of articles.

Comments

@he-sb
Copy link
Owner

he-sb commented Nov 26, 2022

前言

最近家里 HomeLab 的基础设施暂时算是施工完毕,在此总结一下折腾的过程,一来是回顾、总结经验,二来也是给对 HomeLab 感兴趣的大伙儿提供一个可供参考的思路。

由于内容较多(加入了一些背景知识和俺在做 trade-off 时的考量),且部分内容尚未搭建完成,俺打算做成系列的形式分享出来。

这里简要介绍一下本篇的主要内容:

成文时仅附上当前章节的简介

  1. 总体规划
    • 折腾 HomeLab 时的一些学习经验和架构设计,包括
      • 为什么要搭建 HomeLab
      • 硬件选择
      • 虚拟化环境选择
  2. 环境准备
    • 虚拟化环境安装
    • 虚拟机配置
  3. 虚拟化环境选择 合并至【1. 总体规划】篇
  4. 宿主机配置 合并至【2. 环境准备】篇
  5. 虚拟机配置 合并至【2. 环境准备】篇

至于什么是 HomeLab,这里俺摘录一位国外网友的总结,言简意赅:

Homelab is a laboratory at home where you can self-host, experiment with new technologies, practice for certifications, and so on.

-- Khue's Homelab

@he-sb he-sb self-assigned this Nov 26, 2022
@he-sb he-sb moved this to Todo in Home Lab Nov 26, 2022
@he-sb he-sb removed their assignment Nov 26, 2022
@he-sb he-sb added Series Belong to a series of articles. Linux Based on Linux Notes Methodology homelab related to homelab labels Nov 26, 2022
@he-sb he-sb changed the title homelab - 1.总体规划 homelab - 1. 总体规划 Nov 26, 2022
@he-sb he-sb moved this from Todo to In Progress in Home Lab Nov 26, 2022
@he-sb
Copy link
Owner Author

he-sb commented Nov 27, 2022

@he-sb
Copy link
Owner Author

he-sb commented Dec 8, 2022

基本原则

首先来谈谈一些基础要求,这些是开始搞 HomeLab 的底线(个人意见,不同意的不用举手,你对)

  1. 拒绝 All in One,拒绝 All in One,拒绝 All in One
    • 重要的事说三遍,牢记 All in One = All in Boom
  2. 使用虚拟化底层,充分利用硬件资源
    • 这条乍看之下和上一条是矛盾的,其实不然,后文会详细说明
    • 是下一条的基础
  3. 扩展能力要强,体现在:
    • 各资源之间充分解耦
      • 软件资源 - 服务解耦,单个服务只做自己的事,通过各种协议交互,而不是单个服务负责很多方面
      • 硬件资源 - 硬件解耦,单个硬件设备只承担自己的功能,不承担其他硬件的功能

下面来展开谈谈。

1. 拒绝 All in One

此处的 All in one 指的是单机单系统,部署了多套应用 / 运行时的场景,比如 张大妈 上一搜 NAS 出来很多的基于群晖 / OpenWrt 各种版本甚至还有 Win 的。。。

  • 单点故障,一炸全炸
  • 扩展能力弱,整套系统的瓶颈过于明显,想升级基本只能升级单台机器的配置
  • 待补充

2. 充分利用硬件资源

俺这里的拒绝 All in One 指的是拒绝【单个系统承载多个服务】,而不是简单的指不要【单个硬件系统承载多个服务】

  • 只要利用好虚拟机和容器这两大资源隔离的利器,再结合第三点 todo

3. 扩展能力

现阶段物质条件不充分,注定了这是个时间跨度以年为单位的长期工程,如果扩展性不足,那么后续每次升级时的沉没成本会很高

  • 只能更换现有硬件而不是添置新硬件 -> 金钱成本
  • 重新部署应用而不是水平扩容 -> 时间和精力成本

而这些问题,只要做到了前两点,是能够相当程度上规避的,比如:

  • 如果系统架构支持水平扩容,可以简单的添置硬件即可消除系统瓶颈,而不是只能用新的更强的硬件来替换现有的硬件 -> 节约金钱成本
  • 如果在系统初始化阶段就使用了虚拟化 / 容器方案,因为各种原因,需要重装或更换系统,或需要升级 / 卸载 / 重新部署应用时,那么迁移过程会非常平稳快速 -> 节约时间和精力成本
  • ...

@he-sb
Copy link
Owner Author

he-sb commented Jan 3, 2023

  • 资源隔离
    • 硬件资源
    • 软件资源
  • 弹性伸缩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
homelab related to homelab Linux Based on Linux Notes Methodology Series Belong to a series of articles.
Projects
Status: In Progress
Development

No branches or pull requests

1 participant