2.4 KiB
2.4 KiB
EZ-Assistant Integration Guide
This guide explains how to integrate EZ-Assistant into your EZ-Homelab installation script.
Files to Add
- ez-assistant-integration.sh: Contains all the EZ-Assistant installation functions
- docker-compose.yml: The Docker Compose configuration (already created)
- moltbot/config/moltbot.json: Gateway configuration (already created)
Integration Steps
1. Source the Integration Script
Add this line near the top of ez-homelab.sh, after the initial setup:
# Source EZ-Assistant integration
source "$(dirname "$0")/ez-assistant-integration.sh"
2. Add Menu Option
Find your main menu function and add the EZ-Assistant option:
echo "3) Install Docker + EZ-Homelab services"
echo "🤖 4) Install EZ-Assistant (AI Homelab Manager) - ~5-10 minutes"
echo "5) Exit"
3. Add Menu Handler
In your menu handling logic, add:
4)
if install_ez_assistant; then
echo "🎉 EZ-Assistant ready!"
else
echo "❌ EZ-Assistant installation failed, but EZ-Homelab setup continues..."
fi
;;
4. Handle Dependencies
Ensure the script handles the case where Docker might not be installed yet:
- If user selects option 4 before installing Docker, show an error
- Or modify the logic to install Docker first if needed
Configuration After Installation
After successful installation, users need to:
-
Edit
/opt/stacks/ez-assistant/.envto add:- AI service keys (Claude, etc.)
- Bot tokens (Telegram, Discord)
-
Set up Traefik routing for
assistant.yourdomain.com -
Configure the Moltbot gateway settings as needed
Error Handling
The integration includes comprehensive error handling:
- System requirement checks
- Build failure recovery
- Service startup verification
- Clear user feedback
If EZ-Assistant fails to install, the main EZ-Homelab installation continues normally.
Testing
Test the integration by:
- Running the script on a fresh system
- Selecting option 4 for EZ-Assistant
- Verifying the build completes successfully
- Checking that services start properly
- Confirming the main script still works for options 1-3
Maintenance
- Keep the Moltbot repository URL updated
- Monitor for changes in build requirements
- Update AI service configuration as needed /opt/stacks/ez-assistant/INTEGRATION_README.md