Skip to content

Commit 6b76b6d

Browse files
author
TangibleResearch
committed
docs and ci setup
1 parent a8ab6b6 commit 6b76b6d

3 files changed

Lines changed: 183 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: InfraOS CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
backend:
11+
name: Backend
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.12"
18+
- name: Install dependencies
19+
run: python -m pip install -r infraos-backend/requirements.txt
20+
- name: Check imports
21+
run: PYTHONPATH=infraos-backend python -m compileall infraos-backend
22+
23+
ui:
24+
name: UI
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: "22"
31+
cache: npm
32+
cache-dependency-path: infraos-ui/package-lock.json
33+
- name: Install dependencies
34+
run: npm ci
35+
working-directory: infraos-ui
36+
- name: Build UI
37+
run: npm run build
38+
working-directory: infraos-ui

README.md

Lines changed: 122 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,127 @@
11
# InfraOS
22

3-
InfraOS is the web console and backend control plane for AInfra/InfraVM systems. It includes the dashboard, auth, IDE, Ops Assistant, object registry APIs, and developer shell.
3+
InfraOS is the web console and backend control plane for AInfra/InfraVM systems.
4+
5+
It includes:
6+
7+
- FastAPI backend
8+
- Vanilla TypeScript + Vite UI
9+
- SQLite auth
10+
- default local admin bootstrap
11+
- server name support
12+
- account and privilege management
13+
- privilege request notifications
14+
- AInfra IDE
15+
- local Ops Assistant
16+
- object registry APIs
17+
- VM compile/run bridge
18+
- provider key status dashboard
19+
20+
## Requirements
21+
22+
- Git
23+
- Python 3.12+
24+
- Node.js 22+
25+
- npm
26+
- Optional: Rust compiler and InfraVM binary when connected to the full AInfra workspace
27+
28+
### macOS
29+
30+
```sh
31+
brew install python node git
32+
```
33+
34+
### Ubuntu/Debian
35+
36+
```sh
37+
sudo apt-get update
38+
sudo apt-get install -y python3 python3-venv nodejs npm git curl
39+
```
40+
41+
### Windows
42+
43+
Use WSL2 Ubuntu for the simplest path.
44+
45+
## Setup
46+
47+
```sh
48+
git clone https://github.com/TangibleResearch/InfraOS.git
49+
cd InfraOS
50+
shell/infraos.sh init
51+
```
52+
53+
The init command creates runtime folders, initializes SQLite if missing, and creates:
54+
55+
```text
56+
username: admin
57+
password: admin
58+
```
59+
60+
Change the default admin password before exposing the backend beyond localhost.
61+
62+
## Run
63+
64+
```sh
65+
shell/infraos.sh start
66+
```
67+
68+
Open:
69+
70+
```text
71+
http://127.0.0.1:5173
72+
```
73+
74+
Stop:
75+
76+
```sh
77+
shell/infraos.sh stop
78+
```
79+
80+
`InfraOS` can run standalone for dashboard, auth, account management, and UI development. Compile/run actions require the AInfra compiler and InfraVM runtime from the combined `AInfra` repo or compatible local binaries.
81+
82+
## Manual Backend
83+
84+
```sh
85+
cd infraos-backend
86+
python3 -m venv .venv
87+
. .venv/bin/activate
88+
pip install -r requirements.txt
89+
uvicorn main:app --reload --port 8000
90+
```
91+
92+
## Manual UI
93+
94+
```sh
95+
cd infraos-ui
96+
npm ci
97+
npm run dev
98+
```
99+
100+
## Environment Variables
101+
102+
```sh
103+
export INFRAOS_SERVER_NAME="My VM Server"
104+
export INFRAOS_BACKEND_PORT=8000
105+
export INFRAOS_UI_PORT=5173
106+
export OPENAI_API_KEY="..."
107+
export ANTHROPIC_API_KEY="..."
108+
export GEMINI_API_KEY="..."
109+
export GOOGLE_API_KEY="..."
110+
export AZURE_OPENAI_API_KEY="..."
111+
export MICROSOFT_API_KEY="..."
112+
export DEEPSEEK_API_KEY="..."
113+
export HUGGINGFACE_API_KEY="..."
114+
export HF_TOKEN="..."
115+
```
116+
117+
## CI/CD
118+
119+
GitHub Actions in `.github/workflows/ci.yml` runs:
120+
121+
- backend dependency install
122+
- Python import/compile check
123+
- npm clean install
124+
- TypeScript/Vite UI build
4125

5126
## License
6127

shell/infraos.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,21 @@ ensure_runtime_state() {
110110
}
111111

112112
build_all() {
113-
cargo build --manifest-path "$ROOT_DIR/optimizer/rust/Cargo.toml"
114-
cargo build --manifest-path "$ROOT_DIR/ainfra-compiler/Cargo.toml"
115-
make -C "$ROOT_DIR/infravm"
113+
if [ -f "$ROOT_DIR/optimizer/rust/Cargo.toml" ]; then
114+
cargo build --manifest-path "$ROOT_DIR/optimizer/rust/Cargo.toml"
115+
else
116+
echo "optimizer missing: skipping optimizer build"
117+
fi
118+
if [ -f "$ROOT_DIR/ainfra-compiler/Cargo.toml" ]; then
119+
cargo build --manifest-path "$ROOT_DIR/ainfra-compiler/Cargo.toml"
120+
else
121+
echo "ainfra-compiler missing: skipping compiler build"
122+
fi
123+
if [ -f "$ROOT_DIR/infravm/Makefile" ]; then
124+
make -C "$ROOT_DIR/infravm"
125+
else
126+
echo "infravm missing: skipping VM build"
127+
fi
116128
if have npm; then
117129
(cd "$ROOT_DIR/infraos-ui" && npm install && npm run build)
118130
else
@@ -121,12 +133,20 @@ build_all() {
121133
}
122134

123135
compile_aif() {
136+
if [ ! -x "$ROOT_DIR/ainfra-compiler/target/debug/ainfra-compiler" ]; then
137+
echo "ainfra-compiler binary missing. Run this from AInfra, or build/install the compiler first."
138+
exit 1
139+
fi
124140
src="${1:-$ROOT_DIR/examples/local-stub.ainfra}"
125141
out="${2:-$ROOT_DIR/data/objects/local-stub.aif}"
126142
"$ROOT_DIR/ainfra-compiler/target/debug/ainfra-compiler" "$src" -o "$out"
127143
}
128144

129145
run_aif() {
146+
if [ ! -x "$ROOT_DIR/infravm/infravm" ]; then
147+
echo "infravm binary missing. Run this from AInfra/InfraVM, or build/install InfraVM first."
148+
exit 1
149+
fi
130150
aif="${1:-$ROOT_DIR/data/objects/local-stub.aif}"
131151
if [ "${2:-}" ]; then
132152
"$ROOT_DIR/infravm/infravm" "$aif" "$2"

0 commit comments

Comments
 (0)