Created a complete documentation system for new documentors, including
interactive architecture diagrams and step-by-step guides for all documentation
workflows.
New LikeC4 architecture project (resources/doc-likec4/):
- Created documentation-platform.c4 model with 252 lines covering:
* Actors: documentor, reviewer, CI system, edge platform
* Tools: Hugo, LikeC4, Git, VS Code, markdownlint, htmltest
* Processes: local development, testing, CI/CD pipeline
* Repositories: git repo, cloudlet registry
- Defined 6 comprehensive views:
* overview: Complete documentation platform ecosystem
* localDevelopment: Local writing and preview workflow
* cicdPipeline: Automated testing and validation
* deploymentFlow: From commit to production
* fullWorkflow: End-to-end documentation lifecycle
* testingCapabilities: Quality assurance toolchain
New documentation pages (content/en/docs/documentation/):
- _index.md: Overview and introduction for new documentors
- local-development.md: Setting up local environment, live preview
- testing.md: Running markdown, HTML, and link validation
- cicd.md: Understanding automated CI/CD pipeline
- publishing.md: Deployment to Edge Connect Munich cloudlet
- quick-reference.md: Command reference and common tasks
Hugo shortcode for embedding LikeC4 diagrams:
- Created layouts/shortcodes/likec4-view.html
- Supports loading state with animated indicator
- Graceful error handling for missing views
- Automatic shadow DOM checking to ensure webcomponent loaded
- Usage: {{< likec4-view view="viewId" project="projectName" >}}
Supporting documentation:
- resources/LIKEC4-REGENERATION.md: Guide for regenerating webcomponents
- All diagrams are interactive and explorable in the browser
- Views include zoom, pan, and element inspection
This implementation provides:
1. Self-documenting documentation platform ("meta-documentation")
2. Visual learning for complex workflows via interactive diagrams
3. Clear separation of concerns (6 focused views vs 1 overwhelming diagram)
4. Onboarding path for new team members
5. Living architecture documentation that evolves with the platform
All new documentation passes markdown linting and builds successfully.
6.9 KiB
| title | linkTitle | weight | description |
|---|---|---|---|
| Publishing to Edge | Publishing | 50 | How documentation is deployed to the edge environment. |
Deployment Overview
After successful CI/CD, the documentation is deployed to an edge computing environment.
{{< likec4-view view="deploymentFlow" project="documentation-platform" >}}
Deployment Architecture
Edge Connect Platform
Our documentation is deployed using Edge Connect, which orchestrates deployments to edge cloudlets.
Configuration: edgeconnectdeployment.yaml
kind: edgeconnect-deployment
metadata:
name: "edpdoc"
appVersion: "1.0.0"
organization: "edp2"
spec:
k8sApp:
manifestFile: "./k8s-deployment.yaml"
infraTemplate:
- region: "EU"
cloudletOrg: "TelekomOP"
cloudletName: "Munich"
flavorName: "EU.small"
Key settings:
- Deployment name:
edpdoc - Region: EU (Munich)
- Cloudlet: TelekomOP Munich
- Flavor: EU.small (resource allocation)
Kubernetes Deployment
The application runs on Kubernetes: k8s-deployment.yaml
Service Definition
apiVersion: v1
kind: Service
metadata:
name: edpdoc
labels:
run: edpdoc
spec:
type: LoadBalancer
ports:
- name: tcp80
protocol: TCP
port: 80
targetPort: 80
selector:
run: edpdoc
- Type: LoadBalancer (external access)
- Port: 80 (HTTP)
- Selector: Routes traffic to pods with label
run: edpdoc
Deployment Configuration
apiVersion: apps/v1
kind: Deployment
metadata:
name: edpdoc
spec:
replicas: 1
selector:
matchLabels:
run: edpdoc
template:
metadata:
labels:
run: edpdoc
mexDeployGen: kubernetes-basic
spec:
containers:
- name: edpdoc
image: ###IMAGETAG###
imagePullPolicy: Always
ports:
- containerPort: 80
protocol: TCP
- Replicas: 1 (single instance)
- Image: Injected by deployment pipeline (
###IMAGETAG###placeholder) - Pull policy: Always (ensures latest version)
Network Configuration
Outbound connections are configured in edgeconnectdeployment.yaml:
network:
outboundConnections:
- protocol: "tcp"
portRangeMin: 80
portRangeMax: 80
remoteCIDR: "0.0.0.0/0"
- protocol: "tcp"
portRangeMin: 443
portRangeMax: 443
remoteCIDR: "0.0.0.0/0"
- Port 80: HTTP outbound
- Port 443: HTTPS outbound
- CIDR:
0.0.0.0/0(all destinations)
Deployment Process
1. Container Image Ready
After CI passes:
- Docker image built with
task build:oci-image - Tagged with git commit SHA
- Pushed to container registry
2. Edge Connect Orchestration
Edge Connect:
- Pulls container image
- Reads
edgeconnectdeployment.yaml - Provisions resources on Munich cloudlet
- Applies Kubernetes manifests
3. Kubernetes Deployment
Kubernetes:
- Creates deployment with 1 replica
- Pulls container image (
imagePullPolicy: Always) - Starts pod running Nginx + static Hugo site
- Creates LoadBalancer service
- Assigns external IP
4. Service Available
Documentation is now accessible:
- Protocol: HTTP
- Port: 80
- IP: Assigned by LoadBalancer
Complete Workflow
{{< likec4-view view="fullWorkflow" project="documentation-platform" >}}
End-to-End Process
- Documentor writes content (Markdown, LikeC4 models)
- Local testing with
task serveandtask test - Commit and push to Git repository
- GitHub Actions triggered on push to main
- CI tests run (build, markdown, HTML, links)
- Container image built if tests pass
- Image pushed to registry
- Edge deployment triggered
- Kubernetes applies manifests
- Service available on edge cloudlet
Monitoring Deployment
Check Deployment Status
kubectl get deployments -n <namespace>
kubectl get pods -n <namespace>
kubectl get services -n <namespace>
View Logs
kubectl logs deployment/edpdoc -n <namespace>
Access Documentation
Find the LoadBalancer external IP:
kubectl get service edpdoc -n <namespace>
Access via: http://<EXTERNAL-IP>
Rollback
If issues occur after deployment:
Option 1: Revert Commit
git revert <bad-commit>
git push origin main
CI will rebuild and redeploy.
Option 2: Manual Rollback
kubectl rollout undo deployment/edpdoc -n <namespace>
Returns to previous deployment version.
Option 3: Deploy Specific Version
Update image tag in deployment:
kubectl set image deployment/edpdoc edpdoc=<registry>/<image>:<tag> -n <namespace>
Scaling
Currently: 1 replica
To scale for higher traffic:
spec:
replicas: 3
Then apply:
kubectl apply -f k8s-deployment.yaml
Or scale dynamically:
kubectl scale deployment/edpdoc --replicas=3 -n <namespace>
Security Considerations
- Image scanning - Scan container images for vulnerabilities
- Resource limits - Set CPU/memory limits in deployment
- Network policies - Restrict pod-to-pod communication
- HTTPS - Consider adding TLS termination (Ingress)
Performance Optimization
- CDN - Add CDN in front of LoadBalancer
- Caching - Configure Nginx caching headers
- Compression - Enable gzip in Nginx
- Image optimization - Compress images in documentation
Troubleshooting
Pod not starting
kubectl describe pod <pod-name> -n <namespace>
Check:
- Image pull errors
- Resource constraints
- Configuration errors
Service unreachable
kubectl describe service edpdoc -n <namespace>
Check:
- LoadBalancer IP assigned
- Port configuration
- Network policies
Old content served
Check:
imagePullPolicy: Alwaysin deployment- Image tag is updated
- Pod has restarted
Force pod restart:
kubectl rollout restart deployment/edpdoc -n <namespace>
Best Practices
- Test before deploying - Always run
task testlocally - Use feature branches - Don't deploy directly from local
- Monitor after deployment - Check logs and access
- Document changes - Update RELEASE.md
- Version control - Tag releases in Git
Future Enhancements
Potential improvements:
- Blue-green deployment - Zero-downtime updates
- Canary releases - Gradual rollout to subset of users
- Auto-scaling - HorizontalPodAutoscaler based on traffic
- Multi-region - Deploy to multiple cloudlets
- HTTPS - TLS certificates and Ingress controller
Summary
The deployment process is automated and reliable:
✅ CI ensures quality - Tests prevent broken deployments ✅ Edge infrastructure - Low-latency access from EU ✅ Kubernetes orchestration - Reliable, scalable platform ✅ Simple rollback - Easy to recover from issues
As a documentor, focus on content quality. The platform handles deployment automatically! 🚀