Skip to main content
Enterprise Only

This section is only relevant to Enterprise customers who acquired an on-prem license.

Management Guide

Learn how to manage and maintain your Permit Platform deployment.

Daily Operations

Platform Status

# Check overall platform health
./scripts/status.sh

# Detailed service status
./scripts/status.sh --detailed

# Resource usage monitoring
./scripts/status.sh --resources

Log Management

# View logs for specific services
./scripts/logs.sh backend
./scripts/logs.sh celery
./scripts/logs.sh opal-server
./scripts/logs.sh policy-sync
./scripts/logs.sh pdp

# View all platform logs
./scripts/logs.sh --all

# Follow logs in real-time
./scripts/logs.sh backend --follow

Service Management

# Restart all platform services
./scripts/restart.sh

# Restart specific service
./scripts/restart.sh backend

# Reload configuration
./scripts/reload.sh

Scaling Operations

Horizontal Scaling

# Scale backend services
./scripts/scale.sh backend --replicas 5

# Scale worker processes
./scripts/scale.sh celery --replicas 3

# Scale PDP instances
./scripts/scale.sh pdp --replicas 8

# Auto-scaling (if configured)
./scripts/scale.sh --auto-enable

Resource Adjustment

# Increase memory allocation
./scripts/resources.sh backend --memory 4Gi

# Adjust CPU limits
./scripts/resources.sh celery --cpu 1000m

# View current resource allocation
./scripts/resources.sh --show

Git Repository Management

Policy Synchronization

# Check policy sync status
./scripts/policy-status.sh

# Manual policy sync
./scripts/policy-sync.sh

# Test Git connectivity
./scripts/test-git.sh

Repository Updates

# Update Git repository configuration
./scripts/update-git-config.sh \
--repo "git@github.com:neworg/new-policies.git" \
--key "./new-private-key"

# Validate new repository access
./scripts/validate-git.sh

Backup and Recovery

Creating Backups

# Full platform backup
./scripts/backup.sh --full

# Database only backup
./scripts/backup.sh --database

# Configuration backup
./scripts/backup.sh --config

# Automated backup setup
./scripts/backup.sh --schedule daily

Backup Management

# List available backups
./scripts/backup.sh --list

# Restore from backup
./scripts/restore.sh --backup backup-20241201-143022.tar.gz

# Cleanup old backups (keep last 30 days)
./scripts/backup.sh --cleanup 30

Updates and Upgrades

Platform Updates

# Check for available updates
./scripts/update.sh --check

# Download update package
curl -L "<new-version-link>" -o permit-platform-v1.1.0.tar.gz
tar -xzf permit-platform-v1.1.0.tar.gz && cd permit-platform-v1.1.0

# Run upgrade
sudo ./upgrade.sh

# Verify upgrade
./scripts/status.sh --version

Rollback Procedures

# Rollback to previous version
./scripts/rollback.sh

# Rollback to specific version
./scripts/rollback.sh --version v1.0.5

# Emergency rollback (quick)
./scripts/rollback.sh --emergency

Security Maintenance

Certificate Management

# Check certificate status
./scripts/certificates.sh --status

# Renew certificates
./scripts/certificates.sh --renew

# Update custom certificates
./scripts/certificates.sh --update \
--cert ./new-cert.pem \
--key ./new-key.pem

Password Rotation

# Rotate database passwords
./scripts/rotate-passwords.sh --database

# Rotate service passwords
./scripts/rotate-passwords.sh --services

# Generate new API keys
./scripts/rotate-passwords.sh --api-keys

Security Auditing

# Run security audit
./scripts/security-audit.sh

# Check for vulnerabilities
./scripts/security-scan.sh

# Review access logs
./scripts/audit-logs.sh --since 24h

Monitoring and Alerting

Health Monitoring

# Continuous health monitoring
./scripts/health-monitor.sh --continuous

# Generate health report
./scripts/health-report.sh

# Check service endpoints
./scripts/health-check.sh --endpoints

Performance Monitoring

# Performance metrics
./scripts/metrics.sh --performance

# Resource utilization
./scripts/metrics.sh --resources

# Response time analysis
./scripts/metrics.sh --response-times

Multi-Server Management

Cluster Operations

# View cluster status
./scripts/cluster.sh --status

# Add new node to cluster
./scripts/cluster.sh --add-node <new-server-ip>

# Remove node from cluster
./scripts/cluster.sh --remove-node <server-ip>

# Cluster health check
./scripts/cluster.sh --health

Load Balancing

# Check load balancer status
./scripts/loadbalancer.sh --status

# Update load balancer configuration
./scripts/loadbalancer.sh --update

# Test load distribution
./scripts/loadbalancer.sh --test

Troubleshooting Commands

System Diagnostics

# Comprehensive system check
./scripts/diagnostics.sh --full

# Network connectivity test
./scripts/diagnostics.sh --network

# Storage health check
./scripts/diagnostics.sh --storage

Log Collection for Support

# Collect all logs for support
./scripts/collect-logs.sh
# Creates: permit-platform-logs-YYYYMMDD-HHMMSS.tar.gz

# Collect with system information
./scripts/collect-logs.sh --include-system

# Emergency log collection
./scripts/collect-logs.sh --emergency

Maintenance Windows

Planned Maintenance

# Enable maintenance mode
./scripts/maintenance.sh --enable

# Perform maintenance tasks
./scripts/maintenance.sh --run-tasks

# Disable maintenance mode
./scripts/maintenance.sh --disable

Emergency Procedures

# Emergency stop
./scripts/emergency.sh --stop

# Emergency restart
./scripts/emergency.sh --restart

# Safe mode startup
./scripts/emergency.sh --safe-mode

Configuration Management

Environment Variables

# View current configuration
./scripts/config.sh --show

# Update configuration
./scripts/config.sh --set KEY=VALUE

# Reload configuration
./scripts/config.sh --reload

Feature Toggles

# Enable/disable features
./scripts/features.sh --enable feature-name
./scripts/features.sh --disable feature-name

# List available features
./scripts/features.sh --list

Need help with troubleshooting? Check the Troubleshooting Guide