Complete development environment setup for mni-backend components.
Run the complete setup:
./setup-all.shThis will:
- Install all required tools (including GitHub CLI)
- Download mnibuilder from private repo (prompts for GitHub login if needed)
- Clone/update repositories
- Configure environment
- Start Docker registry
- Prepare dependencies
- Optionally start Tilt
All tools are installed as binaries (no package manager dependencies):
- Go 1.24.2 - Programming language
- Docker - Container runtime
- mnibuilder - mNi Cloud project scaffolding tool
- aqua - CLI version manager
- direnv - Environment variable management (installed but not required)
- tmux - Terminal multiplexer for managing Tilt sessions
- yq - YAML processor
- Tilt - Kubernetes development tool
- gh - GitHub CLI for authentication and repository access
Configured in components.yaml:
- dependency-controller - Provides CRDs, must start first
- api-gateway - API gateway service
- vpc-controller - VPC management controller
- cli - Command line interface (no Tiltfile)
Add new components by editing components.yaml.
Installs all required development tools as binaries.
./setup-tools.shClones or updates all component repositories from GitHub using GitHub CLI.
./clone-repos.shAutomatically uses gh auth login if not authenticated.
Configures environment variables and installs aqua packages.
./setup-env.shStarts Docker registry at localhost:5000.
./setup-registry.shDownloads Go dependencies and runs initial build for all components.
./prepare-deps.shStarts Tilt for all components in tmux session.
./tilt-up.sh- Creates tmux session "mni-tilt"
- Starts dependency-controller first
- Each component gets its own tmux window
- Tilt UIs on sequential ports starting from 10350
Stops all Tilt instances and cleans up.
./tilt-down.shShows status of Tilt instances and Kubernetes deployments.
./tilt-status.shAutomatically configured:
GOPRIVATE=github.com/mNi-CloudTILT_ALLOW_K8S_CONTEXT=kubernetes-admin@kubernetesTILT_REGISTRY=localhost:5000
After running tilt-up.sh:
- dependency-controller: http://localhost:10350
- api-gateway: http://localhost:10351
- vpc-controller: http://localhost:10352
- Attach to session:
tmux attach -t mni-tilt - List windows:
Ctrl-b w - Switch window:
Ctrl-b [number] - Detach:
Ctrl-b d
The setup uses GitHub CLI for authentication. If not already authenticated:
# Login to GitHub (will be prompted during clone-repos.sh)
gh auth login
# Manual login if needed
gh auth login --web
# Check authentication status
gh auth statusGitHub CLI automatically handles authentication for git operations.
If registry is not accessible:
docker run -d --restart=unless-stopped --name registry -p 5000:5000 registry:2Ensure kubectl is configured:
kubectl cluster-info- Edit
components.yaml:
- name: new-controller
repo: https://github.com/mNi-Cloud/new-controller.git
type: controller
has_tiltfile: true
tilt_port: 10353
required: false- Run setup:
./clone-repos.sh
./setup-env.sh
./prepare-deps.sh
./tilt-up.shComponents with has_tiltfile: true will be automatically managed by Tilt.