Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ CMakeUserPresets.json
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#cmake-build-*

# Node.js dependencies
node_modules/
package-lock.json

# Build outputs
dist/
*.log
12 changes: 12 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"rules": {
"typescript": "error",
"suspicious": "error",
"correctness": "error",
"style": "error",
"pedantic": "warn"
},
"import-plugin": true,
"jsdoc-plugin": true
}
30 changes: 30 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Dependencies
node_modules/
package-lock.json
bun.lock

# Build outputs
dist/
*.log

# Git
.git/
.gitignore
.gitmodules

# Config files that prettier can't parse
.oxlintrc.json

# Binary and non-text files
*.png
*.jpg
*.jpeg
*.gif
*.ico
*.pdf
*.zip
*.tar.gz

# Other configs
LICENSE
*.list
12 changes: 12 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
semi: true
singleQuote: true
trailingComma: es5
printWidth: 80
tabWidth: 2
proseWrap: preserve
overrides:
- files: '*.ts'
options:
parser: typescript
plugins:
- '@prettier/plugin-oxc'
22 changes: 11 additions & 11 deletions STACK.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ HelloTimeSec=2
MaxAgeSec=20
```

#### 📄 /usr/lib/systemd/system/10-tenant-bridge.network:
#### 📄 /usr/lib/systemd/network/10-tenant-bridge.network:
```ini
[Match]
Name=br-tenant-%i
Expand All @@ -309,7 +309,7 @@ EmitRouter=yes

### 2️⃣ WireGuard VPN Template

#### 📄 /usr/lib/systemd/system/20-wg-tenant.netdev:
#### 📄 /usr/lib/systemd/network/20-wg-tenant.netdev:
```ini
[NetDev]
Name=wg-tenant-%i
Expand All @@ -326,7 +326,7 @@ Endpoint=${PEER_ENDPOINT}:51820
PersistentKeepalive=25
```

#### 📄 /usr/lib/systemd/system/20-wg-tenant.network:
#### 📄 /usr/lib/systemd/network/20-wg-tenant.network:
```ini
[Match]
Name=wg-tenant-%i
Expand All @@ -341,7 +341,7 @@ Scope=link

### 3️⃣ VXLAN Overlay Template

#### 📄 /usr/lib/systemd/system/30-vxlan-tenant.netdev:
#### 📄 /usr/lib/systemd/network/30-vxlan-tenant.netdev:
```ini
[NetDev]
Name=vxlan-tenant-%i
Expand All @@ -354,7 +354,7 @@ DestinationPort=4789
MacLearning=yes
```

#### 📄 /usr/lib/systemd/system/30-vxlan-tenant.network:
#### 📄 /usr/lib/systemd/network/30-vxlan-tenant.network:
```ini
[Match]
Name=vxlan-tenant-%i
Expand All @@ -369,7 +369,7 @@ EgressUntagged=1

### 4️⃣ VLAN Segmentation Template

#### 📄 /usr/lib/systemd/system/40-vlan-tenant.netdev:
#### 📄 /usr/lib/systemd/network/40-vlan-tenant.netdev:
```ini
[NetDev]
Name=vlan-tenant-%i
Expand All @@ -379,7 +379,7 @@ Kind=vlan
Id=%i
```

#### 📄 /usr/lib/systemd/system/40-vlan-tenant.network:
#### 📄 /usr/lib/systemd/network/40-vlan-tenant.network:
```ini
[Match]
Name=vlan-tenant-%i
Expand Down Expand Up @@ -597,17 +597,17 @@ tenant@tenant123.service

Each template ensures compliance with the Linux File System Hierarchy specification:

1. **Root Filesystem Requirements:
1. **Root Filesystem Requirements**:
- `/etc/os-release` or `/usr/lib/os-release` present
- Proper symlink from `/usr/lib/os-release` to `/etc/os-release`
- No files in `/` root directory itself

2. **Extension Image Requirements:
2. **Extension Image Requirements**:
- sysext: Only `/usr/` and `/opt/` directories
- confext: Only `/etc/` directory
- Proper `extension-release` files in correct locations

3. **Verification Structure:
3. **Verification Structure**:
- VOA hierarchy at `/etc/voa/` and `/usr/share/voa/`
- Proper certificate fingerprint naming
- ASCII-armored OpenPGP files
Expand Down Expand Up @@ -641,7 +641,7 @@ validate_rootfs() {

## 🎯 Conclusion

This template system provides:
This template system provides the following capabilities:

1. **Standardization**: All tenants use consistent, validated templates
2. **Compliance**: Full adherence to Linux Userspace API specifications
Expand Down
60 changes: 60 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "bitbuilder-hypervisor",
"version": "1.0.0",
"description": "Revolutionary git-ops-native, multi-tenant hypervisor platform built on systemd virtualization",
"type": "module",
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./generators/*": "./dist/generators/*.js",
"./services/*": "./dist/services/*.js"
},
"imports": {
"#generators/*": "./src/generators/*.ts",
"#services/*": "./src/services/*.ts",
"#schemas/*": "./src/schemas/*.ts",
"#utils/*": "./src/utils/*.ts",
"#types/*": "./src/types/*.ts"
},
"files": [
"dist",
"templates",
"configs"
],
"scripts": {
"dev": "bun run --watch src/index.ts",
"build": "tsc --noEmit && bun build ./src/index.ts --outdir ./dist --target node --external '#*'",
"build:generators": "bun build ./src/generators/tenant-generator.ts --compile --outfile ./dist/generators/tenant-generator",
"build:services": "bun build ./src/services/tenant-manager.ts --compile --outfile ./dist/services/tenant-manager",
"test": "bun test",
"lint": "oxlint",
"lint:fix": "oxlint --fix",
"format": "prettier --write .",
"quality": "oxlint && prettier --check ."
},
"dependencies": {
"effect": "latest",
"@effect/schema": "latest",
"@effect/platform": "latest",
"@effect/platform-node": "latest"
},
"devDependencies": {
"oxlint": "latest",
"prettier": "latest",
"@prettier/plugin-oxc": "latest",
"typescript": "latest",
"@types/node": "latest"
},
"engines": {
"bun": ">=1.0.0"
},
"keywords": [
"hypervisor",
"systemd",
"virtualization",
"git-ops",
"multi-tenant",
"immutable-infrastructure"
],
"license": "MIT"
}
Loading
Loading