97 lines
2.4 KiB
Markdown
97 lines
2.4 KiB
Markdown
# Calejo Control Adapter - Quick Deployment Checklist
|
|
|
|
## Pre-Deployment Checklist
|
|
|
|
### ✅ Server Preparation
|
|
- [ ] Target server has Ubuntu 20.04+ or CentOS 8+
|
|
- [ ] Docker 20.10+ installed
|
|
- [ ] Docker Compose 2.0+ installed
|
|
- [ ] Minimum 10GB disk space available
|
|
- [ ] Minimum 4GB RAM available
|
|
- [ ] Outbound internet access enabled
|
|
|
|
### ✅ SSH Key Setup
|
|
- [ ] SSH key pair generated for target environment
|
|
- [ ] Private key stored in `deploy/keys/` with `chmod 600`
|
|
- [ ] Public key deployed to target server
|
|
- [ ] SSH connection test successful
|
|
|
|
### ✅ Configuration
|
|
- [ ] Configuration file updated for target environment
|
|
- [ ] Environment variables file created
|
|
- [ ] Database credentials configured
|
|
- [ ] SCADA endpoints configured
|
|
- [ ] Security settings reviewed
|
|
|
|
## Deployment Steps
|
|
|
|
### 1. Dry Run (Always do this first!)
|
|
```bash
|
|
python deploy/ssh/deploy-remote.py -c deploy/config/production.yml --dry-run
|
|
```
|
|
|
|
### 2. Actual Deployment
|
|
```bash
|
|
python deploy/ssh/deploy-remote.py -c deploy/config/production.yml
|
|
```
|
|
|
|
### 3. Post-Deployment Verification
|
|
- [ ] Health check: `curl http://SERVER_IP:8080/health`
|
|
- [ ] Service status: `docker-compose ps`
|
|
- [ ] Logs review: `docker-compose logs app`
|
|
- [ ] Validation script: `./deploy/validate-deployment.sh`
|
|
|
|
## Quick Commands Reference
|
|
|
|
### Deployment
|
|
```bash
|
|
# Python deployment (recommended)
|
|
python deploy/ssh/deploy-remote.py -c deploy/config/production.yml
|
|
|
|
# Shell script deployment
|
|
./deploy/deploy-onprem.sh
|
|
|
|
# Manual deployment
|
|
docker-compose -f docker-compose.production.yml up -d
|
|
```
|
|
|
|
### Verification
|
|
```bash
|
|
# Health check
|
|
curl http://SERVER_IP:8080/health
|
|
|
|
# Service status
|
|
docker-compose -f docker-compose.production.yml ps
|
|
|
|
# Application logs
|
|
docker-compose -f docker-compose.production.yml logs app
|
|
|
|
# Full validation
|
|
./deploy/validate-deployment.sh
|
|
```
|
|
|
|
### Troubleshooting
|
|
```bash
|
|
# Check all logs
|
|
docker-compose -f docker-compose.production.yml logs
|
|
|
|
# Restart services
|
|
docker-compose -f docker-compose.production.yml restart
|
|
|
|
# Stop all services
|
|
docker-compose -f docker-compose.production.yml down
|
|
|
|
# SSH to server
|
|
ssh -i deploy/keys/production_key root@SERVER_IP
|
|
```
|
|
|
|
## Emergency Contacts
|
|
|
|
- **Deployment Issues**: Check `/var/log/calejo/deployment.log`
|
|
- **Application Issues**: Check `docker-compose logs app`
|
|
- **Database Issues**: Check `docker-compose logs db`
|
|
- **Network Issues**: Verify firewall and port configurations
|
|
|
|
---
|
|
|
|
**Remember**: Always test deployment in staging environment before production! |