Skip to content

Commit cb8ff4f

Browse files
committed
added repo structure
1 parent 28edb8a commit cb8ff4f

File tree

3 files changed

+178
-6
lines changed

3 files changed

+178
-6
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

Makefile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.PHONY: help setup pre-commit-install pre-commit-run validate lint deploy-all clean
2+
3+
ENVIRONMENT ?= dev
4+
GCP_PROJECT ?= my-gcp-project
5+
REGION ?= us-central1
6+
7+
BLUE := \033[0;34m
8+
GREEN := \033[0;32m
9+
RED := \033[0;31m
10+
NC := \033[0m
11+
12+
help:
13+
@echo "$(BLUE)=== Observability Stack (GKE + LGTM + ArgoCD) ===$(NC)"
14+
@echo ""
15+
@echo "$(GREEN)Setup:$(NC)"
16+
@echo " make setup Install all dependencies"
17+
@echo " make pre-commit-install Install pre-commit hooks"
18+
@echo ""
19+
@echo "$(GREEN)Code Quality:$(NC)"
20+
@echo " make validate Validate all Terraform"
21+
@echo " make lint Lint all code"
22+
@echo " make pre-commit-run Run pre-commit hooks manually"
23+
@echo ""
24+
@echo "$(GREEN)Deployment:$(NC)"
25+
@echo " make deploy-all Deploy entire stack"
26+
@echo " make clean Clean up generated files"
27+
28+
setup:
29+
@echo "$(BLUE)Installing dependencies...$(NC)"
30+
@command -v terraform >/dev/null 2>&1 || (echo "Installing Terraform..." && brew install terraform)
31+
@command -v kubectl >/dev/null 2>&1 || (echo "Installing kubectl..." && brew install kubectl)
32+
@command -v helm >/dev/null 2>&1 || (echo "Installing Helm..." && brew install helm)
33+
@command -v gcloud >/dev/null 2>&1 || (echo "Installing gcloud..." && brew install --cask google-cloud-sdk)
34+
@command -v pre-commit >/dev/null 2>&1 || (echo "Installing pre-commit..." && brew install pre-commit)
35+
@echo "$(GREEN)✓ Dependencies installed!$(NC)"
36+
37+
pre-commit-install:
38+
@echo "$(BLUE)Installing pre-commit hooks...$(NC)"
39+
pre-commit install
40+
@echo "$(GREEN)✓ Pre-commit hooks installed!$(NC)"
41+
42+
pre-commit-run:
43+
@echo "$(BLUE)Running pre-commit hooks...$(NC)"
44+
pre-commit run --all-files
45+
46+
validate:
47+
@echo "$(BLUE)Validating Terraform...$(NC)"
48+
@echo "$(GREEN)✓ Validation complete!$(NC)"
49+
50+
lint:
51+
@echo "$(BLUE)Running linting checks...$(NC)"
52+
pre-commit run --all-files
53+
54+
deploy-all:
55+
@echo "$(BLUE)Deploying everything to $(ENVIRONMENT)...$(NC)"
56+
@echo "$(GREEN)✓ Deployment complete!$(NC)"
57+
58+
clean:
59+
@echo "$(BLUE)Cleaning up...$(NC)"
60+
find . -name ".terraform" -type d -exec rm -rf {} + 2>/dev/null || true
61+
find . -name "*.tfplan" -delete
62+
@echo "$(GREEN)✓ Cleanup complete!$(NC)"
63+
64+
.DEFAULT_GOAL := help

README.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,117 @@ make pre-commit-install
2323

2424
# View all commands
2525
make help
26+
```
27+
28+
## REPO STRUCTURE
29+
30+
```
31+
observability/
32+
├── Makefile
33+
│ └── USE: Automation shortcuts for common commands (setup, deploy, validate, clean)
34+
35+
├── README.md
36+
│ └── USE: Project overview, quick start, and entry point for new users
37+
38+
├── argocd/
39+
│ ├── README.md
40+
│ │ └── USE: ArgoCD component overview and quick reference
41+
│ └── terraform/
42+
│ ├── locals.tf
43+
│ │ └── USE: Local variables and computed values within ArgoCD module
44+
│ ├── main.tf
45+
│ │ └── USE: Deploy ArgoCD using Helm to GKE cluster
46+
│ ├── outputs.tf
47+
│ │ └── USE: Export ArgoCD endpoint URLs and credentials
48+
│ ├── variables.tf
49+
│ │ └── USE: Define input parameters for ArgoCD deployment
50+
│ └── values/
51+
│ ├── argocd-values.yaml
52+
│ │ └── USE: Base Helm chart values for ArgoCD
53+
│ ├── argocd-dev-values.yaml
54+
│ │ └── USE: Development environment overrides (reduced resources)
55+
│ └── argocd-prod-values.yaml
56+
│ └── USE: Production environment overrides (HA, replicas)
57+
58+
├── cert-manager/
59+
│ ├── README.md
60+
│ │ └── USE: Cert-Manager component overview and reference
61+
│ └── terraform/
62+
│ ├── locals.tf
63+
│ │ └── USE: Local variables and computed values
64+
│ ├── main.tf
65+
│ │ └── USE: Deploy Cert-Manager using Helm to manage TLS certificates
66+
│ ├── outputs.tf
67+
│ │ └── USE: Export Cert-Manager service account and configuration details
68+
│ ├── variables.tf
69+
│ │ └── USE: Define customizable parameters for Cert-Manager
70+
│ └── workload-identity.tf
71+
│ └── USE: Configure GCP Workload Identity for Cert-Manager to access DNS
72+
73+
74+
├── docs/
75+
│ ├── ARCHITECTURE.md
76+
│ │ └── USE: Explain system design, component interactions, and data flow
77+
│ ├── GETTING_STARTED.md
78+
│ │ └── USE: Step-by-step quick start guide for new users
79+
│ ├── README.md
80+
│ │ └── USE: Documentation index and navigation hub
81+
│ ├── TROUBLESHOOTING.md
82+
│ │ └── USE: Common issues, debug commands, and solutions
83+
│ ├── TUTORIAL_ARGOCD.md
84+
│ │ └── USE: Manual ArgoCD installation guide (alternative to Terraform)
85+
│ ├── TUTORIAL_CERT_MANAGER.md
86+
│ │ └── USE: Manual Cert-Manager installation guide
87+
│ ├── TUTORIAL_GKE_SETUP.md
88+
│ │ └── USE: Manual GKE cluster creation using gcloud CLI
89+
│ ├── TUTORIAL_INGRESS.md
90+
│ │ └── USE: Manual Ingress Controller installation guide
91+
│ ├── TUTORIAL_LGTM.md
92+
│ │ └── USE: Manual LGTM stack deployment guide
93+
│ └── images/
94+
│ ├── architecture-diagram.png
95+
│ │ └── USE: Visual system architecture diagram
96+
│ ├── argocd-workflow.png
97+
│ │ └── USE: Visual GitOps deployment workflow diagram
98+
│ └── lgtm-flow.png
99+
│ └── USE: Visual LGTM component data flow diagram
100+
101+
├── ingress-controller/
102+
│ ├── README.md
103+
│ │ └── USE: Ingress Controller component overview
104+
│ └── terraform/
105+
│ ├── locals.tf
106+
│ │ └── USE: Local variables for ingress module
107+
│ ├── main.tf
108+
│ │ └── USE: Deploy Nginx Ingress Controller for HTTP/HTTPS routing
109+
│ ├── outputs.tf
110+
│ │ └── USE: Export load balancer endpoint and service information
111+
│ ├── variables.tf
112+
│ │ └── USE: Define customizable parameters for Ingress
113+
│ └── values.yaml
114+
│ └── USE: Helm chart configuration for Nginx Ingress Controller
115+
116+
└── lgtm-stack/
117+
├── README.md
118+
│ └── USE: LGTM stack component overview and architecture
119+
└── terraform/
120+
├── locals.tf
121+
│ └── USE: Local variables for LGTM module
122+
├── main.tf
123+
│ └── USE: Deploy all LGTM components (Prometheus, Loki, Mimir, Tempo, Grafana)
124+
├── outputs.tf
125+
│ └── USE: Export endpoints and credentials for all LGTM components
126+
├── variables.tf
127+
│ └── USE: Define customizable parameters for LGTM deployment
128+
└── values/
129+
├── grafana-values.yaml
130+
│ └── USE: Helm configuration for Grafana dashboards and datasources
131+
├── loki-values.yaml
132+
│ └── USE: Helm configuration for Loki log storage and retention
133+
├── mimir-values.yaml
134+
│ └── USE: Helm configuration for Mimir long-term metrics storage
135+
├── prometheus-values.yaml
136+
│ └── USE: Helm configuration for Prometheus metrics scraping
137+
└── tempo-values.yaml
138+
└── USE: Helm configuration for Tempo distributed tracing
139+
```

0 commit comments

Comments
 (0)