Skip to content

justgithubaccount/app-poly-gitops-infra

Repository files navigation

app-poly-gitops-infra

Infrastructure provisioning and ArgoCD bootstrap for GitOps platform.

Prerequisites

Quick Start

# 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 up

Alternative (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

Available Tasks

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)

Architecture

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
Loading

See docs/ARCHITECTURE.md for detailed diagrams

Related Repositories

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

Configuration

Terraform Variables

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

ArgoCD configuration is in bootstrap/argocd/values.yaml. After initial bootstrap, ArgoCD becomes self-managed through the multi-source Application.

Workflow

  1. Provision: task init creates k8s cluster in Timeweb Cloud
  2. Bootstrap: task bootstrap installs ArgoCD with initial values
  3. GitOps: task app-of-apps deploys root Application from app-poly-gitops-k8s
  4. Self-managed: ArgoCD now manages itself and all applications

Cleanup

task destroy

This will destroy the Kubernetes cluster and all resources.

About

Cloud infrastructure provisioning for poly-gitops platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •