Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kerbaras/cloudlab

Infrastructure repository for my cloud-lab
https://github.com/kerbaras/cloudlab

argocd cloud gitops homelab k0s kubernetes labs terraform

Last synced: about 1 month ago
JSON representation

Infrastructure repository for my cloud-lab

Awesome Lists containing this project

README

        

# cloudlab

Infrastructure repository for my [cloud-lab](https://home.kerbaras.com)

## Overview

Infrastructure as Code for my cloud-based lab. This repository contains provisioning and configuration definitions in Terraform and Kustomization for a Kubernetes Cluster Environment.

> [!IMPORTANT]
> This project is still in the experimental stage and it's used to run experiments and learn new technologies. It's not intended to be used in production environments.
> For more information check [the roadmap](#roadmap).

## Technology Stack

| Logo | Name | Description |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ----------------------------------- |
| | [Terraform](https://www.terraform.io/) | Infrastructure as Code |
| | [Kubernetes](https://kubernetes.io/) | Container Orchestration |
| | [Kustomize](https://kustomize.io/) | Kubernetes Configuration Management |
| | [Helm](https://helm.sh/) | Kubernetes Package Manager |
| | [ArgoCD](https://argoproj.github.io/argo-cd/) | GitOps Continuous Delivery |
| | [Cert-Manager](https://cert-manager.io/) | Kubernetes Certificate Management |
| | [k0s](https://k0sproject.io/) | Kubernetes Distribution |
| | [Longhorn](https://longhorn.io/) | Kubernetes Storage Orchestration |
| | [MetalLB](https://metallb.universe.tf/) | Kubernetes Load Balancer |
| | [Emissary Ingress](https://www.getambassador.io/) | Kubernetes API Gateway |
| | [Linkerd](https://linkerd.io/) | Kubernetes Service Mesh |
| | [Prometheus](https://prometheus.io/) | Kubernetes Monitoring |
| | [Grafana](https://grafana.com/) | Kubernetes Observability |
| | [Loki](https://grafana.com/oss/loki/) | Kubernetes Log Aggregation |
| | [Homer](https://github.com/bastienwirtz/homer) | Kubernetes Dashboard |
| | [Portainer](https://www.portainer.io/) | Kubernetes Dashboard |

### Hardware

So far the lab is running on [Hertzner](https://www.hetzner.com/) with the following nodes:

- AX41-NVMe:
- CPU: AMD Ryzen 5 3600 6-Core
- RAM: 64 GB DDR4
- Storage: 2 x 512 GB NVMe SSD

### Features

- [x] Kubernetes Cluster: Using [k0s](https://k0sproject.io/) as Kubernetes distribution
- [x] GitOps Continuous Delivery: Using [ArgoCD](https://argoproj.github.io/argo-cd/) as GitOps Continuous Delivery
- [x] Application Dashboard: Using [Homer](https://github.com/bastienwirtz/homer)
- [x] Kubernetes Dashboard: Using [Portainer](https://www.portainer.io/)
- [x] Single Sign-On: Using [Zitadel](https://zitadel.com/)
- [ ] Kubernetes OIDC Authentication
- [ ] Private Application Authentication
- [ ] Private Docker Registry Authentication
- [x] Kubernetes Storage Orchestration: Using [Longhorn](https://longhorn.io/)
- [ ] Monitoring and Alerting
- [ ] Virtual Private Network
- [ ] NAT Load Balancer
- [ ] Virtual Private Cloud
- [ ] Virtual Machine Orchestration

## Getting Started

So far this is not supported out of the box. Provisioning is handled by Terraform, but some resources need to be created manually.

### Bootstrap the Cluster

```bash
cd k0s
k0sctl apply -c k0sctl.yaml
```

### Provisioning Infrastructure

```bash
cd terraform
terraform init
terraform apply --var-file=cloudlab.tfvars
```

### Deploying Applications

Applications are handled by ArgoCD. To deploy an application, create a new folder under `apps/{my-app}` and add a `kustomization.yaml` file.
Then add the application to the `applications.tf` file and deploy it using terraform.

The app folder follows the following structure:

```
apps
└── my-app
├── base
│ ├── kustomization.yaml
│ └── deplyment.yaml
└── overlays
├── dev
│ ├── kustomization.yaml
│ └── app.env
└── prod
├── kustomization.yaml
└── app.yaml
```