Prerequisites
Before deploying applications to the DineTogether infrastructure, ensure you have the following:
Required Accounts
GitHub Account
- [ ] Member of the
dine-togetherorganization - [ ] Access to create/manage repositories
Development Tools
-
[ ] Git - Version control
-
[ ] Docker - For building container images
-
[ ] kubectl - Kubernetes CLI (for deployment and debugging)
-
[ ] Flux CLI (optional but recommended)
-
[ ] GitHub CLI (optional but recommended)
Repository Requirements
1. Repository Location
Your repository must be in the dine-together organization:
- ✅ github.com/dine-together/your-app
- ❌ github.com/personal/your-app
2. Required Files
your-app/
├── Dockerfile # Container build instructions
└── .github/
└── workflows/
└── build.yml # CI/CD workflow for building images
3. GitHub Actions Setup
Your app repository needs a workflow to build and push Docker images to GHCR:
# .github/workflows/build.yml
name: Build and Push Image
on:
push:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# ... (see first-deployment.md for full example)
Infrastructure Repository Access
1. Clone the Infrastructure Repository
2. Understand the Structure
k8s-infrastructure/
├── clusters/
│ ├── staging/ # Staging environment configs
│ └── production/ # Production environment configs
├── apps/ # Application manifests
├── monitoring/ # Prometheus, Grafana, Loki
└── scripts/ # Helper scripts
Local Development Setup
1. Install Docker Desktop
Download from Docker Desktop for Windows
2. Install kubectl
Download from kubectl for Windows
3. Test Your Setup
# Test Docker
docker run hello-world
# Test kubectl (requires kubeconfig)
kubectl version --client
# Test GHCR access
echo $GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
Application Requirements
Supported Languages/Frameworks
The infrastructure supports any application that can run in a container:
- ✅ Frontend: React, Next.js, Vue, Angular
- ✅ Backend: Node.js, Python/Django, Ruby/Rails, Go
- ✅ Databases: PostgreSQL, MySQL, MongoDB, Redis
- ✅ Other: Any Dockerized application
Port Configuration
Your application should:
- Bind to 0.0.0.0 (not localhost or 127.0.0.1)
- Expose ports in Dockerfile
- Use standard ports (3000 for Node.js, 8000 for Django, etc.)
Environment Variables
- Use environment variables for configuration
- Never hardcode secrets in code
- Use Kubernetes Secrets for sensitive data
Kubernetes Cluster Access
For Deployment
You'll need: - Access to the k8s-infrastructure repository - Understanding of Helm charts or Kustomize - FluxCD will handle the actual deployment
For Debugging
If you need direct cluster access:
# Get kubeconfig from your administrator
# Then test connection
kubectl get nodes
kubectl get namespaces
Understanding GitOps
What is GitOps?
GitOps means: - Git repository is the source of truth - Changes are made via pull requests - FluxCD automatically syncs changes to the cluster - No manual kubectl apply commands
Key Concepts
- HelmRelease: Defines how to deploy your Helm chart
- Kustomization: Defines how to apply raw Kubernetes manifests
- ImageRepository: Watches for new container images
- ImagePolicy: Defines which image tags to use
Checklist
Before proceeding to deployment:
- [ ] Docker installed and running
- [ ] kubectl installed
- [ ] Repository in
dine-togetherorganization - [ ] Can build Docker image locally
- [ ] Understand GitOps principles
- [ ] Access to k8s-infrastructure repository
Troubleshooting
Docker Not Running
Permission Denied
Can't Access Repository
Ensure you're a member of the dine-together organization. Contact an admin if needed.
GHCR Authentication Issues
# Create a personal access token with read:packages and write:packages permissions
# Then login
echo YOUR_GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
Next Steps
Once prerequisites are met: 1. Continue to First Deployment 2. Learn about GitOps with FluxCD 3. Explore Helm Charts