Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Global toggles
NODE_ENV=production
LOG_LEVEL=info

# Healthcheck (override per service if needed)
HEALTHCHECK_CMD=curl -fsS http://localhost:${BACKEND_PORT:-8000}/health || exit 1

# Ports you can customize
ADMIN_PORT=8888
BACKEND_PORT=8000
EXPLAIN_PORT=8101
FAIRNESS_PORT=8102
FILE_STORAGE_PORT=9000
LLM_BENCH_PORT=8200
LLM_EXPLAIN_PORT=8201
MFE_PORT=3333
MODEL_DETAIL_PORT=8300
MODERATION_LAYER_PORT=8400
MODERATION_MODEL_PORT=8401
PRIVACY_PORT=8500
REPORTING_PORT=8600
SECURITY_PORT=8700
SHELL_PORT=8800

# Service-to-service URLs (internal DNS via compose service names)
BACKEND_URL=http://responsible-ai-backend:8000
FILE_STORAGE_URL=http://responsible-ai-file-storage:9000
EXPLAIN_URL=http://responsible-ai-explain:8101
FAIRNESS_URL=http://responsible-ai-fairness:8102
LLM_BENCH_URL=http://responsible-ai-llm-benchmarking:8200
LLM_EXPLAIN_URL=http://responsible-ai-llm-explain:8201
MODEL_DETAIL_URL=http://responsible-ai-model-detail:8300
MODERATION_LAYER_URL=http://responsible-ai-moderationlayer:8400
MODERATION_MODEL_URL=http://responsible-ai-moderationmodel:8401
PRIVACY_URL=http://responsible-ai-privacy:8500
REPORTING_URL=http://responsible-ai-reporting-tool:8600
SECURITY_URL=http://responsible-ai-security:8700
SHELL_URL=http://responsible-ai-shell:8800

# Example credentials/secrets (replace in your environment or use Docker secrets)
# DB_HOST=db
# DB_PORT=5432
# DB_USER=rai
# DB_PASSWORD=supersecret
# DB_NAME=rai

# Any provider/API keys you need
# OPENAI_API_KEY=...
# ANTHROPIC_API_KEY=...
# AWS_REGION=ap-northeast-1
180 changes: 180 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: CI/CD Pipeline

on:
push:
branches:
- main
- "fix/docker"

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
if: ${{ env.ACT != 'true' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push backend
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-backend
dockerfile: backend-rai/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-backend:latest

- name: Build and push admin
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-admin
dockerfile: responsible-ai-admin/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-admin:latest

- name: Build and push explain
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-explain
dockerfile: responsible-ai-explain/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-explain:latest

- name: Build and push fairness
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-fairness
dockerfile: responsible-ai-fairness/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-fairness:latest

- name: Build and push file-storage
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-file-storage
dockerfile: Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-file-storage:latest

- name: Build and push llm-benchmarking
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-llm-benchmarking
dockerfile: responsible-ai-benchmarking/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-llm-benchmarking:latest

- name: Build and push llm-explain
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-llm-explain
dockerfile: responsible-ai-llm-explain/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-llm-explain:latest

- name: Build and push mfe
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-mfe
dockerfile: Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-mfe:latest

- name: Build and push model-detail
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-model-detail
dockerfile: workbench/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-model-detail:latest

- name: Build and push moderation-layer
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-moderationlayer
dockerfile: Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-moderationlayer:latest

- name: Build and push moderation-model
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-moderationmodel
dockerfile: Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-moderationmodel:latest

- name: Build and push privacy
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-privacy
dockerfile: responsible-ai-privacy/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-privacy:latest

- name: Build and push reporting-tool
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-reporting-tool
dockerfile: wrapper/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-reporting-tool:latest

- name: Build and push security
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-security
dockerfile: wrapper/Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-security:latest

- name: Build and push shell
uses: docker/build-push-action@v4
with:
context: ./responsible-ai-shell
dockerfile: Dockerfile
push: ${{ env.ACT != 'true' }}
tags: ${{ secrets.DOCKER_USERNAME }}/responsible-ai-shell:latest

deploy:
if: ${{ env.ACT != 'true' }}
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Kubernetes context
uses: azure/k8s-set-context@v3
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}

- name: Deploy to Kubernetes
run: |
kubectl apply -f kubernetes/database/mongo-config.yml
kubectl apply -f kubernetes/database/mongo-secret.yml
kubectl apply -f kubernetes/database/mongo.yml
kubectl apply -f kubernetes/backend-deployment.yml
kubectl apply -f kubernetes/backend-service.yml
kubectl apply -f kubernetes/admin.yml
kubectl apply -f kubernetes/explain.yml
kubectl apply -f kubernetes/fairness.yml
kubectl apply -f kubernetes/file-storage.yml
kubectl apply -f kubernetes/llm-benchmarking.yml
kubectl apply -f kubernetes/llm-explain.yml
kubectl apply -f kubernetes/mfe.yml
kubectl apply -f kubernetes/model-detail.yml
kubectl apply -f kubernetes/moderation-layer.yml
kubectl apply -f kubernetes/moderation-model.yml
kubectl apply -f kubernetes/privacy.yml
kubectl apply -f kubernetes/reporting-tool.yml
kubectl apply -f kubernetes/security.yml
kubectl apply -f kubernetes/shell.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
webServerApiSettings.json
4 changes: 4 additions & 0 deletions devenv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

```batch
docker run -P -t -i mcr.microsoft.com/cosmosdb/windows/azure-cosmos-emulator
```
24 changes: 24 additions & 0 deletions docker-compose.cosmos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
cosmosdb:
container_name: cosmosdb-emulator
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
tty: true
stdin_open: true
restart: always
mem_limit: 2g
cpu_count: 2
environment:
AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 10
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: "true"
ports:
- "8081:8081" # Data Explorer / REST API
- "8900:8900"
- "8901:8901"
- "8979:8979"
- "10250-10255:10250-10255"
- "10350:10350"
volumes:
- cosmosdb-data:/tmp/cosmos

volumes:
cosmosdb-data:
Loading