Prerequisites
Before installing EKG, ensure you have the following:- Docker and Docker Compose (for Docker installation)
- Python 3.11+ (for manual installation)
- Neo4j 5.x (automatically provided with Docker, or install separately)
- Gemini API Key from Google AI Studio
Docker Installation (Recommended)
Docker provides the fastest way to get started with EKG, as it handles all dependencies automatically.Configure environment variables
Copy the example environment file and add your Gemini API key:Edit the
.env file and set your API key:.env
Get your Gemini API key from Google AI Studio. The free tier is sufficient for development.
Start the services
Launch both Neo4j and the EKG application using Docker Compose:This command will:
- Pull the Neo4j 5.15 image
- Build the EKG application container
- Start both services with proper networking
- Mount your data directory for configuration files
Verify the installation
Once the services are running, verify the installation:
- Web Interface: Open http://localhost:8000 in your browser
- Neo4j Browser: Access http://localhost:7474 (username:
neo4j, password:password) - Health Check: Visit http://localhost:8000/api/health
Docker Services
Thedocker-compose.yml file defines two services:
Manual Installation
For development or custom deployments, you can install EKG manually.Install Neo4j
Download and install Neo4j 5.x from the official website or use a cloud instance.Start Neo4j and note the connection details:
- URI:
bolt://localhost:7687 - Username:
neo4j - Password: Set during first startup
Configure environment
Create a Edit the file with your Neo4j and Gemini credentials:
.env file with your configuration:.env
Initialize the system
Run the initialization script to load data and verify the setup:This will:
- Validate environment variables
- Check for required data files
- Connect to Neo4j
- Parse configuration files
- Populate the knowledge graph
Verification
After installation, verify that all components are working:Troubleshooting
Neo4j Connection Failed
If you seeFailed to connect to Neo4j errors:
- Check Neo4j is running: Visit http://localhost:7474
- Verify credentials: Ensure
.envhas correct username/password - Wait for startup: Neo4j may take 10-20 seconds to fully start
- Check Docker logs:
docker-compose logs neo4j
Missing Gemini API Key
If you seeMissing required environment variables: GEMINI_API_KEY:
- Get an API key from Google AI Studio
- Add it to your
.envfile - Restart the application
Port Already in Use
If port 8000 or 7687 is already in use:docker-compose.yml to use different ports:
Data Files Not Found
If you seeMissing required data files:
Next Steps
Now that EKG is installed:- Configure data sources to add your infrastructure data
- Learn how to query the knowledge graph
- Customize environment variables for your setup