yuvrajsingh6 commited on
Commit
2d7540b
·
1 Parent(s): f2e4a7d

chore: cleanup unused deployment docs

Browse files
.github/workflows/docker-build.yml DELETED
@@ -1,34 +0,0 @@
1
- name: Build and Push Docker Image
2
-
3
- on:
4
- push:
5
- branches: [ "main", "master" ]
6
- workflow_dispatch:
7
-
8
- jobs:
9
- build-and-push:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Checkout repository
13
- uses: actions/checkout@v4
14
-
15
- - name: Set up QEMU
16
- uses: docker/setup-qemu-action@v3
17
-
18
- - name: Set up Docker Buildx
19
- uses: docker/setup-buildx-action@v3
20
-
21
- - name: Login to Docker Hub
22
- uses: docker/login-action@v3
23
- with:
24
- username: ${{ secrets.DOCKERHUB_USERNAME }}
25
- password: ${{ secrets.DOCKERHUB_TOKEN }}
26
-
27
- - name: Build and push
28
- uses: docker/build-push-action@v5
29
- with:
30
- context: .
31
- push: true
32
- tags: ${{ secrets.DOCKERHUB_USERNAME }}/enterprise-rag:latest
33
- cache-from: type=gha
34
- cache-to: type=gha,mode=max
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AWS_APP_RUNNER_SETUP.md DELETED
@@ -1,48 +0,0 @@
1
- # AWS App Runner Deployment Guide
2
-
3
- Follow these steps to deploy your Enterprise RAG System to AWS App Runner for a recruiter-ready showcase.
4
-
5
- ## 1. Local Verification
6
- First, build and run your image locally to ensure the index is properly packaged:
7
- ```bash
8
- docker build -t enterprise-rag .
9
- docker run -p 8501:8501 -e GROQ_API_KEY=your_key_here enterprise-rag
10
- ```
11
- Visit `http://localhost:8501` to verify.
12
-
13
- ## 2. Push to AWS ECR
14
- You need to push your image to the Amazon Elastic Container Registry.
15
-
16
- 1. **Create Repository**:
17
- ```bash
18
- aws ecr create-repository --repository-name enterprise-rag --region your-region
19
- ```
20
- 2. **Login to ECR**:
21
- ```bash
22
- aws ecr get-login-password --region your-region | docker login --username AWS --password-stdin <your-account-id>.dkr.ecr.<your-region>.amazonaws.com
23
- ```
24
- 3. **Tag & Push**:
25
- ```bash
26
- docker tag enterprise-rag:latest <your-account-id>.dkr.ecr.<your-region>.amazonaws.com/enterprise-rag:latest
27
- docker push <your-account-id>.dkr.ecr.<your-region>.amazonaws.com/enterprise-rag:latest
28
- ```
29
-
30
- ## 3. Create App Runner Service
31
- 1. Go to **AWS Console** → **App Runner**.
32
- 2. Click **Create service**.
33
- 3. **Source**:
34
- - Repository type: **Container registry**.
35
- - Provider: **Amazon ECR**.
36
- - Container image: Select your `enterprise-rag` image.
37
- - Deployment settings: **Manual** (or Automatic if you want CI/CD).
38
- 4. **Configuration**:
39
- - Service name: `enterprise-rag-showcase`.
40
- - Virtual CPU & Memory: **1 vCPU & 2 GB** (Minimum recommended).
41
- - **Environment variables**:
42
- - `GROQ_API_KEY`: Paste your key here.
43
- 5. **Connectivity**:
44
- - Port: **8501**.
45
- 6. **Review & Create**.
46
-
47
- ## 4. Final Result
48
- Once deployed, AWS will provide a public URL like `https://xxxxxx.us-east-1.awsapprunner.com`. This is the URL you can share with recruiters!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AWS_DEPLOYMENT.md DELETED
@@ -1,152 +0,0 @@
1
- # AWS Deployment Guide - Enterprise RAG System
2
-
3
- ## Prerequisites
4
- - AWS Account
5
- - AWS CLI installed and configured
6
- - Docker installed locally
7
-
8
- ## Deployment Options
9
-
10
- ### Option 1: AWS EC2 (Recommended for Full Control)
11
-
12
- #### Step 1: Launch EC2 Instance
13
- 1. Go to AWS Console → EC2
14
- 2. Click **"Launch Instance"**
15
- 3. Choose:
16
- - **AMI**: Ubuntu 22.04 LTS
17
- - **Instance Type**: t3.medium (4GB RAM minimum)
18
- - **Storage**: 20GB
19
- 4. Configure Security Group:
20
- - Allow SSH (port 22) from your IP
21
- - Allow HTTP (port 8501) from anywhere
22
- - Allow HTTP (port 8000) from anywhere
23
-
24
- #### Step 2: Connect to Instance
25
- ```bash
26
- ssh -i your-key.pem ubuntu@your-ec2-public-ip
27
- ```
28
-
29
- #### Step 3: Install Docker
30
- ```bash
31
- # Update system
32
- sudo apt update && sudo apt upgrade -y
33
-
34
- # Install Docker
35
- curl -fsSL https://get.docker.com -o get-docker.sh
36
- sudo sh get-docker.sh
37
- sudo usermod -aG docker ubuntu
38
-
39
- # Install Docker Compose
40
- sudo apt install docker-compose-plugin
41
- ```
42
-
43
- #### Step 4: Clone Repository
44
- ```bash
45
- git clone https://github.com/YuvrajSinghBhadoria2/Enterprise-RAG-System.git
46
- cd Enterprise-RAG-System
47
- ```
48
-
49
- #### Step 5: Configure Environment
50
- ```bash
51
- # Create .env file
52
- cat > .env << EOF
53
- GROQ_API_KEY=your_groq_api_key_here
54
- EOF
55
- ```
56
-
57
- #### Step 6: Build and Run
58
- ```bash
59
- # Using Docker Compose
60
- docker compose -f docker/docker-compose.yml up -d --build
61
-
62
- # Generate data (one-time)
63
- docker compose -f docker/docker-compose.yml exec api python3 tools/generate-dataset.py
64
- docker compose -f docker/docker-compose.yml exec api python3 src/ingestion/ingest.py
65
- ```
66
-
67
- #### Step 7: Access Application
68
- - **UI**: `http://your-ec2-public-ip:8501`
69
- - **API**: `http://your-ec2-public-ip:8000/docs`
70
-
71
- ---
72
-
73
- ### Option 2: AWS ECS (Fargate) - Serverless
74
-
75
- #### Step 1: Push Docker Image to ECR
76
- ```bash
77
- # Create ECR repository
78
- aws ecr create-repository --repository-name enterprise-rag
79
-
80
- # Login to ECR
81
- aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin YOUR_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com
82
-
83
- # Build and push
84
- docker build -f docker/Dockerfile.api -t enterprise-rag .
85
- docker tag enterprise-rag:latest YOUR_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/enterprise-rag:latest
86
- docker push YOUR_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/enterprise-rag:latest
87
- ```
88
-
89
- #### Step 2: Create ECS Task Definition
90
- 1. Go to ECS Console
91
- 2. Create new Task Definition (Fargate)
92
- 3. Add container:
93
- - Image: Your ECR image URI
94
- - Memory: 4GB
95
- - Port: 8501
96
- 4. Add environment variable: `GROQ_API_KEY`
97
-
98
- #### Step 3: Create ECS Service
99
- 1. Create ECS Cluster
100
- 2. Create Service from Task Definition
101
- 3. Configure Load Balancer (optional)
102
-
103
- ---
104
-
105
- ### Option 3: AWS Lightsail (Simplest)
106
-
107
- #### Step 1: Create Lightsail Instance
108
- 1. Go to Lightsail Console
109
- 2. Create Instance:
110
- - Platform: Linux/Unix
111
- - Blueprint: Ubuntu 22.04
112
- - Plan: $10/month (2GB RAM)
113
-
114
- #### Step 2: Deploy
115
- Same as EC2 steps 2-7 above
116
-
117
- ---
118
-
119
- ## Cost Estimates
120
-
121
- | Service | Cost/Month | Best For |
122
- |---------|-----------|----------|
123
- | EC2 t3.medium | ~$30 | Full control, testing |
124
- | ECS Fargate | ~$40 | Production, auto-scaling |
125
- | Lightsail | $10-20 | Simple deployment |
126
-
127
- ## Recommended: EC2 t3.medium
128
-
129
- For your use case, I recommend **EC2 t3.medium** because:
130
- - ✅ Full control
131
- - ✅ Easy to manage
132
- - ✅ Cost-effective
133
- - ✅ Can run Docker Compose easily
134
-
135
- ## Maintenance
136
-
137
- **Update code:**
138
- ```bash
139
- cd Enterprise-RAG-System
140
- git pull
141
- docker compose -f docker/docker-compose.yml up -d --build
142
- ```
143
-
144
- **View logs:**
145
- ```bash
146
- docker compose -f docker/docker-compose.yml logs -f
147
- ```
148
-
149
- **Restart services:**
150
- ```bash
151
- docker compose -f docker/docker-compose.yml restart
152
- ```