Time to complete: 5-10 minutes Prerequisites: macOS with Apple Silicon, terminal access Result: A complete local development infrastructure with databases, caching, and secrets management
DevStack Core is a local development infrastructure that gives you production-like services on your Mac. Instead of installing databases and services individually, you get a complete stack with one command.
┌─────────────────────────────────────────────────────────────────────────────┐
│ Your Development Mac │
│ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ DevStack Core (Colima VM) │ │
│ │ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ Vault │ │ PostgreSQL │ │ MySQL │ │ MongoDB │ │ │
│ │ │ Secrets │ │ DB │ │ DB │ │ DB │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ │
│ │ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ Redis │ │ RabbitMQ │ │ Forgejo │ │ Grafana │ │ │
│ │ │ Cluster │ │ Messages │ │ Git │ │ Monitor │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ │
│ │ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ │
│ Your App ────────────────────────────────────────────────────────────────▶ │
│ connects to localhost ports (5432, 3306, 6379, etc.) │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
| Service | Purpose | Access |
|---|---|---|
| Vault | Secrets & certificates | http://localhost:8200 |
| PostgreSQL | Relational database | localhost:5432 |
| MySQL | Relational database | localhost:3306 |
| MongoDB | Document database | localhost:27017 |
| Redis Cluster | Caching (3 nodes) | localhost:6379-6381 |
| RabbitMQ | Message queue | localhost:5672, http://localhost:15672 |
| Forgejo | Git hosting | http://localhost:3000 |
| Grafana | Monitoring dashboards | http://localhost:3001 |
# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install required tools
brew install colima docker docker-compose uv# Clone the repository
git clone https://github.com/NormB/devstack-core.git
cd devstack-core
# Create Python environment
uv venv && uv pip install -r scripts/requirements.txt
# Copy environment configuration
cp .env.example .env# Start all services (first time takes 2-3 minutes)
./devstack startWhat you should see:
═══ DevStack Core - Start Services ═══
Starting with profile(s): standard
✓ Colima VM started
Starting Docker services...
Container dev-vault Started
Container dev-postgres Started
Container dev-mysql Started
Container dev-mongodb Started
Container dev-redis-1 Started
Container dev-redis-2 Started
Container dev-redis-3 Started
Container dev-rabbitmq Started
Container dev-forgejo Started
✓ Services started successfully
# Initialize Vault (creates encryption keys)
./devstack vault-init
# Bootstrap services with credentials
./devstack vault-bootstrapWhat you should see:
═══ Vault Initialization ═══
✓ Vault initialized successfully
✓ Keys saved to ~/.config/vault/keys.json
✓ Root token saved to ~/.config/vault/root-token
═══ Vault Bootstrap ═══
✓ PKI engines configured
✓ Service credentials stored
✓ AppRole authentication configured
# Check all services are healthy
./devstack healthWhat you should see:
Service Health Status
╭───────────────┬─────────┬─────────╮
│ Service │ Status │ Health │
├───────────────┼─────────┼─────────┤
│ vault │ running │ healthy │
│ postgres │ running │ healthy │
│ mysql │ running │ healthy │
│ mongodb │ running │ healthy │
│ redis-1 │ running │ healthy │
│ redis-2 │ running │ healthy │
│ redis-3 │ running │ healthy │
│ rabbitmq │ running │ healthy │
│ forgejo │ running │ healthy │
╰───────────────┴─────────┴─────────╯
DevStack stores all passwords in Vault. Get them with:
# Get PostgreSQL password
./devstack vault-show-password postgres
# Get all credentials as environment variables
source scripts/load-vault-env.sh
echo $POSTGRES_PASSWORD # Now available in your shellPostgreSQL (Python)
import psycopg2
conn = psycopg2.connect(
host="localhost",
port=5432,
database="devdb",
user="devuser",
password="<from vault-show-password>"
)MySQL (Node.js)
const mysql = require('mysql2');
const connection = mysql.createConnection({
host: 'localhost',
port: 3306,
user: 'devuser',
password: '<from vault-show-password>',
database: 'devdb'
});Redis (Go)
import "github.com/redis/go-redis/v9"
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "<from vault-show-password>",
})MongoDB (Rust)
use mongodb::Client;
let uri = "mongodb://devuser:<password>@localhost:27017/devdb";
let client = Client::with_uri_str(uri).await?;cd ~/devstack-core
./devstack start # Start all services
./devstack health # Verify everything is healthy./devstack logs postgres # View PostgreSQL logs
./devstack shell mysql # Get shell inside MySQL container
./devstack status # Quick status check./devstack stop # Stop all services (data preserved)DevStack has different profiles for different needs:
| Profile | RAM | Services | Use Case |
|---|---|---|---|
| minimal | 2GB | Vault, PostgreSQL, Redis, Forgejo | Light development |
| standard | 4GB | + MySQL, MongoDB, RabbitMQ, Redis cluster | Full development |
| full | 6GB | + Prometheus, Grafana, Loki, Vector | With monitoring |
| reference | +1GB | + Example APIs (5 languages) | Learning/testing |
# Start with minimal profile
./devstack start --profile minimal
# Start with full monitoring
./devstack start --profile full
# Combine profiles
./devstack start --profile standard --profile reference./devstack logs # All services
./devstack logs postgres # Specific service
./devstack logs -f redis-1 # Follow logs in real-time./devstack restart postgres./devstack reset # Stops and removes all containers
./devstack start # Fresh start
./devstack vault-init # Re-initialize Vault
./devstack vault-bootstrap # Re-create credentials./devstack backup # Creates timestamped backup
./devstack restore # Lists available backups
./devstack restore 20250113_143022 # Restore specific backupAfter starting DevStack, you can access these web UIs:
| Service | URL | Default Login |
|---|---|---|
| Vault | http://localhost:8200 | Token from ~/.config/vault/root-token |
| RabbitMQ | http://localhost:15672 | ./devstack vault-show-password rabbitmq |
| Forgejo | http://localhost:3000 | Create account on first visit |
| Grafana | http://localhost:3001 | admin / admin |
| Prometheus | http://localhost:9090 | No auth required |
# Check if Colima VM is running
colima status
# If not running, start it
./devstack start
# Check service logs for errors
./devstack logs vault# Verify service is healthy
./devstack health
# Check the port is accessible
nc -zv localhost 5432
# Get the correct password
./devstack vault-show-password postgres# Check Vault status
./devstack vault-status
# Unseal if needed
./devstack vault-unseal# Complete reset (preserves Vault keys)
./devstack reset
./devstack start
./devstack vault-bootstrapNow that DevStack is running:
- Learn the CLI - See CLI Reference for all commands
- Understand the architecture - Read Architecture
- Connect your app - See Use Cases for examples
- Customize profiles - See Service Profiles
- Set up monitoring - Start with
--profile fulland open Grafana
- Quick reference:
./devstack --help - Service status:
./devstack health - Logs:
./devstack logs <service> - Documentation: See docs/README.md for full documentation
- Issues: https://github.com/NormB/devstack-core/issues