{"id":15148217,"url":"https://github.com/yarsiemanym/home-server","last_synced_at":"2026-01-20T03:32:45.726Z","repository":{"id":182943686,"uuid":"665247597","full_name":"yarsiemanym/home-server","owner":"yarsiemanym","description":"Terraform for setting up my home-lab Kubernetes cluster.","archived":false,"fork":false,"pushed_at":"2024-01-15T15:18:09.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T07:47:58.783Z","etag":null,"topics":["argocd","cert-manager","external-dns","grafana","helm","hostpath-storage","kubernetes","lets-encrypt","microk8s","nginx-ingress","pihole","prometheus","route53","terraform","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yarsiemanym.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-11T19:18:21.000Z","updated_at":"2023-12-24T04:53:30.000Z","dependencies_parsed_at":"2023-08-20T21:43:53.542Z","dependency_job_id":"938a0883-8585-494f-a2ee-0834cbfc8d0a","html_url":"https://github.com/yarsiemanym/home-server","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"af49ed15f431033b5e84c91a4851fcd468ff28c2"},"previous_names":["yarsiemanym/raspberry-pi","yarsiemanym/home-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarsiemanym%2Fhome-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarsiemanym%2Fhome-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarsiemanym%2Fhome-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarsiemanym%2Fhome-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yarsiemanym","download_url":"https://codeload.github.com/yarsiemanym/home-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247584061,"owners_count":20962071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","cert-manager","external-dns","grafana","helm","hostpath-storage","kubernetes","lets-encrypt","microk8s","nginx-ingress","pihole","prometheus","route53","terraform","ubuntu"],"created_at":"2024-09-26T13:01:50.554Z","updated_at":"2026-01-20T03:32:45.692Z","avatar_url":"https://github.com/yarsiemanym.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home Server\n\nTerraform for setting up my home-lab Kubernetes cluster.\n\n## Setup\n\n1. Setup your workstation.\n   1. Install [Terraform](https://developer.hashicorp.com/terraform/downloads).\n   2. Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl).\n   3. Install [Helm](https://helm.sh/docs/intro/install/).\n\n2. Install [Ubuntu Server 22.04 LTS](https://ubuntu.com/download/server) on the target server.\n   1. Connect to WiFi or Ethernet.\n   2. Enable OpenSSH.\n\n3. Assign the target server a static IP address.\n\n4. Copy your workstation's SSH key to the target server using `ssh-copy-id`.\n\n5. Create a `terrform.tfvars` file in `./terraform/stage0`.\n\n```\nhost     = \"{ip-address}\"\nuser     = \"{user}\"\npassword = \"{password}\"\n```\n\n6. Create a `terrform.tfvars` file in `./terraform/stage1`.\n\n```\naws_region                = \"{your-aws-region}\"\naws_access_key_id         = \"{your-aws-access-key-id}\"\naws_secret_access_key     = \"{your-aws-secret-key\"\n```\n\n7. Create a `terrform.tfvars` file in `./terraform/stage2`.\n\n```\ndomain                    = \"{your-domain}\"\ndhcp_server               = \"{your-dhcp_ip-address}\"\ndhcp_cidr                 = \"{your-dhcp-cidr-block}\"\npihole_admin_password     = \"{pihole-admin-password}\"\npihole_timezone           = \"{your-timezone}\npihole_custom_dns_records = [\n  \"{ip-address} {subdomain}\"\n]\noperator_email_address    = \"{your-email-address}\"\ngrafana_admin_password    = \"{grafana-admin-password}\"\n```\n\n8. Apply the Terraform.\n\n```sh\ncd ./terraform/stage0\nterraform init\nterraform apply\ncd ../stage1\nterraform init\nterraform apply\ncd ../stage2\nterraform init\nterraform apply\n```\n\n9. Change the DNS server in your router's DHCP settings to be the IP address of the target server.\n\n10. Get the ArgoCD initial admin password.\n\n```sh\nkubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath=\"{.data.password}\" | base64 -d\nkubectl delete secret argocd-initial-admin-secret -n argocd\n```\n\n11.  Check web apps running in Kubernetes.\n     1.  https://pihole.{your-domain}/admin\n         1.  Use the admin password specified in the stage 2 variables.\n     2.  https://argocd.{your-domain}\n         1.  Use \"admin\" and the initial admin password from step 9.\n         2.  Navigate to https://argocd.{your-domain}/user-info?changePassword=true and change the admin password.\n     3.  https://grafana.{your-domain}\n         1.  Use \"admin\" as the username and the grafana admin password you specified in the stage 2 variables.\n\n## Links\n\n* [Ubuntu](https://ubuntu.com/)\n  * [Ubuntu Server 22.04 LTS](https://ubuntu.com/download/server)\n* [Teraform](https://terraform.io)\n  * [Null Provider](https://registry.terraform.io/providers/hashicorp/null/latest)\n  * [Kubernetes Provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs)\n  * [Helm Provider](https://registry.terraform.io/providers/hashicorp/helm/latest)\n* [MicroK8s](https://microk8s.io/)\n  * [Hostpath Storage](https://microk8s.io/docs/addon-hostpath-storage)\n* [NGINX Ingress](https://github.com/kubernetes/ingress-nginx)\n  * [Helm Chart](https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/#installing-the-chart)\n* [External Secrets](https://external-secrets.io/)\n  * [Helm Chart](https://external-secrets.io/latest/introduction/getting-started/#option-1-install-from-chart-repository)\n* [Reflector](https://github.com/emberstack/kubernetes-reflector)\n  * [Helm Chart](https://artifacthub.io/packages/helm/emberstack/reflector)\n* [cert-manager](https://cert-manager.io/)\n  * [Helm Chart](https://artifacthub.io/packages/helm/cert-manager/cert-manager)\n  * [Let's Encrypt](https://letsencrypt.org/)\n  * [ACME Cluster Issuer](https://cert-manager.io/docs/configuration/acme/)\n  * [Route53 DNS Challenge Provider](https://cert-manager.io/docs/configuration/acme/dns01/route53/)\n* [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/)\n  * [Helm Chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)\n* [ArgoCD](https://argo-cd.readthedocs.io/en/stable/)\n  * [Helm Chart](https://artifacthub.io/packages/helm/argo/argo-cd)\n* [Pi-hole](https://pi-hole.net/)\n  * [Docker Container Image](https://hub.docker.com/r/pihole/pihole)\n* [External DNS](https://github.com/kubernetes-sigs/external-dns)\n  * [External DNS for Pi-Hole](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/pihole.md)\n* [Pi-Hole Prometheus Exporter](https://github.com/eko/pihole-exporter)\n  * [Docker Container Image](https://hub.docker.com/r/ekofr/pihole-exporter)\n  * [Grafana Dashboard](https://grafana.com/grafana/dashboards/14475-pi-hole-ui/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyarsiemanym%2Fhome-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyarsiemanym%2Fhome-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyarsiemanym%2Fhome-server/lists"}