Skip to content

Commit b76eb54

Browse files
authored
Merge pull request #11 from VectorInstitute/add_docs
Add docs using mkdocs
2 parents 681de0f + 92fd1d5 commit b76eb54

File tree

15 files changed

+2428
-750
lines changed

15 files changed

+2428
-750
lines changed

.github/workflows/code_checks.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: code checks
2+
permissions:
3+
contents: read
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .pre-commit-config.yaml
12+
- .github/workflows/code_checks.yml
13+
- '**.py'
14+
- uv.lock
15+
- pyproject.toml
16+
- '**.ipynb'
17+
pull_request:
18+
branches:
19+
- main
20+
paths:
21+
- .pre-commit-config.yaml
22+
- .github/workflows/code_checks.yml
23+
- '**.py'
24+
- uv.lock
25+
- pyproject.toml
26+
- '**.ipynb'
27+
28+
jobs:
29+
run-code-check:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/[email protected]
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4
36+
with:
37+
# Install a specific version of uv.
38+
version: "0.9.7"
39+
enable-cache: true
40+
41+
- name: "Set up Python"
42+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
43+
with:
44+
python-version-file: ".python-version"
45+
46+
- name: Install the project
47+
run: uv sync --all-extras --dev
48+
49+
- name: Install dependencies and check code
50+
run: |
51+
source .venv/bin/activate
52+
pre-commit run --all-files
53+
54+
- name: pip-audit (gh-action-pip-audit)
55+
uses: pypa/[email protected]
56+
with:
57+
virtual-environment: .venv/
58+
ignore-vulns: |
59+
GHSA-4xh5-x5gv-qwph

.github/workflows/docs.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: docs
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .pre-commit-config.yaml
12+
- .github/workflows/docs.yml
13+
- '**.py'
14+
- '**.ipynb'
15+
- '**.html'
16+
- '**.js'
17+
- '**.md'
18+
- uv.lock
19+
- pyproject.toml
20+
- mkdocs.yml
21+
- '**.png'
22+
- '**.svg'
23+
pull_request:
24+
branches:
25+
- main
26+
paths:
27+
- .pre-commit-config.yaml
28+
- .github/workflows/docs.yml
29+
- '**.py'
30+
- '**.ipynb'
31+
- '**.js'
32+
- '**.html'
33+
- uv.lock
34+
- pyproject.toml
35+
- '**.md'
36+
- mkdocs.yml
37+
- '**.png'
38+
- '**.svg'
39+
40+
jobs:
41+
build:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout code
45+
uses: actions/[email protected]
46+
47+
- name: Install uv
48+
uses: astral-sh/[email protected]
49+
with:
50+
version: "0.9.7"
51+
enable-cache: true
52+
53+
- name: Set up Python
54+
uses: actions/setup-python@v6
55+
with:
56+
python-version-file: ".python-version"
57+
58+
- name: Install the project
59+
run: uv sync --all-extras --group docs
60+
61+
- name: Build docs
62+
run: uv run mkdocs build
63+
64+
- name: Create .nojekyll file
65+
run: touch site/.nojekyll
66+
67+
- name: Upload artifact
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: docs-site
71+
path: site/
72+
retention-days: 1
73+
74+
deploy:
75+
needs: build
76+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Checkout code
80+
uses: actions/[email protected]
81+
82+
- name: Configure Git Credentials
83+
run: |
84+
git config user.name github-actions[bot]
85+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
86+
87+
- name: Download artifact
88+
uses: actions/download-artifact@v5
89+
with:
90+
name: docs-site
91+
path: site
92+
93+
- name: Ensure .nojekyll exists
94+
run: touch site/.nojekyll
95+
96+
- name: Deploy to Github pages
97+
uses: JamesIves/[email protected]
98+
with:
99+
branch: gh-pages
100+
folder: site

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
- id: uv-lock
2626

2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: 'v0.13.3'
28+
rev: 'v0.14.3'
2929
hooks:
3030
- id: ruff-check
3131
args: [--fix, --exit-non-zero-on-fix]

README.md

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,89 @@
11
# AI Engineering Platform
22

3+
Infrastructure and tooling for AI Engineering bootcamps, providing secure, isolated development environments and automated participant onboarding.
4+
5+
## Overview
6+
7+
This platform consists of two main components:
8+
9+
1. **Coder Deployment** - Containerized development environments on GCP
10+
2. **Participant Onboarding System** - Secure, automated participant onboarding
11+
12+
---
13+
314
## 1. Coder Deployment for GCP
415

5-
The folder `coder` contains all resources needed to deploy a [Coder](https://coder.com) instance on Google Cloud Platform (GCP), along with reusable workspace templates and Docker images for the workspace environment.
16+
The `coder` folder contains all resources needed to deploy a [Coder](https://coder.com) instance on Google Cloud Platform (GCP), along with reusable workspace templates and Docker images for the workspace environment.
617

718
### Structure
819

9-
- **deploy/**
10-
Terraform scripts and startup automation for provisioning the Coder server on a GCP VM.
20+
- **deploy/** - Terraform scripts and startup automation for provisioning the Coder server on a GCP VM
21+
- **docker/** - Dockerfiles and guides for building custom images used by Coder workspace templates
22+
- **templates/** - Coder workspace templates for reproducible, containerized development environments on GCP
23+
24+
### Usage
25+
26+
1. **Provision Coder on GCP** - Follow the steps in [`coder/deploy/README.md`](coder/deploy/README.md)
27+
2. **Build and Push Docker Images** - See [`coder/docker/README.md`](coder/docker/README.md)
28+
3. **Push Workspace Templates** - See [`coder/templates/README.md`](coder/templates/README.md)
29+
30+
---
31+
32+
## 2. Participant Onboarding System
33+
34+
Automated system for securely distributing team-specific API keys to bootcamp participants using Firebase Authentication and Firestore.
35+
36+
### Features
37+
38+
**Secure Authentication** - Firebase custom tokens with per-participant access
39+
**Team Isolation** - Firestore security rules enforce team-level data separation
40+
**Automated Onboarding** - One-command setup for participants
41+
**API Key Management** - Automated generation and distribution of:
42+
43+
### Architecture
44+
45+
```
46+
┌─────────────────────────────────────────────────────────────────┐
47+
│ Admin Phase │
48+
├─────────────────────────────────────────────────────────────────┤
49+
│ 1. Setup participants and teams in Firestore │
50+
│ 2. Generate team-specific API keys │
51+
│ 3. Setup shared keys │
52+
│ 4. Generate Firebase authentication tokens │
53+
│ 5. Deploy Firestore security rules │
54+
└─────────────────────────────────────────────────────────────────┘
55+
56+
┌─────────────────────────────────────────────────────────────────┐
57+
│ Participant Phase │
58+
├─────────────────────────────────────────────────────────────────┤
59+
│ 1. Run onboarding script in Coder workspace │
60+
│ 2. Script authenticates using Firebase custom token │
61+
│ 3. Fetch team-specific API keys (security rules enforced) │
62+
│ 4. Create .env file with all credentials │
63+
│ 5. Run integration tests to verify keys │
64+
└─────────────────────────────────────────────────────────────────┘
65+
```
66+
67+
## Requirements
1168

12-
- **docker/**
13-
Dockerfiles and guides for building custom images used by Coder workspace templates.
69+
- Python 3.12+
70+
- `uv` package manager
71+
- GCP project with Firestore and Secret Manager enabled
72+
- Firebase project with Authentication enabled
73+
- Appropriate GCP permissions (see admin guide)
1474

15-
- **templates/**
16-
Coder workspace templates for reproducible, containerized development environments on GCP.
75+
## Installation
1776

18-
## Usage
77+
```bash
78+
# Clone repository
79+
git clone <repository-url>
80+
cd aieng-platform
1981

20-
1. **Provision Coder on GCP**
21-
Follow the steps in [`deploy/README.md`](coder/deploy/README.md) to set up your GCP environment and deploy the Coder server using Terraform.
82+
# Install dependencies
83+
uv sync
2284

23-
2. **Build and Push Docker Images**
24-
Use [`docker/README.md`](coder/docker/README.md) to build and upload Docker images required by your templates.
85+
# Authenticate with GCP
86+
gcloud auth application-default login
87+
```
2588

26-
3. **Push Workspace Templates**
27-
See [`templates/README.md`](coder/templates/README.md) for instructions on uploading workspace templates to your Coder instance.
89+
---

docs/assets/favicon-48x48.svg

Lines changed: 9 additions & 0 deletions
Loading

docs/assets/favicon.ico

14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)