Updated README
All checks were successful
AWS Deploy on Push / build (push) Successful in 7m22s

This commit is contained in:
2025-05-21 16:57:27 -05:00
parent cb793ef5e1
commit c1e3a6ef26

183
README.md
View File

@@ -1,44 +1,165 @@
# Roo Commander Build - v{BUILD_VERSION} ({BUILD_CODENAME})
# IPTV Updater AWS
**Build Date:** {BUILD_DATE}
An automated IPTV playlist and EPG updater service deployed on AWS infrastructure using CDK.
## Overview
This archive contains the configuration files for Roo Commander, a system designed to enhance AI-assisted software development within VS Code.
This project provides a service for automatically updating IPTV playlists and Electronic Program Guide (EPG) data. It runs on AWS infrastructure with:
## Installation
- EC2 instance for hosting the application
- RDS PostgreSQL database for data storage
- Amazon Cognito for user authentication
- HTTPS support via Let's Encrypt
- Domain management via FreeDNS
1. **Ensure you are in your desired VS Code workspace root directory.** This is the top-level folder of the project you want Roo Commander to assist with.
2. **Extract the contents of this zip archive directly into your workspace root.**
## Prerequisites
This will create/overwrite the following hidden directories and files:
- AWS CLI installed and configured
- Python 3.12 or later
- Node.js v22.15 or later for AWS CDK
- Docker and Docker Compose for local development
* `.ruru/modes/` (Contains all mode definitions)
* `.ruru/processes/` (Contains standard process definitions)
* `.roo/` (Contains Roo Commander specific rules and configurations)
* `.ruru/templates/` (Contains templates for various artifacts)
* `.ruru/workflows/` (Contains workflow definitions)
* `.ruru/archive/` (Empty placeholder)
* `.ruru/context/` (Empty placeholder)
* `.ruru/decisions/` (Empty placeholder)
* `.ruru/docs/` (Empty placeholder)
* `.ruru/ideas/` (Empty placeholder)
* `.ruru/logs/` (Empty placeholder)
* `.ruru/planning/` (Empty placeholder)
* `.ruru/reports/` (Empty placeholder)
* `.ruru/snippets/` (Empty placeholder)
* `.ruru/tasks/` (Empty placeholder)
* `build_mode_summary.js`
* `build_roomodes.js`
* `LICENSE`
* `.roomodes`
## Local Development
**Important:** Extracting these files may overwrite existing configurations if you have previously set up Roo Commander.
1. Clone the repository:
## Usage
```bash
git clone <repo-url>
cd iptv-updater-aws
```
Once extracted, Roo Commander should be active within your VS Code workspace (you might need to reload the window). You can interact with it via the chat interface.
2. Copy the example environment file:
## Changelog
```bash
cp .env.example .env
```
Please refer to `CHANGELOG.md` (included in this archive) for details on what's new in this version.
3. Add your configuration to `.env`:
```
FREEDNS_User=your_freedns_username
FREEDNS_Password=your_freedns_password
DOMAIN_NAME=your.domain.name
SSH_PUBLIC_KEY=your_ssh_public_key
REPO_URL=repository_url
LETSENCRYPT_EMAIL=your_email
```
4. Start the local development environment:
```bash
./scripts/start_local_dev.sh
```
5. Stop the local environment:
```bash
./scripts/stop_local_dev.sh
```
## Deployment
### Initial Deployment
1. Ensure your AWS credentials are configured:
```bash
aws configure
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Deploy the infrastructure:
```bash
./scripts/deploy.sh
```
The deployment script will:
- Create/update the CloudFormation stack using CDK
- Configure the EC2 instance with required software
- Set up HTTPS using Let's Encrypt
- Configure the domain using FreeDNS
### Continuous Deployment
The project includes a Gitea workflow (`.gitea/workflows/aws_deploy_on_push.yml`) that automatically:
- Deploys infrastructure changes
- Updates the application on EC2 instances
- Restarts the service
## Infrastructure
The AWS infrastructure is defined in `infrastructure/stack.py` and includes:
- VPC with public subnets
- EC2 t2.micro instance (Free Tier eligible)
- RDS PostgreSQL database (db.t3.micro)
- Security groups for EC2 and RDS
- Elastic IP for the EC2 instance
- Cognito User Pool for authentication
- IAM roles and policies for EC2 instance access
## User Management
### Creating Users
To create a new user in Cognito:
```bash
./scripts/create_cognito_user.sh <user_pool_id> <username> <password> --admin <= optional for defining an admin user
```
### Deleting Users
To delete a user from Cognito:
```bash
./scripts/delete_cognito_user.sh <user_pool_id> <username>
```
## Architecture
The application is structured as follows:
```bash
app/
├── auth/ # Authentication modules
├── iptv/ # IPTV and EPG processing
├── models/ # Database models
└── utils/ # Utility functions
infrastructure/ # AWS CDK infrastructure code
docker/ # Docker configuration for local development
scripts/ # Utility scripts for deployment and management
```
## Environment Variables
The following environment variables are required:
| Variable | Description |
|----------|-------------|
| FREEDNS_User | FreeDNS username |
| FREEDNS_Password | FreeDNS password |
| DOMAIN_NAME | Your domain name |
| SSH_PUBLIC_KEY | SSH public key for EC2 access |
| REPO_URL | Repository URL |
| LETSENCRYPT_EMAIL | Email for Let's Encrypt certificates |
## Security Notes
- The EC2 instance has appropriate IAM permissions for:
- EC2 instance discovery
- SSM command execution
- RDS access
- Cognito user management
- All database credentials are stored in AWS Secrets Manager
- HTTPS is enforced using Let's Encrypt certificates
- Access is restricted through Security Groups