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:
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.
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.
API Access:
Ferdy API keys (available via the developer portal).
OAuth client credentials for integrations with third-party services (Google, Microsoft, etc.).
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
Clone the Repository:
git clone https://github.com/ferdy-framework/ferdy.git
Install Dependencies:
Backend
cd backend
pip install -r requirements.txt
Frontend
cd frontend
npm install
Environment Configuration:
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
Database Setup:
python manage.py migrate
Run the Development Server:
Backend:
python manage.py runserver
Frontend:
npm start
Access the Application:
Open your browser and navigate to http://localhost:3000.
4.2.2 Option 2: Dockerized Deployment
Install Docker: Ensure Docker is installed and running on your system.
Use Ferdy’s Docker Compose File:
docker-compose up -d
Verify Deployment: Check running containers:
docker ps
Access the Application:
Navigate to http://localhost:8080 for the Ferdy Dashboard.
4.2.3 Option 3: Cloud Deployment
Select a Cloud Provider: Choose a supported provider: AWS, GCP, or Azure.
Use Terraform for Infrastructure Setup:
Initialize Terraform:
terraform init
Apply Ferdy deployment configuration:
terraform apply
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:
API Health Check:
Use the Ferdy health check endpoint:
curl http://localhost:8000/api/health
Expected Response (json):
{"status": "healthy"}
Database Connectivity:
Ensure the database is reachable and populated:
python manage.py dbcheck
Frontend Accessibility:
Open the browser and navigate to the frontend.
Last updated