A local AI-powered Infrastructure as a Service (IaaS) system using Ollama models for launching applications, game servers, and other infrastructure through agentic demands.
This system is designed to run across multiple machines:
-
Ollama Server Machine: Runs the Ollama models for LLM inference and embeddings
- Hardware: Ryzen 7 5700x3d, 64GB RAM, 1TB NVME, RTX 4070 Ti Super
-
Model Context Protocol Server: Manages context and coordinates between agents
- Hardware: Ryzen 9 3900x, 64GB RAM, 1TB NVME, Quadro P4000
- Local LLM-powered infrastructure management
- Integration with OPNSense for networking configuration
- Support for deploying various applications:
- Web applications
- Database servers
- Game servers (Minecraft, CS2, Valheim, etc.)
- Vector storage for maintaining context and knowledge
- Distributed architecture for scalability
- Ollama installed on your inference machine
- Python 3.8+ installed
- OPNSense with API access configured
- Model Context Protocol Server running
-
Clone this repository:
git clone https://github.com/vespo92/Booner_Ollama.git cd Booner_Ollama
-
Copy the example environment file and edit it with your settings:
cp .env.example .env
-
Update the
.env
file with your specific configuration:- Configure OPNSense API settings
- Set the Model Context Protocol URL and credentials
- Set any other desired configuration parameters
-
Start the services using the provided scripts:
For Linux/macOS:
chmod +x run.sh ./run.sh
For Windows:
powershell -ExecutionPolicy Bypass -File .\run.ps1
These scripts will automatically detect if GPU support is available and start the appropriate configuration. The API server will be available at http://localhost:8000.
Alternatively, you can manually start the services:
With GPU support (requires NVIDIA Container Toolkit):
docker-compose up -d
For more information on setting up GPU support, see the GPU Setup Instructions.
-
To view logs:
docker-compose logs -f
-
To stop the services:
docker-compose down
-
Clone this repository:
git clone https://github.com/vespo92/Booner_Ollama.git cd Booner_Ollama
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Linux/macOS venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt
-
Copy the example environment file and edit it with your settings:
cp .env.example .env
-
Update the
.env
file with your specific configuration:- Set the
OLLAMA_BASE_URL
to point to your Ollama server - Configure OPNSense API settings
- Set the Model Context Protocol URL and credentials
- Set the
Run the application in interactive mode to directly input infrastructure requests:
python app.py --interactive
This will start a command-line interface where you can enter natural language requests for infrastructure operations.
If you're using the virtual environment setup, run the system as an API server for integration with MCP:
python app.py --api
Or simply run it without any arguments (API mode is the default):
python app.py
The API server will be available at http://localhost:8000.
If you're using Docker Compose, the API server is automatically started in API mode:
docker-compose up -d
To view logs:
docker-compose logs -f booner-api
To test the API connectivity with the MCP server (using virtual environment):
python test_api.py
With Docker Compose:
docker-compose exec booner-api python test_api.py
agents/
: Contains agent implementations for different tasksmodels/
: Interfaces for working with LLMs and embedding modelsutils/
: Utility modules for vector storage, configuration, etc.app.py
: Main application entry point
This project is designed to work with your OPN_IaC project, which uses a django-ninja stack to talk directly to OPNSense. The agents in this system will communicate with your OPN_IaC API to configure networking and infrastructure.
The Model Context Protocol Server manages the context and state for the agents. This system connects to your existing MCP server to maintain conversation context and agent states.
You can add new specialized agents by:
- Creating a new agent class in the
agents/
directory - Registering the agent with the MCP server
- Integrating the agent with the main application flow
Each agent can run on different hardware as needed.
This project is licensed under the MIT License - see the LICENSE file for details.