Skip to content

Commit 013323e

Browse files
committed
Inital commit
1 parent 37d4b6b commit 013323e

File tree

12 files changed

+1812
-1
lines changed

12 files changed

+1812
-1
lines changed

.github/workflows/docs.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Deploy Documentation to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main, master, docs-inital-commit]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
pull_request:
10+
branches: [ main, master ]
11+
paths:
12+
- 'docs/**'
13+
- '.github/workflows/docs.yml'
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: '18'
39+
40+
- name: Install dependencies
41+
run: |
42+
npm install -g @antora/cli@3.1.1 @antora/site-generator-default@3.1.1
43+
npm install -g asciidoctor
44+
45+
- name: Build documentation
46+
run: |
47+
# Convert markdown files to asciidoc for better Antora support
48+
find docs -name "*.md" -exec sh -c '
49+
file="$1"
50+
dir=$(dirname "$file")
51+
base=$(basename "$file" .md)
52+
asciidoc_file="$dir/$base.adoc"
53+
54+
# Convert markdown to asciidoc
55+
pandoc "$file" -f markdown -t asciidoc -o "$asciidoc_file"
56+
57+
# Add front matter for Antora
58+
sed -i "1i\\:page-layout: article\\n:page-partial: true\\n" "$asciidoc_file"
59+
' _ {} \;
60+
61+
# Build the site using docs.yaml
62+
antora docs.yaml
63+
64+
- name: Upload artifact
65+
uses: actions/upload-pages-artifact@v3
66+
with:
67+
path: ./build/site
68+
69+
deploy:
70+
environment:
71+
name: github-pages
72+
url: ${{ steps.deployment.outputs.page_url }}
73+
runs-on: ubuntu-latest
74+
needs: build
75+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
76+
steps:
77+
- name: Deploy to GitHub Pages
78+
id: deployment
79+
uses: actions/deploy-pages@v4
File renamed without changes.

deployment/scripts/deploy-openshift.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ echo "📝 Next Steps:"
350350
echo "========================================="
351351
echo ""
352352
echo "1. Deploy a sample model:"
353-
echo " kustomize build deployment/samples/models/simulator | kubectl apply -f -"
353+
echo " kustomize build docs/samples/models/simulator | kubectl apply -f -"
354354
echo ""
355355
echo "2. Test the API:"
356356
echo " Access the MaaS API at: https://maas-api.$CLUSTER_DOMAIN"

docs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
site:
2+
title: MaaS Platform Documentation
3+
url: https://redhat-ai-ml.github.io/maas-billing
4+
start_page: README.adoc
5+
content:
6+
sources:
7+
- url: .
8+
branches: [main, master]
9+
start_path: docs
10+
edit_url: '{web_url}/edit/{refname}/{path}'
11+
ui:
12+
bundle:
13+
url: https://github.com/antora/antora-ui-default/archive/refs/heads/main.zip
14+
snapshot: true

docs/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# MaaS Platform Documentation
2+
3+
Welcome to the Model-as-a-Service (MaaS) Platform documentation. This platform provides a comprehensive solution for deploying and managing AI models with policy-based access control, rate limiting, and tier-based subscriptions.
4+
5+
## 📚 Documentation Overview
6+
7+
### 🚀 Getting Started
8+
9+
- **[Installation Guide](installation.md)** - Complete platform deployment instructions
10+
- **[Getting Started](getting-started.md)** - Quick start guide after installation
11+
12+
## Architecture and Components
13+
14+
- **[Architecture](architecture.md)** - Overview of the MaaS Platform architecture
15+
- **[Observability](observability.md)** - Overview of the MaaS Platform observability components
16+
17+
### ⚙️ Configuration & Management
18+
19+
- **[Gateway Setup](gateway-setup.md)** - Setting up authentication and rate limiting
20+
- **[Tier Management](tier-management.md)** - Configuring subscription tiers and access control
21+
- **[Model Access Guide](model-access.md)** - Managing model access and policies
22+
23+
### 🔧 Advanced Administration
24+
25+
- **[Observability](observability.md)** - Monitoring, metrics, and dashboards
26+
27+
28+
### 👥 End Users
29+
30+
- **[User Guide](user-guide.md)** - How end users interact with the platform
31+
32+
## 🚀 Quick Start for Administrators
33+
34+
### 📹 New to MaaS? Watch Our Installation Video
35+
36+
For a visual guide to getting started, check out our [Installation Video Walkthrough](installation.md#-video-walkthrough) that covers the complete deployment process.
37+
38+
### Administrator Getting Started Steps
39+
40+
1. **Deploy the platform**: Follow the [Installation Guide](installation.md) to set up MaaS in your cluster
41+
2. **Configure authentication**: Set up [Gateway authentication](gateway-setup.md) for your organization
42+
3. **Configure tiers**: Set up [Tier Management](tier-management.md) for access control
43+
4. **Test the deployment**: Follow [Getting Started](getting-started.md) to verify everything works
44+
45+
## 📋 Prerequisites for Administrators
46+
47+
- **OpenShift cluster** (4.19.9+) with kubectl/oc access
48+
- **ODH/RHOAI** with KServe enabled
49+
- **Cluster admin** permissions for initial setup
50+
- **Basic Kubernetes knowledge** for troubleshooting
51+
52+
## 🏗️ Platform Components
53+
54+
- **Gateway API**: Traffic routing and management
55+
- **Kuadrant/Authorino/Limitador**: Authentication, authorization, and rate limiting
56+
- **KServe**: Model serving platform
57+
- **MaaS API**: Token management and tier resolution
58+
- **React Frontend**: Web-based management interface
59+
60+
## 👥 For End Users
61+
62+
If you're an end user looking to use AI models through the MaaS platform, your administrator should provide you with:
63+
64+
- **Access credentials** (tokens or OAuth setup)
65+
- **Available models** and their capabilities
66+
- **Usage guidelines** and rate limits
67+
- **API endpoints** for model interaction
68+
69+
For detailed end-user documentation, see the [User Guide](user-guide.md) (coming soon).
70+
71+
## 📞 Support
72+
73+
For questions or issues:
74+
75+
- **Administrators**: Open an issue on GitHub or check the [Installation Guide](installation.md) for troubleshooting
76+
- **End Users**: Contact your platform administrator for access and usage questions
77+
- **General**: Review the [Samples](samples/) for examples
78+
79+
## 📝 License
80+
81+
This project is licensed under the Apache 2.0 License.

docs/architecture.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# MaaS Platform Architecture
2+
3+
## Overview
4+
5+
The MaaS Platform is designed as a cloud-native, Kubernetes-based solution that provides policy-based access control, rate limiting, and tier-based subscriptions for AI model serving. The architecture follows microservices principles and leverages OpenShift/Kubernetes native components for scalability and reliability.
6+
7+
## 🏗️ High-Level Architecture
8+
9+
```mermaid
10+
graph TB
11+
subgraph "Client Layer"
12+
WebUI[Web UI]
13+
API[API Clients]
14+
CLI[CLI Tools]
15+
end
16+
17+
subgraph "Gateway Layer"
18+
Gateway[Gateway API]
19+
Auth[Authentication]
20+
RateLimit[Rate Limiting]
21+
Policy[Policy Engine]
22+
end
23+
24+
subgraph "Service Layer"
25+
MaaSAPI[MaaS API]
26+
ModelService[Model Service]
27+
TokenService[Token Service]
28+
TierService[Tier Service]
29+
end
30+
31+
subgraph "Model Layer"
32+
KServe[KServe]
33+
Model1[Model 1]
34+
Model2[Model 2]
35+
ModelN[Model N]
36+
end
37+
38+
subgraph "Data Layer"
39+
ConfigMap[ConfigMaps]
40+
Secret[Secrets]
41+
PVC[Persistent Volumes]
42+
end
43+
44+
subgraph "Observability"
45+
Prometheus[Prometheus]
46+
Grafana[Grafana]
47+
Logs[Log Aggregation]
48+
end
49+
50+
WebUI --> Gateway
51+
API --> Gateway
52+
CLI --> Gateway
53+
54+
Gateway --> Auth
55+
Gateway --> RateLimit
56+
Gateway --> Policy
57+
58+
Gateway --> MaaSAPI
59+
MaaSAPI --> ModelService
60+
MaaSAPI --> TokenService
61+
MaaSAPI --> TierService
62+
63+
ModelService --> KServe
64+
KServe --> Model1
65+
KServe --> Model2
66+
KServe --> ModelN
67+
68+
MaaSAPI --> ConfigMap
69+
MaaSAPI --> Secret
70+
KServe --> PVC
71+
72+
MaaSAPI --> Prometheus
73+
Gateway --> Prometheus
74+
KServe --> Prometheus
75+
Prometheus --> Grafana
76+
Gateway --> Logs
77+
MaaSAPI --> Logs
78+
```
79+
80+
## 🔄 Request Flow
81+
82+
### 1. Authentication Flow
83+
84+
```mermaid
85+
sequenceDiagram
86+
participant Client
87+
participant Gateway
88+
participant Auth
89+
participant MaaSAPI
90+
participant Model
91+
92+
Client->>Gateway: Request with Token
93+
Gateway->>Auth: Validate Token
94+
Auth->>MaaSAPI: Check Token Validity
95+
MaaSAPI-->>Auth: Token Status + Tier Info
96+
Auth-->>Gateway: Authentication Result
97+
Gateway->>Model: Forward Request (if valid)
98+
Model-->>Gateway: Response
99+
Gateway-->>Client: Response
100+
```
101+
102+
### 2. Model Inference Flow
103+
104+
```mermaid
105+
sequenceDiagram
106+
participant Client
107+
participant Gateway
108+
participant MaaSAPI
109+
participant KServe
110+
participant Model
111+
112+
Client->>Gateway: POST /v1/models/{model}/infer
113+
Gateway->>MaaSAPI: Validate Request
114+
MaaSAPI-->>Gateway: Tier + Rate Limit Check
115+
Gateway->>KServe: Forward to Model
116+
KServe->>Model: Process Inference
117+
Model-->>KServe: Inference Result
118+
KServe-->>Gateway: Response
119+
Gateway-->>Client: Response
120+
```
121+
122+
## Core Components
123+
124+
### Gateway Layer
125+
126+
The gateway layer handles all incoming requests and implements security policies:
127+
128+
- **Gateway API**: Routes requests to appropriate services
129+
- **Kuadrant**: Policy Attachment Point for authentication and authorization
130+
- **Authorino**: Authentication and authorization service
131+
- **Limitador**: Token and Request Rate limiting service
132+
133+
### Management Layer
134+
135+
The management layer contains the core business logic:
136+
137+
- **MaaS API**: Central service for token and tier management
138+
139+
### Model Layer
140+
141+
The model layer provides AI model serving capabilities:
142+
143+
- **KServe**: Model serving platform
144+
- **Model Instances**: Individual AI models (LLMs, etc.)
145+
- **Scaling**: Automatic scaling based on demand
146+
147+
## Flows
148+
149+
### 1. Token Request Flow
150+
151+
<TBD>
152+
153+
### 2. Model Inference Flow
154+
155+
<TBD>

0 commit comments

Comments
 (0)