Processes
Overview
Processes are individual containerized services that make up your Tapitalee application. Each process represents a specific function or component of your application, such as a web server, API service, background worker, or database proxy. Processes provide fine-grained control over scaling, resource allocation, and deployment configuration.
Purpose and Benefits
- Service Isolation: Separate concerns and scale components independently
- Resource Control: Individual CPU, memory, and scaling configuration per service
- Fault Isolation: Failures in one process don’t affect others
- Independent Deployment: Deploy and update processes separately
- Specialized Configuration: Different container configurations for different workloads
- Horizontal Scaling: Scale each service based on its specific demands
CLI Usage
Create Process
tapit create process name=process_name [memory|cpu|demand_count|spot_count|command|image]=valueRequired Parameters
name: Process name (alphanumeric with hyphens)
Optional Parameters
memory: Memory allocation in GB (default: 0.5)cpu: CPU allocation in vCPUs (default: 0.25)demand_count: Number of on-demand instancesspot_count: Number of spot instancescommand: Override container commandimage: Specific container image
Examples
# Basic web process
tapit create process name=default
# API service with more resources
tapit create process name=api memory=2.0 cpu=1.0 demand_count=3 spot_count=0
# Background worker
tapit create process name=worker memory=1.0 cpu=0.5 demand_count=1 spot_count=2 command="python worker.py"
# Microservice with custom image
tapit create process name=auth-service image=myapp/auth:latest memory=0.5 cpu=0.25 demand_count=2Modify Process Configuration
tapit set process [name=process_name] [memory|cpu|desired_count|spot_count|command|image|disabled]=valueModifiable Parameters
name: Process to modify (required if multiple processes exist)memory: Update memory allocationcpu: Update CPU allocationdesired_count: Update on-demand instance countspot_count: Update spot instance countcommand: Update container commandimage: Update container imagedisabled: Disable (true) or enable (false) the process
Examples
# Scale up web process
tapit set process name=default desired_count=5
# Add more memory to worker
tapit set process name=worker memory=2.0
# Update command for background process
tapit set process name=scheduler command="python manage.py run_scheduler"
# Disable process temporarily
tapit set process name=worker disabled=true
# Re-enable process
tapit set process name=worker disabled=false
# Update to new image version
tapit set process name=api image=myapp/api:v2.1.0Restart Process
tapit restart process name=process_namePerforms a rolling restart of all instances of the specified process.
Examples
# Restart web servers
tapit restart process name=default
# Restart background workers
tapit restart process name=workerShow Process Details
tapit show process name=process_nameDisplays comprehensive information about a specific process.
List Processes
tapit list processesShows all processes in your application.
Delete Process
tapit delete process name=process_namePermanently removes a process and all its instances.
Examples
# Delete unused process
tapit delete process name=old-worker
# Clean up test process
tapit delete process name=test-apiProcess Types and Patterns
Web Process
Handles HTTP requests and serves web traffic:
tapit create process name=default memory=1.0 cpu=0.5 demand_count=3 spot_count=1Examples
Custom Commands
# Web server
tapit create process name=default command="npm start"
# Worker with specific script
tapit create process name=worker command="python -m celery worker -A app"
# Migration runner
tapit create process name=migrate command="python manage.py migrate" demand_count=1