Managing your SFP Server
The SFP server provides comprehensive CLI commands for managing all aspects of your server deployment. This page provides an overview of available commands organized by their primary use cases.
Quick Start
The typical workflow for setting up and managing an SFP server:
Initialize:
sfp server init
- Set up a new server instanceStart:
sfp server start
- Launch the server servicesMonitor:
sfp server status
andsfp server health
- Check server healthManage: Use various commands to manage environments, users, and resources
Update:
sfp server update
- Keep the server up to date
Command Categories
Lifecycle Management
Essential commands for managing the server lifecycle:
init
Initialize a new server instance
sfp server init --tenant my-app --mode prod
start
Start server services
sfp server start --tenant my-app --daemon
stop
Stop server services
sfp server stop --tenant my-app
status
Check service status
sfp server status --tenant my-app
update
Update to latest version
sfp server update --tenant my-app
📊 Monitoring & Operations
Commands for monitoring and operational management:
health
Health checks and diagnostics
sfp server health --detailed
logs
View and monitor logs
sfp server logs --tenant my-app --follow
scale
Scale worker services
sfp server scale --tenant my-app --normal-workers 3
Authentication & Security
Manage authentication and security:
application-token
Manage API tokens
sfp server application-token create --name "CI Token"
user
User management
sfp server user list
Environment Management
Manage deployment environments:
environment
Manage environments
sfp server environment create --name production
org
Manage Salesforce orgs
sfp server org list
pool
Manage org pools
sfp server pool list
review-envs
Review environments
sfp server review-envs list
Build & Release Management
Commands for managing builds and releases:
builds
View build history
sfp server builds list --repository myorg/myrepo
releasedefinition
Generate releases
sfp server releasedefinition generate -n MyRelease
artifacts
Manage artifacts
sfp server artifacts list
Configuration & Integration
Configuration and integration management:
repository
Repository connections
sfp server repository add
webhook
Webhook configuration
sfp server webhook create
project
Project management
sfp server project list
Data Storage
Data and configuration storage:
doc-store
Document storage
sfp server doc-store get
key-value
Key-value storage
sfp server key-value set
Common Workflows
Initial Setup
# 1. Initialize the server
sfp server init --tenant my-app --mode prod --domain example.com
# 2. Authenticate
sfp server auth login --email [email protected]
# 3. Start the server
sfp server start --tenant my-app --daemon
# 4. Verify health
sfp server health --detailed
Daily Operations
# Check server status
sfp server status --tenant my-app
# Monitor logs
sfp server logs --tenant my-app --service app --follow
# Check build status
sfp server builds list --repository myorg/myrepo --days 1
# View environment status
sfp server environment list --status available
Deployment Workflow
# 1. Lock environment
TICKET=$(sfp server environment lock --name production --json | jq -r '.ticket')
# 2. Deploy (your deployment commands)
sfp release --environment production
# 3. Unlock environment
sfp server environment unlock --name production --ticket $TICKET
Maintenance Operations
# Scale down for maintenance
sfp server scale --tenant my-app --normal-workers 1 --batch-workers 0
# Update server
sfp server update --tenant my-app
# Scale back up
sfp server scale --tenant my-app --normal-workers 3 --batch-workers 2
Authentication Options
Most server commands support multiple authentication methods:
User Authentication
# Login once
sfp server auth login --email [email protected]
# Commands use stored token
sfp server environment list
Application Token (CI/CD)
# Set token in environment
export SFP_APPLICATION_TOKEN="sfp_app_..."
# Commands use token automatically
sfp server builds list --repository myorg/myrepo
Remote Server Management
All lifecycle commands support managing remote servers via SSH:
# Remote server operations
sfp server start --tenant my-app \
--ssh-connection [email protected] \
--identity-file ~/.ssh/id_rsa
sfp server logs --tenant my-app \
--ssh-connection [email protected] \
--identity-file ~/.ssh/id_rsa \
--follow
Best Practices
Lock Environments During Deployments: Prevent concurrent deployments with environment locking
Monitor Health Regularly: Set up automated health checks using
sfp server health
Scale Appropriately: Adjust worker counts based on your workload
Keep Servers Updated: Regularly update to get latest features and security fixes
Use Application Tokens for CI/CD: Create dedicated tokens for automated processes
Review Logs Regularly: Monitor logs for errors and performance issues
Troubleshooting
Server Won't Start
# Check status
sfp server status --tenant my-app
# View recent logs
sfp server logs --tenant my-app --tail 500
# Check health with details
sfp server health --detailed
Authentication Issues
# Clear and re-authenticate
sfp server auth clear --all
sfp server auth login --email [email protected]
# Verify authentication
sfp server health --check-auth
Performance Issues
# Check worker status
sfp server status --tenant my-app --json | jq '.workers'
# Adjust scaling
sfp server scale --tenant my-app --critical-workers 2 --normal-workers 4
Next Steps
Detailed Command Reference: See the CLI Reference for complete command documentation
Architecture Overview: Learn about the server architecture
Installation Guide: Follow the installation guide for detailed setup instructions
API Reference: Explore the API documentation for programmatic access
Note: All server commands require sfp-pro. Community edition users should upgrade to access server functionality.
Tip: Use
--json
flag with commands for scripting and automation purposes.
Last updated