{"id":28851776,"url":"https://github.com/sliterentz/quickstackbluegreeniaac","last_synced_at":"2026-02-06T16:03:20.018Z","repository":{"id":298274220,"uuid":"993582270","full_name":"sliterentz/QuickstackBlueGreenIAAC","owner":"sliterentz","description":"Quickstack blue/green deployment using Terraform and Argocd","archived":false,"fork":false,"pushed_at":"2026-01-10T09:20:09.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-11T02:36:22.698Z","etag":null,"topics":["argocd","bluegreen-deployment","infrastructure-as-code","k3s-traefik","kubernetes","mariadb","mongodb","postgresql","qemu-kvm","quickstack","redis","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sliterentz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-05-31T04:20:07.000Z","updated_at":"2026-01-10T09:18:34.000Z","dependencies_parsed_at":"2025-06-10T09:25:39.586Z","dependency_job_id":"8e33a09e-4212-4fa4-b9b9-c77772fd1ba5","html_url":"https://github.com/sliterentz/QuickstackBlueGreenIAAC","commit_stats":null,"previous_names":["sliterentz/quickstackbluegreeniaac"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sliterentz/QuickstackBlueGreenIAAC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliterentz%2FQuickstackBlueGreenIAAC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliterentz%2FQuickstackBlueGreenIAAC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliterentz%2FQuickstackBlueGreenIAAC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliterentz%2FQuickstackBlueGreenIAAC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sliterentz","download_url":"https://codeload.github.com/sliterentz/QuickstackBlueGreenIAAC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sliterentz%2FQuickstackBlueGreenIAAC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29167870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T15:38:29.831Z","status":"ssl_error","status_checked_at":"2026-02-06T15:37:48.592Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","bluegreen-deployment","infrastructure-as-code","k3s-traefik","kubernetes","mariadb","mongodb","postgresql","qemu-kvm","quickstack","redis","terraform"],"created_at":"2025-06-19T21:38:16.874Z","updated_at":"2026-02-06T16:03:20.009Z","avatar_url":"https://github.com/sliterentz.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuickStack K3s Kubernetes Cluster with Terraform\n\nThis repository contains Terraform configurations to quickly deploy a K3s Kubernetes cluster with essential components including ArgoCD and various database services (PostgreSQL, MariaDB, MongoDB, and Redis).\n\n## Prerequisites\n\n- quickstack installed (root access)\n- Terraform v1.0.0 or newer\n- SSH access to a target server\n- SSH key pair\n- Domain name (for ArgoCD access)\n- Basic understanding of Kubernetes and Terraform\n\n## Components Deployed\n\n- K3s lightweight Kubernetes cluster\n- ArgoCD for GitOps-based deployments\n- Blue/Green deployment namespaces\n- Database services:\n  - PostgreSQL\n  - MariaDB\n  - MongoDB\n  - Redis\n\n## Quick Start\n\n### 1. Prepare Host Environment\n\nPastikan host machine Anda (Ubuntu/Debian) sudah terkonfigurasi untuk menjalankan KVM. Gunakan script yang tersedia di modul `terraform-kvm-ubuntu`:\n\n```bash\ncd terraform-kvm-ubuntu\nchmod +x setup_kvm.sh\n./setup_kvm.sh\n```\n\n### 2. Configure Variables\n\nEdit `terraform.tfvars`. Perhatikan bahwa sekarang Anda tidak perlu memasukkan `server_ips` secara manual karena VM akan dibuat secara otomatis di KVM lokal.\n\n```bash\ncp example.tfvars terraform.tfvars\n```\n\n### 3. Deploy Infrastructure\n\n```bash\nterraform init\nterraform apply -auto-approve\n```\n\nTerraform akan:\n1. Membuat VM di KVM (Ubuntu 22.04, 2 CPU, 4GB RAM, 20GB Disk).\n2. Menginstall K3s secara otomatis di dalam VM via Cloud-Init.\n3. Mengambil file `kubeconfig` dari VM ke host local secara otomatis.\n4. Menginstall Metrics Server dan komponen Kubernetes lainnya.\n\n### 7. Access Your Cluster (Root Access)\n```bash\nsudo k3s kubectl get nodes\nsudo k3s kubectl get namespaces -A\nsudo k3s kubectl get pods -A\n```\n\n### 6. Access ArgoCD\nArgoCD will be available at the hostname you specified in the variables:\n```\nhttps://argocd.yourdomain.com\n```\nLogin with:\nUsername: admin\nPassword: The value you set for argocd_admin_password\n\n#### Blue/Green Deployment\nThis setup includes blue/green deployment namespaces for zero-downtime deployments:\n\u003cnamespace\u003e-blue: Blue environment\n\u003cnamespace\u003e-green: Green environment\nYou can deploy your applications to these namespaces and switch between them using ArgoCD.\n\n#### Database Services\nThe following database services are deployed and can be used by your applications:\nPostgreSQL\nPort: 5432\nDatabase: Value of postgres_database\nUsername: Value of postgres_username\nPassword: Value of postgres_password\nMariaDB\nPort: 3306\nDatabase: Value of mariadb_database\nUsername: Value of mariadb_username\nPassword: Value of mariadb_password\nMongoDB\nPort: 27017\nUsername: Value of mongo_username\nPassword: Value of mongo_password\nRedis\nPort: 6379\nPassword: Value of redis_password\n\n### Cleanup\nTo destroy the infrastructure when no longer needed:\n```bash\nterraform destroy -var-file=terraform.tfvars\n```\n\n### Troubleshooting\nCommon Issues\n1. SSH Connection Failures:\nVerify your SSH key path and permissions\nEnsure the server is reachable and SSH service is running\n2. Kubernetes API Unreachable:\nCheck if K3s is properly installed and running\nVerify the kubeconfig file has the correct server IP\n3. ArgoCD Not Accessible:\nEnsure DNS is properly configured for your ArgoCD hostname\nCheck if the Ingress controller is properly configured\n\n### Logs and Debugging\nTo check K3s logs on the server:\n```bash\nssh \u003cusername\u003e@\u003cserver_ip\u003e \"sudo journalctl -u k3s\"\n```\nTo check pod status:\n```bash\nkubectl get pods -A\nkubectl describe pod \u003cpod-name\u003e -n \u003cnamespace\u003e\nkubectl logs \u003cpod-name\u003e -n \u003cnamespace\u003e\n```\n\n### Security Considerations\nChange all default passwords in the terraform.tfvars file\nConsider using Terraform's encrypted state storage\nRestrict access to your kubeconfig file\nUse proper network security groups to limit access to your server","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsliterentz%2Fquickstackbluegreeniaac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsliterentz%2Fquickstackbluegreeniaac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsliterentz%2Fquickstackbluegreeniaac/lists"}