|
| 1 | +# Windows Development Environment Setup |
| 2 | + |
| 3 | +This guide provides instructions for setting up a complete development environment for the GenAI IDP accelerator on Windows systems using the automated setup script. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +Before running the setup script, ensure you have: |
| 8 | + |
| 9 | +- **Windows 10 or Windows 11** with latest updates |
| 10 | +- **Administrator privileges** on your machine |
| 11 | +- **Internet connectivity** for downloading packages |
| 12 | +- **PowerShell** (included with Windows) |
| 13 | +- **At least 10GB free disk space** for all development tools |
| 14 | + |
| 15 | +## Running the Setup Script |
| 16 | + |
| 17 | +### Step 1: Run as Administrator |
| 18 | + |
| 19 | +1. Right-click on **Command Prompt** or **PowerShell** |
| 20 | +2. Select **"Run as administrator"** |
| 21 | +3. Navigate to the project directory: |
| 22 | + ```cmd |
| 23 | + cd path\to\genaiic-idp-accelerator |
| 24 | + ``` |
| 25 | +4. Execute the setup script: |
| 26 | + ```cmd |
| 27 | + scripts\dev_setup.bat |
| 28 | + ``` |
| 29 | + |
| 30 | +### Step 2: Follow Interactive Prompts |
| 31 | + |
| 32 | +The script will guide you through: |
| 33 | + |
| 34 | +1. **AWS Credentials Configuration**: |
| 35 | + ``` |
| 36 | + Enter AWS Access Key ID: |
| 37 | + Enter AWS Secret Access Key: |
| 38 | + Enter AWS Default Region (e.g., us-east-1): |
| 39 | + ``` |
| 40 | + |
| 41 | +2. **GitLab Project Setup**: |
| 42 | + - SSH URL (uses default if not specified) |
| 43 | + - Local parent directory name (defaults to "idp") |
| 44 | + - Branch selection (defaults to "develop") |
| 45 | + - Project will be cloned to `C:\Projects\<parent-dir>\genaiic-idp-accelerator` |
| 46 | + |
| 47 | +3. **Build Configuration**: |
| 48 | + - S3 bucket name for artifacts |
| 49 | + - S3 prefix (defaults to "idp") |
| 50 | + - AWS region (defaults to "us-east-1") |
| 51 | + - Build options: Standard, Verbose, or Skip build |
| 52 | + |
| 53 | +## What Gets Installed |
| 54 | + |
| 55 | +The script automatically installs and configures: |
| 56 | + |
| 57 | +### Development Tools |
| 58 | +- **Python 3.12** - Required runtime for the project |
| 59 | +- **Node.js** - For React UI development |
| 60 | +- **Git** - Version control |
| 61 | +- **AWS CLI** - AWS service interaction |
| 62 | +- **AWS SAM CLI** - Serverless application deployment |
| 63 | +- **Docker Desktop** - Container support |
| 64 | +- **Chocolatey** - Windows package manager |
| 65 | + |
| 66 | +### Python Dependencies |
| 67 | +- **boto3** - AWS SDK for Python |
| 68 | +- **numpy 2.3.2** - Numerical computing |
| 69 | +- **typer** - CLI framework |
| 70 | +- **rich** - Rich text and beautiful formatting |
| 71 | +- **editdistance** - String similarity calculations |
| 72 | +- **python-docx** - Word document processing |
| 73 | + |
| 74 | +## Troubleshooting |
| 75 | + |
| 76 | +### Common Issues |
| 77 | + |
| 78 | +#### Administrator Privileges Error |
| 79 | +**Problem**: Script fails with "must be run as Administrator" |
| 80 | +**Solution**: |
| 81 | +- Close current command prompt |
| 82 | +- Right-click Command Prompt → "Run as administrator" |
| 83 | +- Navigate back to project directory and retry |
| 84 | + |
| 85 | +#### Python Version Issues |
| 86 | +**Problem**: "Python version is too old. Need Python 3.12 or later" |
| 87 | +**Solution**: The script will automatically install Python 3.12 |
| 88 | + |
| 89 | +#### Chocolatey Installation Fails |
| 90 | +**Problem**: PowerShell execution policy restrictions |
| 91 | +**Solution**: The script handles this automatically, but if issues persist: |
| 92 | +```powershell |
| 93 | +Set-ExecutionPolicy Bypass -Scope Process -Force |
| 94 | +``` |
| 95 | + |
| 96 | +#### AWS CLI Configuration Test Fails |
| 97 | +**Problem**: "AWS configuration test failed" |
| 98 | +**Solution**: |
| 99 | +- Verify your AWS credentials are correct |
| 100 | +- Check internet connectivity |
| 101 | +- Ensure your AWS account has necessary permissions |
| 102 | + |
| 103 | +#### Docker Installation Issues |
| 104 | +**Problem**: Docker Desktop installation fails or requires restart |
| 105 | +**Solution**: |
| 106 | +- Complete the script execution |
| 107 | +- Restart your computer when prompted |
| 108 | +- Docker Desktop may require manual startup after restart |
| 109 | + |
| 110 | +#### Build Failures (pywin32 Error) |
| 111 | +**Problem**: `Error: PythonPipBuilder:ResolveDependencies - {pywin32==311(wheel)}` |
| 112 | +**Solution**: This is a known issue with Windows-specific dependencies: |
| 113 | +```cmd |
| 114 | +# Clean build cache and retry |
| 115 | +rmdir /s /q .aws-sam |
| 116 | +python publish.py <bucket> <prefix> <region> |
| 117 | +
|
| 118 | +# Or use container build (requires Docker) |
| 119 | +sam build --use-container |
| 120 | +``` |
| 121 | + |
| 122 | +#### SAM CLI Version Requirements |
| 123 | +**Problem**: Build fails due to SAM CLI version |
| 124 | +**Solution**: The script installs SAM CLI >= 1.129.0 automatically. If issues persist: |
| 125 | +```cmd |
| 126 | +# Check version |
| 127 | +sam --version |
| 128 | +
|
| 129 | +# Update if needed |
| 130 | +choco upgrade aws-sam-cli -y |
| 131 | +``` |
| 132 | + |
| 133 | +## Validation |
| 134 | + |
| 135 | +After successful installation, the script automatically validates: |
| 136 | + |
| 137 | +- ✓ Python 3.12+ installation |
| 138 | +- ✓ Node.js installation |
| 139 | +- ✓ AWS CLI installation and configuration |
| 140 | +- ✓ Git installation |
| 141 | +- ✓ Docker installation (may show warning if not running) |
| 142 | +- ✓ SAM CLI installation |
| 143 | +- ✓ Python package installations (boto3, numpy, typer, rich) |
| 144 | + |
| 145 | +## Next Steps |
| 146 | + |
| 147 | +After successful setup: |
| 148 | + |
| 149 | +1. **Review the validation output** to ensure all components installed correctly |
| 150 | +2. **Restart your computer** if Docker Desktop was installed |
| 151 | +3. **Your development environment is ready** - the script has already built the project if you selected that option |
| 152 | +4. **Use the provided CloudFormation template URL** to deploy the stack to AWS |
| 153 | + |
| 154 | +## Build Options Explained |
| 155 | + |
| 156 | +The script offers three build options: |
| 157 | + |
| 158 | +1. **Standard build (recommended)**: Builds the project with normal output |
| 159 | +2. **Verbose build**: Provides detailed output for debugging build issues |
| 160 | +3. **Skip build**: Only sets up the environment without building the project |
| 161 | + |
| 162 | +## Support |
| 163 | + |
| 164 | +If you encounter issues: |
| 165 | + |
| 166 | +1. Check the script output for specific error messages |
| 167 | +2. Review the validation results at the end of the script |
| 168 | +3. Consult the project's main [Troubleshooting Guide](./troubleshooting.md) |
| 169 | +4. Contact the development team with detailed error logs |
| 170 | + |
| 171 | +--- |
| 172 | + |
| 173 | +**Note**: The setup process may take 30-60 minutes depending on your internet connection. A system restart may be required after Docker Desktop installation. |
0 commit comments