Git Product home page Git Product logo

h2m's Introduction

h2m

project-image

Ansible-configured Homelab with k3s cluster inside a Proxmox VM.

⏳ Current project state:

Currently h2m is a single-node K3S cluster, with kube-vip-cloud-provider and Kong Gateway API (Kong Ingress Controller) for communicating with nodes, provisioned with Ansible.

Initial set of applications:

  • HTTP servers (nginx, apache)
  • NextCloud
  • LittleLink
  • Kavita
  • Ghost

And also monitoring with:

  • Prometheus
  • Grafana

🎯 Roadmap:

  • HA Cluster with multiple VMs
  • Kube-VIP master load balancing
  • More services! (Gitea, Gitlab, Mailu, etc.)

πŸ› οΈ Installation Steps:

0. Pre-configure your PVE node

Create a non-root user on whose behalf the following commands will be executed:
adduser h2m

Give sudo access to created user:

usermod -aG wheel h2m

If you're not using enterprise Proxmox solution, then you'll probably want to get rid of "No subscription" pop-up as well as of updating your repositories to non-subscription ones.

You can do it yourself by changing following files:

  • /etc/apt/sources.list.d/ceph.list
  • /etc/apt/sources.list.d/pve-enterprise.list
  • /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js

Or you might use configuration script.

Download the pve_init.sh script

curl https://raw.githubusercontent.com/hiimluck3r/h2m/dev/scripts/pve_init.sh -o pve_init.sh

Then launch it using

./pve_init.sh

Please do not provide a password and passphrase for the Ansible ssh-key.

Install beaupy python library, it's crucial dependency for installation scripts

apt install python3-pip

pip install beaupy --break-system-packages

1. Clone the repository

git clone https://github.com/hiimluck3r/h2m.git

cd h2m

If you want to use unstable dev branch:

git checkout dev

2. Configure virtual machines

Ansible tasks are intended to run on debian-based OS, preferably cloud-init. You can manually create VMs, pass ansible keys to it and use your settings or you might use pre-configured VM templates, which are created using vm_templates.sh script.

cd scripts

./vm_templates.sh

After getting templates, go to your PVE dashboard and create full-clone virtual machine. You should also resize the virtual disk inside of GUI.

3. Run configuration script

./configure.sh

Later, if you want to configure which services to use, you can use

./services_cfg.sh

You can destroy your cluster with

./destroy.sh

Storage configuration

You can manage storage capacity for stateful applications in the following configs:

  • config/storage_cfg.yml (main template)
  • group_vars/all/h2mconfig.yml

🍰 Contribution Guidelines:

Contributions are what make the open source community such an amazing place to learn inspire and create. Any contributions you make are greatly appreciated. If you have a suggestion that would make this better please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

πŸ’» Built with

Technologies used in the project:

  • Ansible
  • K3S
  • Python
  • Bash
  • Proxmox
  • k3sup

πŸ›‘οΈ License:

This project is licensed under the MIT License

πŸ› Bugs or Questions:

Create an Issue with the appropriate tag:

  • Feature request
  • Bug report
  • Question

πŸ’–Like my work?

Then give project a star :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.