3.0 KiB
3.0 KiB
SolaceNet Setup Guide
Complete setup instructions for the SolaceNet Capability Platform.
Prerequisites
- Node.js 18+
- PostgreSQL 14+
- Redis 7+
- Go 1.21+ (for gateway)
- Docker & Docker Compose (optional)
Database Setup
- Run Prisma migrations:
cd dbis_core
npx prisma generate
npx prisma migrate dev --name add_solacenet_models
- Verify schema:
npx prisma studio
Environment Configuration
Create/update .env file:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/dbis
# Redis (for policy caching)
REDIS_URL=redis://localhost:6379
SOLACENET_REDIS_URL=redis://localhost:6379
# Kafka (for events)
KAFKA_BROKERS=localhost:9092
SOLACENET_KAFKA_BROKERS=localhost:9092
# Gateway
SOLACENET_GATEWAY_PORT=8080
POLICY_ENGINE_URL=http://localhost:3000
BACKEND_URL=http://localhost:3000
JWT_SECRET=your-secret-key
# API
PORT=3000
NODE_ENV=development
Start Services
Option 1: Docker Compose (Recommended)
docker-compose -f docker-compose.solacenet.yml up -d
Option 2: Manual Start
- Start Redis:
redis-server
- Start DBIS API:
cd dbis_core
npm install
npm run dev
- Start Go Gateway:
cd gateway/go
go mod tidy
go run main.go
- Start Operations Console:
cd frontend/solacenet-console
npm install
npm start
Seed Initial Data
Create a seed script to populate initial capabilities:
// scripts/seed-solacenet.ts
import { capabilityRegistryService } from './src/core/solacenet/registry/capability-registry.service';
async function seed() {
// Register core capabilities
await capabilityRegistryService.createCapability({
capabilityId: 'payment-gateway',
name: 'Payment Gateway',
version: '1.0.0',
description: 'Payment processing gateway',
defaultState: 'disabled',
});
await capabilityRegistryService.createCapability({
capabilityId: 'wallet-accounts',
name: 'Wallet Accounts',
version: '1.0.0',
description: 'Stored value wallet accounts',
defaultState: 'disabled',
});
// Add more capabilities...
}
seed();
Run with:
npx ts-node scripts/seed-solacenet.ts
Verify Installation
- Check API health:
curl http://localhost:3000/health
- List capabilities:
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://localhost:3000/api/v1/solacenet/capabilities
- Check gateway:
curl http://localhost:8080/health
Testing
Run tests:
npm test
Troubleshooting
Redis Connection Issues
- Verify Redis is running:
redis-cli ping - Check
REDIS_URLin.env
Database Migration Errors
- Ensure PostgreSQL is running
- Check
DATABASE_URLformat - Run
npx prisma migrate resetif needed
Gateway Not Starting
- Verify Go 1.21+ is installed:
go version - Run
go mod tidyingateway/go - Check port 8080 is available
Next Steps
- Configure entitlements for your tenants
- Set up policy rules
- Enable capabilities as needed
- Monitor audit logs