Skip to content

Commit 8b575b7

Browse files
authored
refactor: documentation structure. (#318)
1 parent 3e01468 commit 8b575b7

21 files changed

+355
-71
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,47 @@ jobs:
114114
run: |
115115
helm uninstall "$RELEASE_NAME" -n eoapi || true
116116
kubectl delete namespace eoapi || true
117+
validate-docs:
118+
name: Validate documentation
119+
runs-on: ubuntu-latest
120+
steps:
121+
- uses: actions/checkout@v4
122+
123+
- uses: actions/setup-node@v4
124+
with:
125+
node-version: '20'
126+
127+
- name: Check internal links
128+
run: |
129+
broken=0
130+
find docs -name "*.md" | while read -r file; do
131+
if grep -q "](\./" "$file" 2>/dev/null; then
132+
grep -n "](\./" "$file" | while IFS=: read -r line link; do
133+
path=$(echo "$link" | sed -n 's/.*](\.\///; s/).*//p')
134+
if [[ "$path" == images/* ]]; then
135+
full="docs/$path"
136+
else
137+
full="docs/$path"
138+
fi
139+
if [[ ! -e "$full" ]]; then
140+
echo "❌ $file:$line -> $path"
141+
broken=1
142+
fi
143+
done
144+
fi
145+
done
146+
exit $broken
147+
148+
- name: Check external links
149+
run: |
150+
npm install -g markdown-link-check@3.11.2
151+
echo '{"timeout":"10s","retryCount":2,"aliveStatusCodes":[200,301,302,403,999]}' > .mlc.json
152+
find docs -name "*.md" -exec timeout 30 markdown-link-check {} --config .mlc.json \; || true
153+
154+
- name: Check frontmatter
155+
run: |
156+
missing=0
157+
find docs -name "*.md" -not -path "docs/_includes/*" | while read -r file; do
158+
head -1 "$file" | grep -q "^---$" || { echo "❌ Missing frontmatter: $file"; missing=1; }
159+
done
160+
exit $missing

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
charts/config.yaml
55
charts/eoapi/charts/*.tgz
66
config_ingress.yaml
7+
dist
8+
site
79
__pycache__
810
CLAUDE.md

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Unified local cluster management with `CLUSTER_TYPE` variable
1616
- Improved CI and local debugging; added debug-deployment.sh script
1717
- Added knative in CI to test eoapi-notifier.
18+
- Restructured docs with flattened structure and added portable documentation generation
1819

1920
## [0.7.12] - 2025-10-17
2021

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TEST_SCRIPT := ./scripts/test.sh
77
# Default cluster type (can be overridden)
88
CLUSTER_TYPE ?= minikube
99

10-
.PHONY: help deploy clean tests integration lint validate-schema
10+
.PHONY: help deploy clean tests integration lint validate-schema docs serve-docs
1111
.DEFAULT_GOAL := help
1212

1313
help:
@@ -30,6 +30,8 @@ help:
3030
@echo "QUALITY:"
3131
@echo " lint Run linting and code quality checks"
3232
@echo " validate-schema Validate Helm schemas"
33+
@echo " docs Generate portable documentation package"
34+
@echo " serve-docs Serve docs with mkdocs at http://localhost:8000"
3335
@echo ""
3436
@echo "VARIABLES:"
3537
@echo " CLUSTER_TYPE Local cluster type: minikube or k3s (default: minikube)"
@@ -104,3 +106,13 @@ validate-schema:
104106

105107
ingest:
106108
@./scripts/ingest.sh
109+
110+
docs:
111+
@command -v mkdocs >/dev/null 2>&1 || { echo "❌ mkdocs required. Run: pip install mkdocs-material"; exit 1; }
112+
@echo "📚 Building documentation with mkdocs"
113+
@mkdocs build
114+
115+
serve-docs: docs
116+
@echo "📚 Serving docs with mkdocs at http://localhost:8000"
117+
@echo "Press Ctrl+C to stop"
118+
@mkdocs serve --dev-addr localhost:8000

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
### Get started
3030

31-
* [Quick start guide](./docs/installation/quick-start.md)
31+
* [Quick start guide](./docs/quick-start.md)
3232

3333
### `eoAPI-k8s` documentation
3434

35-
* [Overview of docs](./docs/index.md)
35+
* [Overview of docs](https://eoapi.dev/deployment/kubernetes)
3636

3737
### General eoAPI documentation
3838
* [eoapi.dev](https://eoapi.dev) website.

charts/eoapi/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ postgresql:
114114

115115
For detailed configuration and usage:
116116

117-
- [Configuration Guide](https://github.com/developmentseed/eoapi-k8s/blob/main/docs/installation/configuration.md)
118-
- [Data Management](https://github.com/developmentseed/eoapi-k8s/blob/main/docs/operations/manage-data.md)
119-
- [Autoscaling Guide](https://github.com/developmentseed/eoapi-k8s/blob/main/docs/operations/autoscaling.md)
117+
- [Configuration Guide](https://github.com/developmentseed/eoapi-k8s/blob/main/docs/configuration.md)
118+
- [Data Management](https://github.com/developmentseed/eoapi-k8s/blob/main/docs/manage-data.md)
119+
- [Autoscaling Guide](https://github.com/developmentseed/eoapi-k8s/blob/main/docs/autoscaling.md)
120120

121121
## License
122122

docs/_includes/repository-links.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- Reusable repository references -->
2+
[Main eoapi Repository]: https://github.com/developmentseed/eoapi
3+
[eoapi-k8s Repository]: https://github.com/developmentseed/eoapi-k8s
4+
[Report Issues]: https://github.com/developmentseed/eoapi-k8s/issues
5+
[eoAPI Documentation]: https://eoapi.dev/
6+
[Helm Charts]: https://github.com/developmentseed/eoapi-k8s/tree/main/charts
7+
[PostgreSQL Operator]: https://access.crunchydata.com/documentation/postgres-operator/
8+
[Kubernetes Documentation]: https://kubernetes.io/docs/

docs/operations/autoscaling.md renamed to docs/autoscaling.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
---
2+
title: "Autoscaling & Monitoring"
3+
description: "HPA setup with custom metrics, Grafana dashboards, Prometheus configuration, and load testing"
4+
external_links:
5+
- name: "eoapi-k8s Repository"
6+
url: "https://github.com/developmentseed/eoapi-k8s"
7+
- name: "Kubernetes HPA Documentation"
8+
url: "https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/"
9+
- name: "Prometheus Documentation"
10+
url: "https://prometheus.io/docs/"
11+
- name: "Grafana Documentation"
12+
url: "https://grafana.com/docs/"
13+
---
14+
115
# Autoscaling / Monitoring / Observability
216

317
Autoscaling is both art and science. To test out your application's autoscaling requirements you often need to consider
418
your data volume, data usage patterns, bottlenecks (such as the database) among many, many other things. Load testing,
519
metrics, monitoring and observability will help you explore what those needs are.
620

721

8-
> &#9432; The `eoapi-support` chart in this repository (see `../charts/eoapi-support`) is required to be installed to
22+
> &#9432; The `eoapi-support` chart in this repository is required to be installed to
923
enable any of the eoAPI service autoscaling. It cannot be listed as a dependecy of `eoapi` chart
1024
b/c of the limitations in `prometheus-adapter` and `grafana` for constructing the Prometheus internal
1125
service domains dynamically.
@@ -17,7 +31,7 @@ might want to read through the verbose walkthrough material below to familiarize
1731

1832
## Helm Install `eoapi-support`
1933

20-
The following instructions assume you've gone through the [AWS](../installation/providers/aws-eks.md) or [GCP](../installation/providers/gcp-gke.md) cluster set up
34+
The following instructions assume you've gone through the [AWS](./aws-eks.md) or [GCP](./gcp-gke.md) cluster set up
2135
and installed the `eoapi` chart.
2236

2337

@@ -99,9 +113,9 @@ manual step that cannot be automated
99113

100114
---
101115

102-
### Review [Default Configuration and Options](../installation/configuration.md)
116+
### Review [Default Configuration and Options](./configuration.md)
103117

104-
[This document](../installation/configuration.md) will explain the differences in the `autoscaling` block for each service:
118+
[This document](./configuration.md) will explain the differences in the `autoscaling` block for each service:
105119

106120
```yaml
107121
autoscaling:
@@ -199,15 +213,15 @@ with the `release` name we installed the chart with below `<release-name>-grafan
199213

200214
3. Login and you should be default be able to see the eoapi-k8s grafana dashboard. The Prometheus datasource will already be configured for you:
201215

202-
![Grafana Datasource Configuration](../images/datasource.png)
216+
![Grafana Datasource Configuration](./images/datasource.png)
203217

204218
You can then view the main eoAPI dashboard:
205219

206-
![](../images/gfdashboard.png)
220+
![](./images/gfdashboard.png)
207221

208222
To add additional custom dashboards, you can use the dashboard import functionality:
209223

210-
![Adding Custom Grafana Dashboards](../images/add-grafana-dashboard.png)
224+
![Adding Custom Grafana Dashboards](./images/add-grafana-dashboard.png)
211225

212226
### Install or Upgrade Autoscaling Changes to `eoapi` Chart
213227

@@ -361,7 +375,7 @@ that you're deploying using `ingress.className: "nginx"`.
361375

362376
4. **Monitor autoscaling in Grafana** - Go back to your Grafana dashboard and watch your services autoscale for the endpoints you're hitting:
363377

364-
![Grafana Autoscaling Dashboard](../images/grafanaautoscale.png)
378+
![Grafana Autoscaling Dashboard](./images/grafanaautoscale.png)
365379

366380
### Load Testing Best Practices
367381

docs/installation/providers/aws-eks.md renamed to docs/aws-eks.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
---
2+
title: "AWS EKS Setup"
3+
description: "Complete EKS cluster setup with OIDC, node autoscaling, EBS CSI, and NGINX ingress"
4+
external_links:
5+
- name: "eoapi-k8s Repository"
6+
url: "https://github.com/developmentseed/eoapi-k8s"
7+
- name: "AWS EKS Documentation"
8+
url: "https://docs.aws.amazon.com/eks/"
9+
- name: "eksctl Documentation"
10+
url: "https://eksctl.io/"
11+
- name: "Terraform Alternative"
12+
url: "https://github.com/developmentseed/eoapi-k8s-terraform"
13+
---
14+
115
# AWS EKS Cluster Walkthrough
216

317
This is a verbose walkthrough. It uses `eksctl` and assumes you already have an AWS account, have the [eksctl prerequisites installed](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html) including `eksctl` and `helm`.

docs/installation/providers/azure.md renamed to docs/azure.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
---
2+
title: "Azure AKS Setup"
3+
description: "Azure configuration with managed PostgreSQL, Key Vault integration, and Workload Identity"
4+
external_links:
5+
- name: "eoapi-k8s Repository"
6+
url: "https://github.com/developmentseed/eoapi-k8s"
7+
- name: "Azure Kubernetes Service Documentation"
8+
url: "https://docs.microsoft.com/en-us/azure/aks/"
9+
- name: "Azure CLI Documentation"
10+
url: "https://docs.microsoft.com/en-us/cli/azure/"
11+
- name: "Azure PostgreSQL Documentation"
12+
url: "https://docs.microsoft.com/en-us/azure/postgresql/"
13+
---
14+
115
# Microsoft Azure Setup
216

317
## Using Azure Managed PostgreSQL

0 commit comments

Comments
 (0)