SIENTIAPDE-1255: Add port forwarding setup script and documentation to README.md
This commit is contained in:
88
README.md
88
README.md
@@ -24,6 +24,7 @@ A comprehensive AI model management platform for the complete machine learning l
|
||||
- [Environment Setup](#environment-setup)
|
||||
- [Temporal Namespace Setup](#temporal-namespace-setup)
|
||||
- [Local Development Setup](#local-development-setup)
|
||||
- [Port Forward Setup Script](#port-forward-setup-script)
|
||||
- [How to Run](#how-to-run)
|
||||
- [Running the Model Manager Application](#running-the-model-manager-application)
|
||||
- [Running Tests and Coverage](#running-tests-and-coverage)
|
||||
@@ -708,17 +709,82 @@ kubectl exec -n temporal <temporal-admin-tools-pod-name> -- \
|
||||
|
||||
5. **Configure external dependencies**
|
||||
|
||||
You'll need to set up port forwarding or connections to external services. For example:
|
||||
|
||||
```bash
|
||||
# Port forwarding from Kubernetes cluster
|
||||
kubectl port-forward svc/postgresql 5432:5432
|
||||
kubectl port-forward svc/mlflow 5000:5000
|
||||
kubectl port-forward svc/mongodb 27017:27017
|
||||
|
||||
# Or connect to external services
|
||||
# Ensure services are accessible on localhost with appropriate ports
|
||||
```
|
||||
The Model Manager requires connections to several external services. For local development, you can use the provided port-forward script to establish connections to services running in your Kubernetes cluster.
|
||||
|
||||
#### Port Forward Setup Script
|
||||
|
||||
The `setup_port_forwards.sh` script automates the creation of port forwards to all required services:
|
||||
|
||||
**Features:**
|
||||
- 🔄 **Automatic Cleanup**: Kills existing port-forward jobs for the same services
|
||||
- ✅ **Port Validation**: Checks if ports are available before creating forwards
|
||||
- 🛡️ **Safe Execution**: Stops if any port is already in use by another process
|
||||
- 📊 **Clear Output**: Color-coded status messages and service information
|
||||
|
||||
**Usage:**
|
||||
|
||||
```bash
|
||||
# Make script executable (first time only)
|
||||
chmod +x setup_port_forwards.sh
|
||||
|
||||
# Run the script
|
||||
./setup_port_forwards.sh
|
||||
```
|
||||
|
||||
**Services and Ports:**
|
||||
|
||||
| Local Port | Service | Description | Namespace |
|
||||
|------------|---------|-------------|-----------|
|
||||
| `5432` | `paradedb-rw` | PostgreSQL Database | `paradedb` |
|
||||
| `45249` | `sientia-tracker-mlflow-tracking` | MLflow Tracking Server | `sientia-tracker` |
|
||||
| `37463` | `temporal-frontend` | Temporal gRPC API | `temporal` |
|
||||
| `8080` | `temporal-web` | Temporal Web UI | `temporal` |
|
||||
| `42297` | `my-release-mongodb` | MongoDB Database | `mongodb` |
|
||||
| `36577` | `minio` | MinIO Object Storage | `minio` |
|
||||
|
||||
**Managing Port Forwards:**
|
||||
|
||||
```bash
|
||||
# View active port forwards
|
||||
jobs -l
|
||||
|
||||
# Stop all port forwards
|
||||
jobs -p | xargs kill
|
||||
|
||||
# Stop and restart (using the script)
|
||||
./setup_port_forwards.sh
|
||||
```
|
||||
|
||||
**Troubleshooting:**
|
||||
|
||||
If you encounter port conflicts:
|
||||
1. The script will show which ports are in use
|
||||
2. Stop the conflicting process or use the script to kill existing port-forwards
|
||||
3. Run the script again
|
||||
|
||||
**Manual Port Forwarding:**
|
||||
|
||||
If you prefer manual control or need different ports:
|
||||
|
||||
```bash
|
||||
# PostgreSQL
|
||||
kubectl -n paradedb port-forward svc/paradedb-rw 5432:5432 &
|
||||
|
||||
# MLflow
|
||||
kubectl -n sientia-tracker port-forward svc/sientia-tracker-mlflow-tracking 45249:80 &
|
||||
|
||||
# Temporal
|
||||
kubectl -n temporal port-forward svc/temporal-frontend 37463:7233 &
|
||||
|
||||
# Temporal UI
|
||||
kubectl -n temporal port-forward svc/temporal-web 8080:8080 &
|
||||
|
||||
# MongoDB
|
||||
kubectl -n mongodb port-forward svc/my-release-mongodb 42297:27017 &
|
||||
|
||||
# MinIO
|
||||
kubectl -n minio port-forward svc/minio 36577:9000 &
|
||||
```
|
||||
|
||||
## How to Run
|
||||
|
||||
|
||||
Reference in New Issue
Block a user