Infrastructure-as-Code (IaC) blueprint

 Here is the exact step-by-step procedure for provisioning a brand new hardware box:

Phase 1: Base Operating System Installation

  1. Flash the OS: Download the Ubuntu Server 24.04 LTS ISO from the official Ubuntu website and flash it to a bootable USB drive (using a tool like Rufus or BalenaEtcher).

  2. Install Ubuntu: Boot the new hardware from the USB drive. During the installation:

    • Select the default Ubuntu Server (do not install a desktop environment/GUI; it consumes valuable RAM and VRAM).

    • Ensure you check the box to Install OpenSSH server so you can connect to it remotely.

    • Set up your primary networking (Ethernet or Wi-Fi).

Phase 2: Execute the Appliance Blueprint

Once the server is running and connected to your network, move to your primary workstation.

  1. Transfer the Script: Securely copy the provision_appliance.sh script to your new server using SCP or SFTP:

    Bash
    scp provision_appliance.sh your_user@<new-server-ip>:~/
  2. Execute as Root: SSH into the new server, make the script executable, and run it with superuser privileges:

    Bash
    ssh your_user@<new-server-ip>
    chmod +x provision_appliance.sh
    sudo ./provision_appliance.sh
  3. Reboot: Once the script completes successfully, reboot the server (sudo reboot). This ensures the machine boots with the newly built Linux Kernel modules, the proprietary NVIDIA drivers, and the optimized Wi-Fi 7 network stack (sysctl changes).

Phase 3: Application Code Deployment

The script prepares the hardware, drivers, system limits, and service hooks. Next, you must place your actual application code where the Systemd services expect it.

  1. Deploy the Backend: Clone your FastAPI Python backend code into the directory specified by the blueprint: /opt/orphey/backend.

  2. Deploy the Database/Cache Subsystems: Ensure PostgreSQL and Redis are initialized. Configure your Qdrant vector database storage paths.

  3. Download AI Weights: Download your target LLM weights (e.g., Llama 3) for the vLLM engine to load into the RTX 5090's VRAM.

Phase 4: System Ignition

With the code in place and the base system provisioned, ignite the Orphey Edge ecosystem using the systemd manager:

Bash
# Enable the root FastAPI service (which will automatically orchestrate and wait for vLLM, PostgreSQL, and Redis)
sudo systemctl enable --now orphey-fastapi

# Monitor the startup sequence in real-time
sudo journalctl -fu orphey-fastapi

Commentaires