CalejoControl/QUICK_START.md

141 lines
3.6 KiB
Markdown

# Calejo Control Adapter - Quick Start Guide
## 🚀 One-Click Setup
### Automatic Configuration Detection
The setup script automatically reads from existing deployment configuration files in the `deploy/` directory:
```bash
# Make the setup script executable
chmod +x setup-server.sh
# Run the one-click setup (auto-detects from deploy/config/production.yml)
./setup-server.sh
```
### For Local Development
```bash
# Override to local deployment
./setup-server.sh -h localhost
```
### For Staging Environment
```bash
# Use staging configuration
./setup-server.sh -e staging
```
### Dry Run (See what will be done)
```bash
# Preview the setup process
./setup-server.sh --dry-run
```
## 📋 What the Setup Script Does
### 1. **Prerequisites Check**
- ✅ Verifies Docker and Docker Compose are installed
- ✅ Checks disk space and system resources
- ✅ Validates network connectivity
### 2. **Automatic Configuration**
-**Reads existing deployment config** from `deploy/config/production.yml`
-**Uses SSH settings** from existing deployment scripts
- ✅ Creates necessary directories and sets permissions
- ✅ Generates secure JWT secrets automatically
- ✅ Sets up SSL certificates for production
- ✅ Configures safe default settings
### 3. **Application Deployment**
- ✅ Builds and starts all Docker containers
- ✅ Waits for services to become healthy
- ✅ Validates all components are working
- ✅ Starts the dashboard automatically
### 4. **Ready to Use**
- ✅ Dashboard available at `http://localhost:8080/dashboard`
- ✅ REST API available at `http://localhost:8080`
- ✅ Health monitoring at `http://localhost:8080/health`
## 🎯 Next Steps After Setup
### 1. **Access the Dashboard**
Open your browser and navigate to:
```
http://your-server:8080/dashboard
```
### 2. **Initial Configuration**
Use the dashboard to:
- **Configure SCADA Protocols**: Set up OPC UA, Modbus TCP connections
- **Define Pump Stations**: Add your pump stations and equipment
- **Set Safety Limits**: Configure operational boundaries
- **Create Users**: Set up operator and administrator accounts
### 3. **Integration**
- Connect your existing SCADA systems
- Configure data points and setpoints
- Test emergency stop functionality
- Set up monitoring and alerts
## 🔧 Manual Setup (Alternative)
If you prefer manual setup:
```bash
# Clone the repository
git clone <repository-url>
cd calejo-control-adapter
# Copy configuration
cp config/.env.example .env
# Edit configuration (optional)
nano .env
# Start services
docker-compose up -d
# Verify setup
curl http://localhost:8080/health
```
## 🔐 Default Credentials
After deployment, use these credentials to access the services:
### Grafana Dashboard
- **URL**: http://localhost:3000 (or your server IP:3000)
- **Username**: admin
- **Password**: admin
### Prometheus Metrics
- **URL**: http://localhost:9091 (or your server IP:9091)
- **Authentication**: None required by default
### PostgreSQL Database
- **Host**: localhost:5432
- **Database**: calejo
- **Username**: calejo
- **Password**: password
### Main Application
- **Dashboard**: http://localhost:8080/dashboard
- **API**: http://localhost:8080
- **Authentication**: JWT-based (configure users through dashboard)
**Security Note**: Change the default Grafana admin password after first login!
## 📞 Support
- **Documentation**: Check the `docs/` directory for comprehensive guides
- **Issues**: Report problems via GitHub issues
- **Community**: Join our community forum for help
---
*Your Calejo Control Adapter should now be running and ready for configuration through the web dashboard!*