|
|
|
# Deployment
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
- Python 3.8 or higher
|
|
|
|
- Access to Bohrium server (consent-form API)
|
|
|
|
- Access to Hafnium server (PowerShell scripts)
|
|
|
|
- Access to Xenon server (GCDS)
|
|
|
|
- GWME installed on migration servers (TEMP01, TEMP02, TEMP03)
|
|
|
|
- Network access between servers
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
### 1. Setup Environment
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Create virtual environment
|
|
|
|
python -m venv venv
|
|
|
|
venv\Scripts\activate
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
### 2. Configuration
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Copy environment template
|
|
|
|
copy env.template .env
|
|
|
|
|
|
|
|
# Edit .env with your actual values
|
|
|
|
# Configure API endpoints, credentials, scheduler times, etc.
|
|
|
|
```
|
|
|
|
|
|
|
|
### 3. Initialize Database
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python -c "from database import init_db; init_db()"
|
|
|
|
```
|
|
|
|
|
|
|
|
### 4. Register Servers
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python utils/register_servers.py
|
|
|
|
```
|
|
|
|
|
|
|
|
### 5. Verify Configuration
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python utils/check_live_safety.py
|
|
|
|
```
|
|
|
|
|
|
|
|
## Production Setup
|
|
|
|
|
|
|
|
### Windows Task Scheduler
|
|
|
|
|
|
|
|
1. Create a batch file `start_scheduler.bat`:
|
|
|
|
```batch
|
|
|
|
@echo off
|
|
|
|
cd /d "D:\automated-email-migration"
|
|
|
|
call venv\Scripts\activate.bat
|
|
|
|
python daily_scheduler.py
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Configure Windows Task Scheduler:
|
|
|
|
- Create new task
|
|
|
|
- Set trigger: "At startup"
|
|
|
|
- Set action: "Start a program" → Point to `start_scheduler.bat`
|
|
|
|
- Set "Run whether user is logged on or not"
|
|
|
|
- Set "Run with highest privileges"
|
|
|
|
|
|
|
|
## Post-Deployment
|
|
|
|
|
|
|
|
1. Verify scheduler is running:
|
|
|
|
```bash
|
|
|
|
python utils/check_scheduler_status.py
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Monitor master summary log:
|
|
|
|
- Check `D:\automated-email-migration\logs\daily_summary\`
|
|
|
|
|
|
|
|
3. Test queue sync manually (if needed)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
**See also:** [Configuration](Configuration.md), [Operations](Operations.md)
|
|
|
|
|