Skip to content
Merged

Ssr #277

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
b99f4a4
migrating cookies to ssr
thorrester Oct 9, 2025
14eb57f
lots of refactoring
thorrester Oct 9, 2025
26d72e4
home page auth working
thorrester Oct 9, 2025
39cd250
moving around
thorrester Oct 9, 2025
a5e7f32
clients are only called on server
thorrester Oct 9, 2025
470fab0
Update validateToken.ts
thorrester Oct 9, 2025
4b71aed
update routes
thorrester Oct 10, 2025
88ce98f
logout flow
thorrester Oct 10, 2025
f2444b2
fix profile route
thorrester Oct 10, 2025
9e29a55
routes for registration and resetting
thorrester Oct 10, 2025
2c99d29
Update CodeBlock.svelte
thorrester Oct 10, 2025
99de900
validating okta
thorrester Oct 10, 2025
ceae5f2
sso user auth
thorrester Oct 10, 2025
59ed452
enforce global fetch
thorrester Oct 10, 2025
c01048a
refactor model card search
thorrester Oct 10, 2025
e3759a1
data card page
thorrester Oct 10, 2025
6e49cea
refactor service CardSearch
thorrester Oct 10, 2025
9c1f6b0
refactor experiment CardSearch
thorrester Oct 10, 2025
f5351d7
prompt cardsearch refactor
thorrester Oct 12, 2025
66bf794
mcp cardsearch refactor
thorrester Oct 12, 2025
58616b4
update uid routes
thorrester Oct 12, 2025
d310bf1
refactor card server.ts
thorrester Oct 12, 2025
dadc203
refactor link
thorrester Oct 13, 2025
1d94a5b
refactor files
thorrester Oct 13, 2025
8558493
versions
thorrester Oct 13, 2025
477c361
Update VersionPage.svelte
thorrester Oct 13, 2025
cf79108
mackign monitoring mocks
thorrester Oct 13, 2025
a8581a1
update main monitoring page
thorrester Oct 13, 2025
6fe88f5
unused imports in header
thorrester Oct 13, 2025
9e0a610
refactoring for client
thorrester Oct 13, 2025
af73fe2
dorpdowns
thorrester Oct 13, 2025
745b986
chartjs
thorrester Oct 13, 2025
4d71b0e
layout fixes
thorrester Oct 13, 2025
2ca3d07
Header font
thorrester Oct 13, 2025
cdb995a
updating llm mocks
thorrester Oct 14, 2025
40bf0d4
getting llm records
thorrester Oct 14, 2025
90a0adb
genai pages
thorrester Oct 14, 2025
0da4e4c
refactoring to dynamic route
thorrester Oct 14, 2025
d56763f
add profile
thorrester Oct 14, 2025
6ca5443
adding experiment routes
thorrester Oct 14, 2025
58f7f78
adding figures
thorrester Oct 14, 2025
5d6cdf3
creating readme generator
thorrester Oct 14, 2025
cd19c86
update monitoring and profiels
thorrester Oct 15, 2025
55df913
fix coloring and remove experiment
thorrester Oct 15, 2025
eb76963
refactor experiment metric page
thorrester Oct 15, 2025
ec8df37
hardware refactor
thorrester Oct 15, 2025
2b53951
resize hardware metric page
thorrester Oct 15, 2025
0ad2a29
wrong type
thorrester Oct 15, 2025
472bc82
migrate to comboboxes
thorrester Oct 15, 2025
1c1d075
update service page
thorrester Oct 15, 2025
c9fcb95
Update DataCardLayout.svelte
thorrester Oct 15, 2025
1f2fcb6
types
thorrester Oct 15, 2025
22bb560
rename to registry
thorrester Oct 15, 2025
5d59c6c
genai routes
thorrester Oct 16, 2025
8eaac7e
fix overlap issue
thorrester Oct 16, 2025
6e6fba5
no need for hamburger when we have sidebar
thorrester Oct 16, 2025
1615c7a
updating space routes
thorrester Oct 16, 2025
ed5cc77
fix example link
thorrester Oct 16, 2025
8d9ba11
not used
thorrester Oct 16, 2025
d5cdf39
remove focus
thorrester Oct 16, 2025
e4b9e6e
test docker
thorrester Oct 16, 2025
6477a3e
Update build-assets.yml
thorrester Oct 16, 2025
345be79
Update build-assets.yml
thorrester Oct 16, 2025
04e7492
Update build-assets.yml
thorrester Oct 16, 2025
58092b6
Update build-assets.yml
thorrester Oct 16, 2025
3497d63
daaabug mode
thorrester Oct 16, 2025
a67edf6
Update build-assets.yml
thorrester Oct 16, 2025
41068ed
add cp commands
thorrester Oct 16, 2025
d02b9bb
test
thorrester Oct 17, 2025
e5fb7fc
debug
thorrester Oct 17, 2025
8b3a9a2
Update build-assets.yml
thorrester Oct 17, 2025
6476959
test
thorrester Oct 17, 2025
0c07c18
Update Makefile
thorrester Oct 17, 2025
0401540
Update supervisord.conf
thorrester Oct 17, 2025
fae3490
Update supervisord.conf
thorrester Oct 17, 2025
4475127
Update nginx.conf
thorrester Oct 17, 2025
7c1851a
logging
thorrester Oct 17, 2025
731cf20
removing supervisord
thorrester Oct 17, 2025
3b3e076
Update Dockerfile
thorrester Oct 17, 2025
7d59053
cleanup logs
thorrester Oct 17, 2025
2a851c3
updating containers
thorrester Oct 17, 2025
400179b
pathing
thorrester Oct 17, 2025
0ebd952
testing arm64 build
thorrester Oct 17, 2025
9bb4478
musl updates
thorrester Oct 17, 2025
36e0d44
add back updates
thorrester Oct 17, 2025
684db9a
Update package.json
thorrester Oct 17, 2025
992569a
use prod deps
thorrester Oct 17, 2025
62bc8b4
attempting fixes
thorrester Oct 17, 2025
a7cfa77
Update build-assets.yml
thorrester Oct 17, 2025
86ed383
Update build-assets.yml
thorrester Oct 17, 2025
2e1d595
adding rocky linux
thorrester Oct 17, 2025
8c13fda
Update Dockerfile
thorrester Oct 17, 2025
561bc2b
forgot node
thorrester Oct 17, 2025
48db720
update non-arm build
thorrester Oct 17, 2025
af1d33a
add back mac and windows builds
thorrester Oct 17, 2025
407c4cb
adding ui piece to cli start up
thorrester Oct 18, 2025
2ba9b98
helpers for dev mode
thorrester Oct 18, 2025
fda7d4e
update user reset logic
thorrester Oct 20, 2025
7721ea4
fix env vars
thorrester Oct 20, 2025
7680d45
Update ui.rs
thorrester Oct 20, 2025
6a1a205
only build UI on one target
thorrester Oct 20, 2025
496eabe
update docs
thorrester Oct 20, 2025
aa08db3
Update build-assets.yml
thorrester Oct 20, 2025
95571e6
Update overview.md
thorrester Oct 20, 2025
cc8be90
Merge pull request #282 from demml/docker-dev
thorrester Oct 20, 2025
b567406
Merge pull request #281 from demml/refactor/ssr/cardsearch
thorrester Oct 20, 2025
f9ffb94
Merge pull request #280 from demml/refactor-ssr-oauth
thorrester Oct 21, 2025
b3f5fbd
Merge pull request #279 from demml/refactor-ssr-user
thorrester Oct 21, 2025
2db43c9
Merge pull request #278 from demml/refactor-ssr-imports
thorrester Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
102 changes: 65 additions & 37 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
pull_request:
release:
types: [published]

Expand All @@ -22,7 +23,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-22.04 #
target: x86_64-unknown-linux-gnu
archive: tar.gz
binary_name: opsml-server
Expand All @@ -34,12 +35,6 @@ jobs:
binary_name: opsml-server
archive_name: opsml-server-aarch64-linux-gnu

- os: macos-latest
target: aarch64-apple-darwin
archive: zip
binary_name: opsml-server
archive_name: opsml-server-aarch64-darwin

- os: macos-13
target: x86_64-apple-darwin
archive: zip
Expand Down Expand Up @@ -78,19 +73,23 @@ jobs:
with:
python-version: ${{ env.INTERPRETER }}

- name: Install UI dependencies
run: |
make install.ui.deps
make build.ui
- name: Update apt repositories (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential
- name: Install UI dependencies
run: |
# install all deps and build UI
make build.ui
# remove node_modules and rebuild prod version to reduce size
make install.ui.deps.prod
- name: Build Binaries
run: cargo build -p opsml-server --release --target ${{ matrix.target }}
run: |
cargo build -p opsml-server --release --target ${{ matrix.target }}
- name: Prepare binary directory
shell: bash
Expand All @@ -102,6 +101,12 @@ jobs:
cp target/${{ matrix.target }}/release/${{ matrix.binary_name }} release-bin/
chmod +x release-bin/${{ matrix.binary_name }}
fi
# Copy UI build for Docker builds
if [ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ] || [ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]; then
mkdir -p release-bin/ui
cp -r crates/opsml_server/opsml_ui/build release-bin/ui/build || true
cp -r crates/opsml_server/opsml_ui/node_modules release-bin/ui/node_modules || true
fi
- name: Create zip archive (Windows/macOS)
if: contains(matrix.archive, 'zip')
Expand All @@ -128,6 +133,28 @@ jobs:
path: ${{ matrix.archive_name }}.${{ matrix.archive }}
retention-days: 1

- name: Package UI for Node.js distribution
if: matrix.target == 'x86_64-unknown-linux-gnu'
shell: bash
run: |
mkdir -p packaged-ui
cp -r crates/opsml_server/opsml_ui/build packaged-ui/build
cp -r crates/opsml_server/opsml_ui/node_modules packaged-ui/node_modules
cp crates/opsml_server/opsml_ui/package.json packaged-ui/
cp crates/opsml_server/opsml_ui/pnpm-lock.yaml packaged-ui/ || true
cd packaged-ui
zip -r ../opsml-ui-node.zip ./*
# only want to run this once, so only on the first matrix item
# The artifact will be the same on all builds regardless of target
- name: Upload UI Node.js package artifact
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions/upload-artifact@v4
with:
name: opsml-ui-node
path: opsml-ui-node.zip
retention-days: 1

publish-docker-images:
if: github.event_name == 'release'
needs: build
Expand All @@ -140,14 +167,13 @@ jobs:
include:
- image: "ubuntu"
tag_suffix: "ubuntu"
- image: "alpine"
tag_suffix: "alpine"
- image: "scratch"
tag_suffix: "scratch"
artifact: "opsml-server-x86_64-linux-gnu"
- image: "debian"
tag_suffix: "debian"
- image: "distroless"
tag_suffix: "distroless"
artifact: "opsml-server-x86_64-linux-gnu"
- image: "rocky"
tag_suffix: "rocky-minimal"
artifact: "opsml-server-x86_64-linux-gnu"

steps:
- name: Checkout Code
Expand All @@ -164,12 +190,15 @@ jobs:

- name: Extract binary
run: |
mkdir -p binary
tar -xzf ./artifacts/opsml-server-x86_64-linux-gnu.tar.gz -C ./binary
- name: Set up binary permissions
run: |
chmod +x ./binary/opsml-server
archive="./artifacts/${{ matrix.artifact }}.tar.gz"
if [ -f "$archive" ]; then
mkdir -p binary
tar -xzf "$archive" -C ./binary
chmod +x ./binary/opsml-server
else
echo "x86_64 binary $archive not found, skipping this build"
exit 1
fi
- name: Set version tag
id: set-version
Expand All @@ -193,7 +222,7 @@ jobs:
file: docker/official/${{ matrix.image }}/Dockerfile
push: true
build-args: |
OPSML_SERVER_BINARY=./binary/opsml-server
OPSML_SERVER_BINARY=./binary
tags: |
demml/opsml:${{ matrix.tag_suffix }}-amd64-${{ steps.set-version.outputs.VERSION }}
${{ github.event_name == 'release' && format('demml/opsml:{0}-amd64-latest', matrix.tag_suffix) || '' }}
Expand All @@ -212,14 +241,13 @@ jobs:
include:
- image: "ubuntu"
tag_suffix: "ubuntu"
- image: "alpine"
tag_suffix: "alpine"
- image: "scratch"
tag_suffix: "scratch"
artifact: "opsml-server-aarch64-linux-gnu"
- image: "debian"
tag_suffix: "debian"
- image: "distroless"
tag_suffix: "distroless"
artifact: "opsml-server-aarch64-linux-gnu"
- image: "rocky"
tag_suffix: "rocky-minimal"
artifact: "opsml-server-aarch64-linux-gnu"

steps:
- name: Checkout Code
Expand All @@ -239,15 +267,15 @@ jobs:

- name: Extract binary
run: |
if [ -f "./artifacts/opsml-server-aarch64-linux-gnu.tar.gz" ]; then
archive="./artifacts/${{ matrix.artifact }}.tar.gz"
if [ -f "$archive" ]; then
mkdir -p binary
tar -xzf ./artifacts/opsml-server-aarch64-linux-gnu.tar.gz -C ./binary
tar -xzf "$archive" -C ./binary
chmod +x ./binary/opsml-server
else
echo "ARM64 binary not found, skipping this build"
echo "ARM64 binary $archive not found, skipping this build"
exit 1
fi
continue-on-error: true
- name: Set version tag
id: set-version
Expand All @@ -272,7 +300,7 @@ jobs:
push: true
platforms: linux/arm64
build-args: |
OPSML_SERVER_BINARY=./binary/opsml-server
OPSML_SERVER_BINARY=./binary
tags: |
demml/opsml:${{ matrix.tag_suffix }}-arm64-${{ steps.set-version.outputs.VERSION }}
${{ github.event_name == 'release' && format('demml/opsml:{0}-arm64-latest', matrix.tag_suffix) || '' }}
Expand Down
35 changes: 0 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ rand = { version = "0.9.1"}
rayon = "1.*"
regex = "1.*"
reqwest = { version = "0.12.*", features = ["json", "stream", "multipart", "rustls-tls", "rustls-tls-native-roots", "blocking" ], default-features = false }
rust-embed = "8.*"
reqwest-middleware = "0.*"
rusty-logging = "0.*"
# we cant use crates.io because scouter relies on a fork of linfa at the moment
Expand Down
53 changes: 51 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,17 @@ ui.update.deps:
install.ui.deps:
cd $(UI_DIR) && pnpm install

.PHONY: ui.build
.PHONY: ui.install.deps.prod
install.ui.deps.prod:
# remove existing node_modules
rm -rf $(UI_DIR)/node_modules
# install only production dependencies
cd $(UI_DIR) && pnpm install --prod

.PHONY: build.ui
build.ui:
cd $(UI_DIR) && pnpm install
cd $(UI_DIR) && pnpm build
touch $(UI_DIR)/site/.gitkeep # to make sure the site folder is not ignored by git

ui.dev:
cd $(UI_DIR) && pnpm run dev
Expand All @@ -139,3 +145,46 @@ prepend.changelog:
# get version from Cargo.toml
@VERSION=$(shell grep '^version =' Cargo.toml | cut -d '"' -f 2) && \
git cliff --unreleased --tag $$VERSION --prepend CHANGELOG.md


###### Development & Production - Separate Servers ######

.PHONY: dev.backend
dev.backend:
cargo build -p opsml-server
OPSML_SERVER_PORT=8080 ./target/debug/opsml-server

.PHONY: dev.frontend
dev.frontend:
cd $(UI_DIR) && pnpm run dev

.PHONY: build.backend
build.backend:
cargo build -p opsml-server --target

.PHONY: start.backend
start.backend: build.backend
OPSML_SERVER_PORT=8080 ./target/release/opsml-server

.PHONY: start.frontend
start.frontend: build.ui
cd $(UI_DIR) && node build/index.js

.PHONY: dev.both
dev.both:
@echo "Starting both servers in development mode..."
@echo "Backend API: http://localhost:8080"
@echo "Frontend SSR: http://localhost:3000"
@make -j2 dev.backend dev.frontend

.PHONY: start.both
start.both:
@echo "Starting both servers in production mode..."
@echo "Backend API: http://localhost:8080"
@echo "Frontend SSR: http://localhost:3000"
@make -j2 dev.backend start.frontend

.PHONY: stop.both
stop.both:
-lsof -ti:3000 | xargs kill -9 2>/dev/null || true
-lsof -ti:8080 | xargs kill -9 2>/dev/null || true
2 changes: 2 additions & 0 deletions crates/opsml_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ flate2 = "1.*"
tar = "*"




[dev-dependencies]
mockall = { workspace = true }
mockito = { workspace = true }
Expand Down
Loading
Loading