4. Setup and Installation

This section provides a step-by-step guide to setting up and installing the Ferdy Framework for different environments. It includes prerequisites, installation methods, and configuration details.

4.1 Prerequisites

Before setting up the Ferdy Framework, ensure the following:

  1. System Requirements:

    • Operating System: Windows, macOS, or Linux.

    • Hardware: Minimum 8 GB RAM, recommended 16 GB for development.

    • Disk Space: At least 20 GB free space.

  2. Dependencies:

    • Programming Languages: Python 3.9+ and Node.js 16+.

    • Package Managers: pip (Python), npm/yarn (JavaScript).

    • Docker (optional for containerized deployment).

    • Database: PostgreSQL (recommended) or MongoDB.

  3. API Access:

    • Ferdy API keys (available via the developer portal).

    • OAuth client credentials for integrations with third-party services (Google, Microsoft, etc.).

  4. Cloud Access:

    • Cloud account credentials (AWS, GCP, or Azure) for deploying Ferdy services.


4.2 Installation

4.2.1 Option 1: Local Installation for Development

  1. Clone the Repository: git clone https://github.com/ferdy-framework/ferdy.git

  2. Install Dependencies:

    1. Backend

      1. cd backend

      2. pip install -r requirements.txt

    2. Frontend

      1. cd frontend

      2. npm install

  3. Environment Configuration:

    1. Create a .env file in the backend directory with the following:

      DATABASE_URL=postgres://user:password@localhost:5432/ferdy

      API_KEY=your-ferdy-api-key

      SECRET_KEY=your-secret-key

  4. Database Setup:

    python manage.py migrate

  5. Run the Development Server:

    1. Backend: python manage.py runserver

    2. Frontend: npm start

  6. Access the Application:

    • Open your browser and navigate to http://localhost:3000.


4.2.2 Option 2: Dockerized Deployment

  1. Install Docker: Ensure Docker is installed and running on your system.

    Use Ferdy’s Docker Compose File: docker-compose up -d

  2. Verify Deployment: Check running containers: docker ps

  3. Access the Application:

    • Navigate to http://localhost:8080 for the Ferdy Dashboard.


4.2.3 Option 3: Cloud Deployment

  1. Select a Cloud Provider: Choose a supported provider: AWS, GCP, or Azure.

  2. Use Terraform for Infrastructure Setup:

Initialize Terraform: terraform init

Apply Ferdy deployment configuration: terraform apply

  1. Deploy Ferdy Framework:

    • Use CI/CD pipelines (e.g., GitHub Actions, Jenkins) for deployment.

    • Push Ferdy Docker containers to your cloud registry and deploy to Kubernetes.


4.3 Configuration

4.3.1 Application Configuration

Modify the config.yaml file to customize:

Default Models: models:

default: "gpt-4"

fallback: "gpt-3.5-turbo"

4.3.2 Voice Settings: voice:

recognition: "Google Speech-to-Text"

synthesis: "Amazon Polly"

4.3.3 API Keys

Store API keys in a secure environment variable or secret manager:

export FERDY_API_KEY=your-api-key

4.3.4 Authentication

Enable OAuth for user authentication:

Configure providers (Google, Microsoft) in auth.yaml: oauth:

google:

client_id: "your-google-client-id"

client_secret: "your-google-client-secret"

microsoft:

client_id: "your-microsoft-client-id"

client_secret: "your-microsoft-client-secret"


4.4 Verification

After installation, verify the setup:

  1. API Health Check:

Use the Ferdy health check endpoint: curl http://localhost:8000/api/health

Expected Response (json): {"status": "healthy"}

  1. Database Connectivity:

Ensure the database is reachable and populated: python manage.py dbcheck

  1. Frontend Accessibility:

    • Open the browser and navigate to the frontend.

Last updated