- Renamed README-documentor.md → README-technical-writer.md - Updated all references from "Documentor" to "Technical Writer" across: - README files (README.md, README-developer.md, README-likec4.md) - Content pages (documentation section, homepage) - LikeC4 models (documentation-platform.c4 in both projects) - Regenerated LikeC4 webcomponents with updated terminology - Updated lowercase "documentor" to "technicalWriter" in model IDs "Technical Writer" is the proper English term for documentation contributors, replacing the non-standard "Documentor" terminology.
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
- Technical Writer 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 technicalWriter, focus on content quality. The platform handles deployment automatically! 🚀