diff --git a/README.md b/README.md index 1733320..655a5de 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,2 @@ -# Hobbyrack Infrastructure +# infrastructure -This repository contains the infrastructure-as-code configuration for managing Wheatley, a homelab environment within Hobbyrack. The current focus is on deploying a Kubernetes clusters with Talos and Cilium on Proxmox VE using OpenTofu. - -## Contents - -- **modules/**: Contains reusable modules for cluster bootstrap and node provisioning. - - **talos-bootstrap/**: Bootstraps the Talos cluster, including templates for machine configuration and Cilium installation. - - **talos-node/**: Provisions individual Talos node VMs on Proxmox. -- **pve01.wheatley.in/**: Configuration specific to the Proxmox VE host `pve01.wheatley.in`. - - **k8s-wheatley/**: Provisions the `k8s-wheatley` Kubernetes cluster. - - **templates/**: Provisions VM templates on the PVE host. - -## Requirements - -- [OpenTofu](https://opentofu.org/) >= 1.0 -- Access to a Proxmox VE environment -- (Optional) talosctl for managing Talos nodes - -## Usage - -1. **Initialize OpenTofu** - ```sh - tofu init - ``` -2. **Review the execution plan** - ```sh - tofu plan - ``` -3. **Apply the infrastructure** - ```sh - tofu apply - ``` - -> Adjust variables in `variables.tf` or provide a `terraform.tfvars` file for your environment. - -## Modules - -- **talos-bootstrap**: Bootstraps the cluster, including generating machine configurations and Cilium manifests. -- **talos-node**: Provisions control-plane and worker nodes. - -## Templates - -- Machine configurations for Talos control-plane and worker nodes -- Cilium installation manifest - -## Contributing - -Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. - -## License - -This repository is licensed under the MIT License. See the `LICENSE` file for details. - -## Contact - -For questions or support, open an issue or contact via GitHub. diff --git a/pve01.wheatley.in/k8s-wheatley/main.tf b/pve01.wheatley.in/k8s-wheatley/main.tf index bd2d86c..f8e2fe3 100644 --- a/pve01.wheatley.in/k8s-wheatley/main.tf +++ b/pve01.wheatley.in/k8s-wheatley/main.tf @@ -94,7 +94,7 @@ locals { } module "controlplanes" { - source = "../../modules/talos-node" + source = "./modules/talos-node" for_each = { for node in local.controlplanes.nodes : node.name => node } node = { @@ -116,7 +116,7 @@ module "controlplanes" { } module "workers" { - source = "../../modules/talos-node" + source = "./modules/talos-node" for_each = { for node in local.workers.nodes : node.name => node } node = { @@ -145,7 +145,7 @@ module "talos-bootstrap" { module.workers ] - source = "../../modules/talos-bootstrap" + source = "./modules/talos-bootstrap" node_config = { ipv4_gateway = local.ipv4_gateway diff --git a/modules/talos-bootstrap/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf similarity index 100% rename from modules/talos-bootstrap/main.tf rename to pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/main.tf diff --git a/modules/talos-bootstrap/outputs.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf similarity index 100% rename from modules/talos-bootstrap/outputs.tf rename to pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/outputs.tf diff --git a/modules/talos-bootstrap/templates/cilium-install.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/cilium-install.yaml.tmpl similarity index 100% rename from modules/talos-bootstrap/templates/cilium-install.yaml.tmpl rename to pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/cilium-install.yaml.tmpl diff --git a/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl similarity index 100% rename from modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl rename to pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-cp.yaml.tmpl diff --git a/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl similarity index 100% rename from modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl rename to pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/templates/machineconfig-worker.yaml.tmpl diff --git a/modules/talos-bootstrap/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf similarity index 100% rename from modules/talos-bootstrap/variables.tf rename to pve01.wheatley.in/k8s-wheatley/modules/talos-bootstrap/variables.tf diff --git a/modules/talos-node/main.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf similarity index 100% rename from modules/talos-node/main.tf rename to pve01.wheatley.in/k8s-wheatley/modules/talos-node/main.tf diff --git a/modules/talos-node/variables.tf b/pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf similarity index 100% rename from modules/talos-node/variables.tf rename to pve01.wheatley.in/k8s-wheatley/modules/talos-node/variables.tf