Hawiyat

Application Management

Application Management with Hawiyat CLI

Hawiyat provides a powerful platform for deploying, scaling, and managing applications of all types. This comprehensive guide covers everything from basic deployment to advanced application management.

Prerequisites

Before deploying applications, ensure:

  • Hawiyat CLI is installed (hawiyat --version)
  • Authentication is complete (hawiyat auth login)
  • Required permissions are granted
  • Project workspace is initialized
  • Deployment environment is configured

Quick Start

Deploy your first application:

# Initialize a new application
hawiyat app init my-awesome-app
 
# Deploy to production
hawiyat app deploy --env production

Application Commands

Create Application

hawiyat app create [options]

Options:

  • --name <name> - Application name
  • --type <type> - Application type (node, python, go, java, etc.)
  • --framework <framework> - Framework (next.js, django, spring, etc.)
  • --git <repository> - Git repository URL
  • --branch <branch> - Git branch to deploy
  • --team <team> - Team/Organization name
  • --private - Create as private application

Example:

hawiyat app create \
  --name my-next-app \
  --type node \
  --framework next.js \
  --git https://github.com/username/repo \
  --branch main

Deploy Application

hawiyat app deploy [options]

Options:

  • --env <environment> - Target environment
  • --version <version> - Deployment version
  • --docker-file <path> - Custom Dockerfile
  • --compose-file <path> - Docker compose file
  • --replicas <number> - Number of instances
  • --registry <url> - Custom container registry
  • --no-cache - Skip build cache
  • --force - Force deployment

Deployment Configuration:

# hawiyat.yaml
version: '1.0'
name: my-application
type: node
env: production
build:
  dockerfile: ./Dockerfile
  context: .
  args:
    NODE_ENV: production
resources:
  cpu: 1
  memory: 1Gi
  storage: 10Gi
scaling:
  min: 2
  max: 10
  target_cpu_usage: 70

Application Configuration

hawiyat app config [command] [options]

Environment Variables:

# Set environment variables
hawiyat app config set KEY=value
 
# Set from .env file
hawiyat app config import .env.prod
 
# View current configuration
hawiyat app config list

Secrets Management:

# Add encrypted secrets
hawiyat app secrets set \
  --name DB_PASSWORD \
  --value "super-secret" \
  --env production

Scale Application

hawiyat app scale [options]

Options:

  • --replicas <number> - Set instance count
  • --cpu <value> - CPU allocation
  • --memory <value> - Memory allocation
  • --auto-scale - Enable auto-scaling

Auto-scaling Configuration:

hawiyat app scale config \
  --min 2 \
  --max 10 \
  --cpu-target 70 \
  --memory-target 80

Monitor Application

hawiyat app monitor [options]

Monitoring Commands:

# View logs
hawiyat app logs --tail 100 --follow
 
# Check status
hawiyat app status --detailed
 
# View metrics
hawiyat app metrics --format json
 
# Health checks
hawiyat app health

Domain Management

hawiyat app domain [command] [options]

Commands:

# Add custom domain
hawiyat app domain add example.com
 
# Configure SSL
hawiyat app domain ssl --auto
 
# Add CDN
hawiyat app domain cdn --provider cloudflare

Advanced Features

CI/CD Integration

# GitHub Actions Integration
hawiyat app ci github \
  --repo username/repo \
  --branch main \
  --token $GITHUB_TOKEN
 
# GitLab CI Integration
hawiyat app ci gitlab \
  --project group/project \
  --token $GITLAB_TOKEN

Database Integration

# Link database
hawiyat app database link \
  --type postgres \
  --name my-db
 
# Database migration
hawiyat app database migrate \
  --file ./migrations

Service Mesh

# Enable service mesh
hawiyat app mesh enable \
  --proxy envoy \
  --tracing jaeger
 
# Configure routing
hawiyat app mesh route create \
  --from service-a \
  --to service-b

Application Templates

Quick start with pre-configured templates:

# List available templates
hawiyat app template list
 
# Create from template
hawiyat app create --template next-typescript

Best Practices

  1. Development Workflow

    • Use version control
    • Implement CI/CD pipelines
    • Follow GitOps principles
    • Maintain staging environments
  2. Security

    • Regular security scans
    • Implement RBAC
    • Use secrets management
    • Enable audit logging
  3. Performance

    • Implement caching
    • Use CDN for static assets
    • Configure auto-scaling
    • Monitor resource usage
  4. Reliability

    • Set up health checks
    • Implement graceful shutdown
    • Configure automated backups
    • Use rolling updates

Troubleshooting

Common issues and solutions:

  1. Deployment Failures
# Check deployment logs
hawiyat app logs --deployment latest
 
# Verify configuration
hawiyat app config verify
  1. Performance Issues
# Analyze performance
hawiyat app analyze
 
# View resource usage
hawiyat app resources
  1. Connectivity Problems
# Test connectivity
hawiyat app network test
 
# Debug routing
hawiyat app route debug

For detailed information, visit our application documentation or join our Discord community.

On this page