Skip to content

Initial Deployment

This guide walks you through deploying Lyra Platform for the first time using Rancher and Harbor.

Overview

Lyra deployment follows these steps:

  1. Deploy via Rancher UI
  2. Verify deployment
  3. Create initial superuser

Prerequisites: - ✅ Kubernetes cluster configured (Kubernetes Setup) - ✅ Infrastructure deployed (Infrastructure Deployment) - ✅ Lyra Helm charts available in Harbor registry - ✅ kubectl access to your cluster

Estimated Time: 10-15 minutes


Step 1: Deploy via Rancher UI

The Lyra Helm chart comes with predefined values that automatically connect to the infrastructure components deployed in the previous step.

Installation Steps

  1. Navigate to Apps & Marketplace
  2. Open Rancher UI
  3. Select your Kubernetes cluster
  4. Click Apps & Marketplace in the left sidebar

  5. Find Lyra Application Chart

  6. Click Charts tab
  7. Search for lyra-app in the Harbor catalog
  8. Click on the lyra-app chart

  9. Configure Installation

  10. Name: lyra (fixed release name)
  11. Namespace: lyra (will be created automatically)
  12. Project: Select Lyra Platform (created in Kubernetes Setup)
  13. Chart Version: Select latest version (e.g., 1.0.0)

  14. Review Predefined Configuration

The chart includes predefined values that automatically configure:

  • Images: Points to Harbor registry (registry.lyra.ovh/lyra/)

    • Backend, Frontend, Scheduler images with correct tags
    • Automatic image pull using project-level Harbor secret
  • Database: Connects to PostgreSQL cluster from Infrastructure Deployment

    • Host: lyra-postgres-rw.databases.svc.cluster.local
    • Credentials retrieved automatically from PostgreSQL secret
  • Redis: Connects to Redis HA and Ephemeral instances

    • Redis HA with Sentinel for persistent data
    • Redis Ephemeral for session storage
  • Storage: Uses Ceph/Rook storage classes

    • Persistent volumes for uploads and data
  • Ingress: Pre-configured for external access

    • MetalLB load balancer integration
    • TLS certificate management
  • Optional: Customize Values (Only if Needed)

If you need to customize any values (e.g., ingress hostname): - In Rancher UI, look for configuration forms - Common customizations: - Ingress Hostname: Your domain name (e.g., lyra.yourdomain.com) - Replica Counts: Adjust for your environment (defaults: backend=2, frontend=2, scheduler=1) - Resource Limits: Adjust CPU/memory if needed

Note: All infrastructure connections (database, Redis, storage) are pre-configured correctly. Do NOT modify these unless you have a specific reason.

  1. Install Application
  2. Review the configuration summary
  3. Click Install
  4. Wait for deployment to complete (typically 2-5 minutes)

Monitor Deployment Progress

You can monitor the deployment in Rancher:

  1. Go to WorkloadsDeployments
  2. Filter by namespace lyra
  3. Watch for all deployments to show "Active" status:
  4. lyra-backend
  5. lyra-frontend
  6. lyra-scheduler

Step 2: Verify Deployment

Check Pod Status

kubectl get pods -n lyra

Expected output:

NAME                              READY   STATUS    RESTARTS   AGE
lyra-backend-7d9f8c4b5d-abc12     1/1     Running   0          2m
lyra-backend-7d9f8c4b5d-def34     1/1     Running   0          2m
lyra-frontend-6c8d7b5a4e-ghi56    1/1     Running   0          2m
lyra-frontend-6c8d7b5a4e-jkl78    1/1     Running   0          2m
lyra-scheduler-5b7c8d9e6f-mno90   1/1     Running   0          2m

All pods should be Running with 1/1 READY.

Check Services

kubectl get svc -n lyra

Expected output:

NAME             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
lyra-backend     ClusterIP   10.43.100.50    <none>        8000/TCP   2m
lyra-frontend    ClusterIP   10.43.100.51    <none>        80/TCP     2m

Check Ingress

kubectl get ingress -n lyra

Expected output:

NAME    CLASS   HOSTS                 ADDRESS          PORTS     AGE
lyra    nginx   lyra.yourdomain.com   192.168.1.100    80, 443   2m

Test Application Access

# Test HTTP redirect
curl -I http://lyra.yourdomain.com

# Test HTTPS access
curl -k https://lyra.yourdomain.com

# Expected: 200 OK with HTML content

Check Logs

# Backend logs
kubectl logs -n lyra -l app=lyra-backend --tail=50

# Frontend logs
kubectl logs -n lyra -l app=lyra-frontend --tail=50

# Scheduler logs
kubectl logs -n lyra -l app=lyra-scheduler --tail=50

Look for: - No error messages - Database connection successful - Redis connection successful - Application startup messages


Step 3: Initial Superuser Setup

After deployment, you need to create the first superuser account.

Access Backend Pod

# Get backend pod name
BACKEND_POD=$(kubectl get pods -n lyra -l app=lyra-backend -o jsonpath='{.items[0].metadata.name}')

# Access pod shell
kubectl exec -it -n lyra $BACKEND_POD -- bash

Create Superuser

Option A: Using CLI Script (Recommended)

# Inside the pod
python -m app.scripts.create_superuser \
  --username admin \
  --email admin@lyra.local \
  --password <secure-password>

Option B: Using Python Interactive

# Inside the pod
python

from app.db.session import SessionLocal
from app.services.user import create_user
from app.schemas.user import UserCreate

db = SessionLocal()

# Create superuser
user_data = UserCreate(
    username="admin",
    email="admin@lyra.local",
    password="<secure-password>",
    is_superuser=True,
    is_active=True
)

user = create_user(db, user_data)
print(f"Superuser created: {user.username}")

db.close()

Test Login

  1. Open https://lyra.yourdomain.com in browser
  2. Login with superuser credentials:
  3. Username: admin
  4. Password: <your-password>
  5. Verify you can access the dashboard

Post-Deployment Configuration

Configure System Settings

  1. Login as superuser
  2. Navigate to SettingsSystem
  3. Configure:
  4. System Timezone: Set your preferred timezone for scheduling
  5. Email Settings: Configure SMTP for notifications (optional)
  6. Backup Settings: Configure backup schedules

Create First Tenant

  1. Navigate to TenantsCreate Tenant
  2. Fill in:
  3. Name: Your organization name
  4. Slug: URL-friendly identifier (e.g., acme-corp)
  5. Description: Brief description
  6. Click Create

Configure Kubernetes Integration

  1. Navigate to SettingsKubernetes
  2. Verify connection to cluster
  3. Configure:
  4. Default storage classes
  5. Resource quotas
  6. Network policies

Troubleshooting

Pods Not Starting

Check events:

kubectl describe pod -n lyra <pod-name>

Common issues: - Image pull errors → Check Harbor credentials - CrashLoopBackOff → Check application logs - Pending → Check resource availability

Database Connection Issues

Verify database connectivity:

kubectl exec -it -n lyra $BACKEND_POD -- bash
python -c "from app.db.session import engine; engine.connect()"

Check PostgreSQL status:

kubectl get pods -n databases -l app.kubernetes.io/name=lyra-postgres
kubectl get cluster -n databases lyra-postgres

Ingress Not Working

Check ingress controller:

kubectl get pods -n ingress-nginx

Check certificate:

kubectl describe certificate lyra-tls -n lyra

Test internal service:

kubectl run -it --rm debug --image=curlimages/curl --restart=Never -- \
  curl http://lyra-backend.lyra.svc.cluster.local:8000/api/v1/health


Next Steps

Deployment Complete!

Now you can:

  1. Configure Updates - Set up update procedures
  2. Create Users and Tenants - Start onboarding your organization
  3. Configure LDAP (Optional) - Integrate with your directory service
  4. Set up Monitoring - Configure Prometheus and Grafana

Need help? Check our troubleshooting guide or open an issue.