Update README.md

This commit is contained in:
VithobaaSrinivasakumar 2026-06-30 07:26:45 +00:00
parent 263f47e3d6
commit 76c6d021ab
1 changed files with 145 additions and 137 deletions

282
README.md
View File

@ -1,137 +1,145 @@
# AutoPilot — Distributed Web Test Automation Platform # AutoPilot — Distributed Web Test Automation Platform
AutoPilot is a full-stack, enterprise-grade distributed web browser automation platform. It consists of three components deployed together as a monorepo. AutoPilot is a full-stack, enterprise-grade distributed web browser automation platform. It consists of three components deployed together as a monorepo.
``` ```
autopilot/ autopilot/
├── master/ # Cloud Coordinator — Spring Boot REST API + Scheduler + DB ├── master/ # Cloud Coordinator — Spring Boot REST API + Scheduler + DB
├── worker/ # Execution Engine — Selenium WebDriver agent (polls master) ├── worker/ # Execution Engine — Selenium WebDriver agent (polls master)
├── ui/ # Dashboard — React + Vite frontend (served via Nginx) ├── ui/ # Dashboard — React + Vite frontend (served via Nginx)
├── docker-compose.yml # Production: full stack with PostgreSQL ├── docker-compose.yml # Production: full stack with PostgreSQL
├── docker-compose.local.yml # Local dev: DB only (run services manually) ├── docker-compose.local.yml # Local dev: DB only (run services manually)
└── .env.example # Template for environment variables └── .env.example # Template for environment variables
``` ```
--- ---
## 🚀 Production Deployment (AWS / Any Linux Server) ## 🚀 Production Deployment (AWS / Any Linux Server)
### Prerequisites ### Prerequisites
- Docker & Docker Compose installed - Docker & Docker Compose installed
- At least 2 CPU cores and 2GB RAM - At least 2 CPU cores and 2GB RAM
### 1. Clone the repository ### 1. Clone the repository
```bash ```bash
git clone https://repo.qruize.com/VithobaaSrinivasakumar/Autopilot.git git clone https://repo.qruize.com/VithobaaSrinivasakumar/Autopilot.git
cd Autopilot cd Autopilot
``` ```
### 2. Configure environment variables ### 2. Configure environment variables
```bash ```bash
cp .env.example .env cp .env.example .env
nano .env # Fill in DB_PASS, JWT_SECRET, AWS keys, etc. nano .env # Fill in DB_PASS, JWT_SECRET, AWS keys, etc.
``` ```
### 3. Deploy the full stack ### 3. Deploy the full stack
```bash ```bash
docker-compose up -d --build docker-compose up -d --build
``` ```
This starts: This starts:
- **PostgreSQL** (database, internal only) - **PostgreSQL** (database, internal only)
- **AutoPilot Master** on port `9090` - **AutoPilot Master** on port `9090`
- **AutoPilot UI** on port `80` (Nginx) - **AutoPilot UI** on port `80` (Nginx)
### 4. Verify deployment ### 4. Verify deployment
```bash ```bash
docker-compose ps docker-compose ps
curl http://localhost:9090/api/health curl http://localhost:9090/api/health
``` ```
### 5. Updating to a new version ### 5. Updating to a new version
```bash ```bash
git pull origin main git pull origin main
docker-compose up -d --build docker-compose up -d --build
``` ```
To connect to aws Server
--- Install mobax or ssh terminal application
create session with this ip address 13.232.42.59
## 🏗️ Local Development (No Docker for Services) give private key named mesibo (ask dhakshan).i cant give key here in this repo.
### 1. Start only the database go to cd /home/ubuntu/Autopilot
```bash give docker ps -a (To check if the containers are running well)
docker-compose -f docker-compose.local.yml up -d then go to http://13.232.42.59
``` that its.
---
### 2. Start the Master (Terminal 1)
```bash ## 🏗️ Local Development (No Docker for Services)
cd master
./mvnw spring-boot:run ### 1. Start only the database
# Runs on http://localhost:9090 ```bash
``` docker-compose -f docker-compose.local.yml up -d
```
### 3. Start the UI (Terminal 2)
```bash ### 2. Start the Master (Terminal 1)
cd ui ```bash
npm install cd master
npm run dev ./mvnw spring-boot:run
# Runs on http://localhost:5173 # Runs on http://localhost:9090
``` ```
### 4. Start the Worker (Terminal 3) ### 3. Start the UI (Terminal 2)
```bash ```bash
cd worker cd ui
./mvnw spring-boot:run npm install
# Polls http://localhost:9090 for jobs npm run dev
``` # Runs on http://localhost:5173
```
---
### 4. Start the Worker (Terminal 3)
## 🔗 CI/CD Integration ```bash
cd worker
AutoPilot can be triggered directly from your DevOps pipeline using an API key. ./mvnw spring-boot:run
# Polls http://localhost:9090 for jobs
### Trigger a test suite ```
```bash
curl -X POST \ ---
-H "Authorization: Bearer ap_live_your_api_key" \
-H "Content-Type: application/json" \ ## 🔗 CI/CD Integration
-d '{"suiteName": "Smoke Tests", "browser": "chrome"}' \
https://your-domain.com/api/v1/suites/trigger-by-name AutoPilot can be triggered directly from your DevOps pipeline using an API key.
```
### Trigger a test suite
### Poll for results ```bash
```bash curl -X POST \
curl -H "Authorization: Bearer ap_live_your_api_key" \ -H "Authorization: Bearer ap_live_your_api_key" \
https://your-domain.com/api/v1/schedulers/{schedulerId}/execution-status -H "Content-Type: application/json" \
# exitCode: 0 = all passed, 1 = failures, 2 = still running -d '{"suiteName": "Smoke Tests", "browser": "chrome"}' \
``` https://your-domain.com/api/v1/suites/trigger-by-name
```
For full GitHub Actions, GitLab CI, and Jenkins snippets, see the **CI/CD Integration** page inside the dashboard.
### Poll for results
--- ```bash
curl -H "Authorization: Bearer ap_live_your_api_key" \
## 🌐 Environment Variables Reference https://your-domain.com/api/v1/schedulers/{schedulerId}/execution-status
# exitCode: 0 = all passed, 1 = failures, 2 = still running
| Variable | Description | Required | ```
|---|---|---|
| `DB_URL` | JDBC connection string to PostgreSQL | ✅ | For full GitHub Actions, GitLab CI, and Jenkins snippets, see the **CI/CD Integration** page inside the dashboard.
| `DB_USER` | Database username | ✅ |
| `DB_PASS` | Database password | ✅ | ---
| `JWT_SECRET` | Minimum 256-bit secret for signing tokens | ✅ |
| `AWS_REGION` | AWS region for S3 screenshot storage | Optional | ## 🌐 Environment Variables Reference
| `AWS_ACCESS_KEY_ID` | AWS access key | Optional |
| `AWS_SECRET_ACCESS_KEY` | AWS secret key | Optional | | Variable | Description | Required |
| `S3_BUCKET_NAME` | S3 bucket for storing screenshots | Optional | |---|---|---|
| `LOCALAGENT_CLOUD_URL` | URL the Worker uses to reach the Master | Worker only | | `DB_URL` | JDBC connection string to PostgreSQL | ✅ |
| `DB_USER` | Database username | ✅ |
--- | `DB_PASS` | Database password | ✅ |
| `JWT_SECRET` | Minimum 256-bit secret for signing tokens | ✅ |
## 📖 API Reference | `AWS_REGION` | AWS region for S3 screenshot storage | Optional |
| `AWS_ACCESS_KEY_ID` | AWS access key | Optional |
| Method | Endpoint | Description | | `AWS_SECRET_ACCESS_KEY` | AWS secret key | Optional |
|---|---|---| | `S3_BUCKET_NAME` | S3 bucket for storing screenshots | Optional |
| `POST` | `/api/v1/suites/{id}/trigger` | Trigger suite by ID | | `LOCALAGENT_CLOUD_URL` | URL the Worker uses to reach the Master | Worker only |
| `POST` | `/api/v1/suites/trigger-by-name` | Trigger suite by name |
| `GET` | `/api/v1/schedulers/{id}/execution-status` | Poll execution result | ---
| `GET` | `/api/v1/executions/{id}/status` | Get execution detail |
## 📖 API Reference
| Method | Endpoint | Description |
|---|---|---|
| `POST` | `/api/v1/suites/{id}/trigger` | Trigger suite by ID |
| `POST` | `/api/v1/suites/trigger-by-name` | Trigger suite by name |
| `GET` | `/api/v1/schedulers/{id}/execution-status` | Poll execution result |
| `GET` | `/api/v1/executions/{id}/status` | Get execution detail |