Infrastructure provisioning and ArgoCD bootstrap for GitOps platform.
- Terraform >= 0.13
- Taskfile
- kubectl
- Helm
- twc CLI (Timeweb Cloud CLI)
- Timeweb Cloud account with API token
# 1. Copy .env.example to .env and fill in your credentials
cp .env.example .env
# Edit .env with your tokens
# 2. Full setup (Taskfile will automatically load .env)
task upAlternative (manual export):
export TF_VAR_timeweb_token="your-timeweb-token"
export AWS_ACCESS_KEY_ID="s3-access-key"
export AWS_SECRET_ACCESS_KEY="s3-secret-key"
task up| Task | Description |
|---|---|
task init |
Initialize Terraform and create k8s cluster |
task plan |
Show Terraform plan |
task kubeconfig |
Get kubeconfig from Timeweb |
task bootstrap |
Install ArgoCD via Helm |
task app-of-apps |
Deploy root Application |
task argocd-password |
Get ArgoCD admin password |
task argocd-port-forward |
Port-forward ArgoCD UI |
task destroy |
Destroy infrastructure |
task up |
Full workflow (init + bootstrap + app-of-apps) |
flowchart TB
subgraph CLOUD["☁️ Timeweb Cloud"]
subgraph CLUSTER["🎯 Kubernetes Cluster"]
subgraph ARGOCD["🔄 ArgoCD"]
root[app-of-apps]
root --> platform
root --> tenants
root --> policies
end
end
end
subgraph REPOS["📦 Git Repositories"]
k8s[app-poly-gitops-k8s]
helm[app-poly-gitops-helm]
infra[app-poly-gitops-infra]
end
k8s --> |"GitOps sync"| ARGOCD
helm --> |"Helm charts"| ARGOCD
infra --> |"Bootstrap"| CLUSTER
See docs/ARCHITECTURE.md for detailed diagrams
| Repository | Purpose |
|---|---|
| app-poly-gitops-k8s | GitOps manifests (Kustomize + ArgoCD) |
| app-poly-gitops-helm | Helm charts |
| app-poly-gitops-fastapi | FastAPI application |
| app-poly-gitops-crewai | CrewAI monitoring |
| Variable | Default | Description |
|---|---|---|
timeweb_token |
- | Timeweb API token (sensitive) |
project_id |
1115913 | Timeweb project ID |
network_id |
network-... | Timeweb network ID |
cluster_name |
gitops-cluster | Kubernetes cluster name |
node_count |
3 | Number of worker nodes |
ArgoCD configuration is in bootstrap/argocd/values.yaml. After initial bootstrap, ArgoCD becomes self-managed through the multi-source Application.
- Provision:
task initcreates k8s cluster in Timeweb Cloud - Bootstrap:
task bootstrapinstalls ArgoCD with initial values - GitOps:
task app-of-appsdeploys root Application from app-poly-gitops-k8s - Self-managed: ArgoCD now manages itself and all applications
task destroyThis will destroy the Kubernetes cluster and all resources.