firecloud-devnet 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- firecloud_devnet-0.1.0/.dockerignore +12 -0
- firecloud_devnet-0.1.0/.env.example +3 -0
- firecloud_devnet-0.1.0/.github/workflows/ci.yml +76 -0
- firecloud_devnet-0.1.0/.github/workflows/publish.yml +29 -0
- firecloud_devnet-0.1.0/.gitignore +45 -0
- firecloud_devnet-0.1.0/CHANGELOG.md +21 -0
- firecloud_devnet-0.1.0/Dockerfile +18 -0
- firecloud_devnet-0.1.0/LICENSE +21 -0
- firecloud_devnet-0.1.0/PKG-INFO +158 -0
- firecloud_devnet-0.1.0/README.md +106 -0
- firecloud_devnet-0.1.0/docker-compose.yml +103 -0
- firecloud_devnet-0.1.0/fc_mlops/__init__.py +3 -0
- firecloud_devnet-0.1.0/fc_mlops/__main__.py +5 -0
- firecloud_devnet-0.1.0/fc_mlops/anomaly.py +112 -0
- firecloud_devnet-0.1.0/fc_mlops/artifact_store.py +111 -0
- firecloud_devnet-0.1.0/fc_mlops/cli.py +190 -0
- firecloud_devnet-0.1.0/fc_mlops/simulate_failure.py +100 -0
- firecloud_devnet-0.1.0/fc_mlops/telemetry.py +72 -0
- firecloud_devnet-0.1.0/fc_rag/__init__.py +3 -0
- firecloud_devnet-0.1.0/fc_rag/cli.py +51 -0
- firecloud_devnet-0.1.0/fc_rag/config.py +24 -0
- firecloud_devnet-0.1.0/fc_rag/embedder.py +62 -0
- firecloud_devnet-0.1.0/fc_rag/indexer.py +121 -0
- firecloud_devnet-0.1.0/fc_rag/query_engine.py +79 -0
- firecloud_devnet-0.1.0/fc_rag/requirements.txt +6 -0
- firecloud_devnet-0.1.0/fc_rag/retriever.py +46 -0
- firecloud_devnet-0.1.0/firecloud/__init__.py +17 -0
- firecloud_devnet-0.1.0/firecloud/chunker.py +122 -0
- firecloud_devnet-0.1.0/firecloud/cli.py +540 -0
- firecloud_devnet-0.1.0/firecloud/crypto.py +269 -0
- firecloud_devnet-0.1.0/firecloud/discovery.py +164 -0
- firecloud_devnet-0.1.0/firecloud/distributor.py +269 -0
- firecloud_devnet-0.1.0/firecloud/exceptions.py +41 -0
- firecloud_devnet-0.1.0/firecloud/fec.py +87 -0
- firecloud_devnet-0.1.0/firecloud/manifest.py +263 -0
- firecloud_devnet-0.1.0/firecloud/network.py +90 -0
- firecloud_devnet-0.1.0/firecloud/node.py +562 -0
- firecloud_devnet-0.1.0/firecloud/storage.py +146 -0
- firecloud_devnet-0.1.0/firecloud/sync.py +277 -0
- firecloud_devnet-0.1.0/firecloud/transport.py +387 -0
- firecloud_devnet-0.1.0/pyproject.toml +79 -0
- firecloud_devnet-0.1.0/tests/__init__.py +1 -0
- firecloud_devnet-0.1.0/tests/conftest.py +46 -0
- firecloud_devnet-0.1.0/tests/test_chunker.py +154 -0
- firecloud_devnet-0.1.0/tests/test_cli.py +388 -0
- firecloud_devnet-0.1.0/tests/test_crypto.py +301 -0
- firecloud_devnet-0.1.0/tests/test_discovery.py +72 -0
- firecloud_devnet-0.1.0/tests/test_distributor.py +181 -0
- firecloud_devnet-0.1.0/tests/test_fec.py +68 -0
- firecloud_devnet-0.1.0/tests/test_integration.py +283 -0
- firecloud_devnet-0.1.0/tests/test_manifest.py +284 -0
- firecloud_devnet-0.1.0/tests/test_network.py +75 -0
- firecloud_devnet-0.1.0/tests/test_node.py +440 -0
- firecloud_devnet-0.1.0/tests/test_storage.py +188 -0
- firecloud_devnet-0.1.0/tests/test_sync.py +204 -0
- firecloud_devnet-0.1.0/tests/test_transport.py +197 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python 3.11
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.11"
|
|
19
|
+
|
|
20
|
+
- name: Install ruff
|
|
21
|
+
run: pip install ruff
|
|
22
|
+
|
|
23
|
+
- name: Lint with ruff
|
|
24
|
+
run: |
|
|
25
|
+
dirs=""
|
|
26
|
+
for d in firecloud fc_rag fc_mlops; do
|
|
27
|
+
if [ -d "$d" ]; then
|
|
28
|
+
dirs="$dirs $d"
|
|
29
|
+
fi
|
|
30
|
+
done
|
|
31
|
+
if [ -n "$dirs" ]; then
|
|
32
|
+
ruff check $dirs
|
|
33
|
+
else
|
|
34
|
+
echo "No directories to lint."
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
test:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
needs: lint
|
|
40
|
+
strategy:
|
|
41
|
+
matrix:
|
|
42
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
|
|
46
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
47
|
+
uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: ${{ matrix.python-version }}
|
|
50
|
+
|
|
51
|
+
- name: Install dependencies
|
|
52
|
+
run: pip install ".[dev]"
|
|
53
|
+
|
|
54
|
+
- name: Run tests
|
|
55
|
+
run: pytest tests/ -v --tb=short
|
|
56
|
+
|
|
57
|
+
- name: Upload test results on failure
|
|
58
|
+
if: failure()
|
|
59
|
+
uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: test-results-${{ matrix.python-version }}
|
|
62
|
+
path: |
|
|
63
|
+
.pytest_cache/
|
|
64
|
+
tests/
|
|
65
|
+
|
|
66
|
+
build:
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
needs: test
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
|
|
72
|
+
- name: Build Docker image (latest)
|
|
73
|
+
run: docker build -t firecloud:latest .
|
|
74
|
+
|
|
75
|
+
- name: Build Docker image (SHA tag)
|
|
76
|
+
run: docker build -t firecloud:${{ github.sha }} .
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.11"
|
|
21
|
+
|
|
22
|
+
- name: Install build tools
|
|
23
|
+
run: pip install build
|
|
24
|
+
|
|
25
|
+
- name: Build sdist and wheel
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Byte-compiled / optimized
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
|
|
7
|
+
# Distribution / packaging
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
*.egg
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
|
|
18
|
+
# IDE
|
|
19
|
+
.idea/
|
|
20
|
+
.vscode/
|
|
21
|
+
*.swp
|
|
22
|
+
*.swo
|
|
23
|
+
*~
|
|
24
|
+
|
|
25
|
+
# Testing / coverage
|
|
26
|
+
.pytest_cache/
|
|
27
|
+
.coverage
|
|
28
|
+
.coverage.*
|
|
29
|
+
htmlcov/
|
|
30
|
+
|
|
31
|
+
# Linting
|
|
32
|
+
.ruff_cache/
|
|
33
|
+
|
|
34
|
+
# Environment
|
|
35
|
+
.env
|
|
36
|
+
|
|
37
|
+
# OS
|
|
38
|
+
.DS_Store
|
|
39
|
+
Thumbs.db
|
|
40
|
+
|
|
41
|
+
# AI tool metadata — do not commit
|
|
42
|
+
.antigravitycli/
|
|
43
|
+
|
|
44
|
+
# Qdrant local data (created by fc-rag)
|
|
45
|
+
~/.fc_rag/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to FireCloud will be documented in this file.
|
|
4
|
+
|
|
5
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2025-06-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- XChaCha20-Poly1305 chunk encryption with HMAC-SHA-256 keyed addressing
|
|
11
|
+
- FastCDC content-defined chunking
|
|
12
|
+
- zfec erasure coding (configurable k/n)
|
|
13
|
+
- mDNS peer discovery via zeroconf with config file fallback
|
|
14
|
+
- TLS binary RPC transport with handshake and heartbeat
|
|
15
|
+
- Manifest with Lamport timestamps and tombstone support
|
|
16
|
+
- Watchdog-based folder sync (outbound upload, inbound download)
|
|
17
|
+
- Click CLI (`firecloud` entry point) — init, start, upload, download, status, peers
|
|
18
|
+
- Docker Compose multi-node setup with health checks
|
|
19
|
+
- GitHub Actions CI (lint → test → build)
|
|
20
|
+
- `fc-rag`: local RAG pipeline (fastembed + Qdrant + Ollama)
|
|
21
|
+
- `fc-ml`: ML artifact versioning, telemetry server, anomaly detection
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# Install system dependencies and upgrade pip
|
|
6
|
+
RUN pip install --no-cache-dir --upgrade pip
|
|
7
|
+
|
|
8
|
+
# Copy the full project into the container
|
|
9
|
+
COPY . .
|
|
10
|
+
|
|
11
|
+
# Install FireCloud using hatchling build system (pyproject.toml)
|
|
12
|
+
RUN pip install --no-cache-dir .
|
|
13
|
+
|
|
14
|
+
# Expose the default FireCloud node port
|
|
15
|
+
EXPOSE 7474
|
|
16
|
+
|
|
17
|
+
# Entrypoint: start the FireCloud node
|
|
18
|
+
ENTRYPOINT ["firecloud", "start"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 Rajashekhar Sunkara
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: firecloud-devnet
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Private, encrypted, distributed storage across your own machines
|
|
5
|
+
Project-URL: Homepage, https://github.com/rajashekharsunkara/firecloud
|
|
6
|
+
Project-URL: Repository, https://github.com/rajashekharsunkara/firecloud
|
|
7
|
+
Project-URL: Issues, https://github.com/rajashekharsunkara/firecloud/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/rajashekharsunkara/firecloud/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Rajashekhar Sunkara
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: chunking,distributed,encryption,p2p,storage
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Security :: Cryptography
|
|
22
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: aiofiles>=23.0.0
|
|
25
|
+
Requires-Dist: click>=8.0.0
|
|
26
|
+
Requires-Dist: cryptography>=41.0.0
|
|
27
|
+
Requires-Dist: fastcdc>=1.5.0
|
|
28
|
+
Requires-Dist: pycryptodome>=3.20.0
|
|
29
|
+
Requires-Dist: watchdog>=3.0.0
|
|
30
|
+
Requires-Dist: zeroconf>=0.80.0
|
|
31
|
+
Requires-Dist: zfec>=1.5.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: ruff>=0.4.0; extra == 'dev'
|
|
37
|
+
Provides-Extra: mlops
|
|
38
|
+
Requires-Dist: fastapi>=0.100.0; extra == 'mlops'
|
|
39
|
+
Requires-Dist: numpy>=1.24.0; extra == 'mlops'
|
|
40
|
+
Requires-Dist: psutil>=5.9.0; extra == 'mlops'
|
|
41
|
+
Requires-Dist: pydantic>=2.0; extra == 'mlops'
|
|
42
|
+
Requires-Dist: rich>=13.0.0; extra == 'mlops'
|
|
43
|
+
Requires-Dist: scikit-learn>=1.3.0; extra == 'mlops'
|
|
44
|
+
Requires-Dist: uvicorn>=0.20.0; extra == 'mlops'
|
|
45
|
+
Provides-Extra: rag
|
|
46
|
+
Requires-Dist: fastembed>=0.2.0; extra == 'rag'
|
|
47
|
+
Requires-Dist: ollama>=0.1.0; extra == 'rag'
|
|
48
|
+
Requires-Dist: pydantic>=2.0; extra == 'rag'
|
|
49
|
+
Requires-Dist: qdrant-client>=1.8.0; extra == 'rag'
|
|
50
|
+
Requires-Dist: rich>=13.0.0; extra == 'rag'
|
|
51
|
+
Description-Content-Type: text/markdown
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
# FireCloud
|
|
56
|
+
|
|
57
|
+
Private, encrypted, distributed storage across machines you own.
|
|
58
|
+
|
|
59
|
+
Unlike S3 (vendor lock-in), Syncthing (no erasure coding), or IPFS (public DHT), FireCloud gives you zero-knowledge peer-to-peer storage where data is encrypted locally before it leaves your machine. Every chunk stored on the network is ciphertext — nodes can't read it.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Install
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# from GitHub (recommended for now)
|
|
67
|
+
pip install git+https://github.com/rajashekharsunkara/firecloud.git
|
|
68
|
+
|
|
69
|
+
# with RAG extensions
|
|
70
|
+
pip install "firecloud-devnet[rag]"
|
|
71
|
+
|
|
72
|
+
# with MLOps extensions
|
|
73
|
+
pip install "firecloud-devnet[mlops]"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Quickstart
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# 1. Start a 4-node network via Docker Compose
|
|
80
|
+
git clone https://github.com/rajashekharsunkara/firecloud.git
|
|
81
|
+
cd firecloud
|
|
82
|
+
cp .env.example .env # set FIRECLOUD_PASSPHRASE in .env
|
|
83
|
+
docker compose up -d # starts bootstrap + 3 storage nodes
|
|
84
|
+
|
|
85
|
+
# 2. Upload a file
|
|
86
|
+
docker exec firecloud-bootstrap firecloud upload /data/my-file.zip
|
|
87
|
+
|
|
88
|
+
# 3. Download from any node
|
|
89
|
+
docker exec firecloud-node-1 firecloud download <file_id> /data/restored.zip
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Architecture
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
┌─────────────────────────────────────────┐
|
|
98
|
+
│ fc-rag (Private RAG — opt-in) │ LLMOps
|
|
99
|
+
│ fc-mlops (Artifact Store — opt-in) │ MLOps
|
|
100
|
+
│ Docker + GitHub Actions │ DevOps
|
|
101
|
+
│ FireCloud Core (storage, crypto, P2P) │ Distributed Systems
|
|
102
|
+
└─────────────────────────────────────────┘
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Distributed Systems** — XChaCha20-Poly1305 encryption, FastCDC content-defined chunking, zfec erasure coding, mDNS peer discovery. Manifest consistency uses Lamport timestamps with last-writer-wins semantics. Node communication runs over TLS-protected binary RPC.
|
|
106
|
+
|
|
107
|
+
**DevOps** — Multi-node Docker Compose setup with health checks. GitHub Actions CI pipeline (lint → test → build) gates every merge.
|
|
108
|
+
|
|
109
|
+
**MLOps** — `fc-mlops` provides version-tracked ML artifact storage via FireCloud's `Node` API, a FastAPI telemetry endpoint with psutil system metrics, and IsolationForest-based anomaly detection on telemetry readings.
|
|
110
|
+
|
|
111
|
+
**LLMOps** — `fc-rag` is a fully local RAG pipeline using fastembed for embeddings, Qdrant (embedded mode) for vector search, and Ollama for local LLM inference — no text ever leaves your machine.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Security
|
|
116
|
+
|
|
117
|
+
FireCloud uses **HMAC-SHA-256 with a network-derived key** for chunk addressing instead of plain SHA-256. This raises the cost of confirmation-of-file attacks — an attacker who suspects a specific file is stored cannot verify its presence by computing chunk hashes from the plaintext, because valid chunk IDs require the network key. This protection holds as long as the network key remains confidential.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## AI/ML Extensions
|
|
122
|
+
|
|
123
|
+
FireCloud stores and retrieves encrypted content. The RAG and artifact layers run entirely on the client — nothing in plaintext crosses the server boundary.
|
|
124
|
+
|
|
125
|
+
### Private RAG (`fc-rag`)
|
|
126
|
+
|
|
127
|
+
Index your docs locally and query with a private LLM — no data leaves your machine.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
pip install "firecloud-devnet[rag]"
|
|
131
|
+
fc-rag index ./docs
|
|
132
|
+
fc-rag query "How does FireCloud handle node departure?"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### MLOps Artifact Store (`fc-mlops`)
|
|
136
|
+
|
|
137
|
+
Version-track ML models, datasets, and checkpoints using FireCloud as the storage backend.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pip install "firecloud-devnet[mlops]"
|
|
141
|
+
fc-ml save ./model.pt --name resnet --version 1.0.0 --type model --metric accuracy=0.94
|
|
142
|
+
fc-ml simulate-failure
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Development
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
git clone https://github.com/rajashekharsunkara/firecloud.git
|
|
151
|
+
cd firecloud
|
|
152
|
+
pip install -e ".[dev]"
|
|
153
|
+
pytest tests/ -v
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# FireCloud
|
|
4
|
+
|
|
5
|
+
Private, encrypted, distributed storage across machines you own.
|
|
6
|
+
|
|
7
|
+
Unlike S3 (vendor lock-in), Syncthing (no erasure coding), or IPFS (public DHT), FireCloud gives you zero-knowledge peer-to-peer storage where data is encrypted locally before it leaves your machine. Every chunk stored on the network is ciphertext — nodes can't read it.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# from GitHub (recommended for now)
|
|
15
|
+
pip install git+https://github.com/rajashekharsunkara/firecloud.git
|
|
16
|
+
|
|
17
|
+
# with RAG extensions
|
|
18
|
+
pip install "firecloud-devnet[rag]"
|
|
19
|
+
|
|
20
|
+
# with MLOps extensions
|
|
21
|
+
pip install "firecloud-devnet[mlops]"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quickstart
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# 1. Start a 4-node network via Docker Compose
|
|
28
|
+
git clone https://github.com/rajashekharsunkara/firecloud.git
|
|
29
|
+
cd firecloud
|
|
30
|
+
cp .env.example .env # set FIRECLOUD_PASSPHRASE in .env
|
|
31
|
+
docker compose up -d # starts bootstrap + 3 storage nodes
|
|
32
|
+
|
|
33
|
+
# 2. Upload a file
|
|
34
|
+
docker exec firecloud-bootstrap firecloud upload /data/my-file.zip
|
|
35
|
+
|
|
36
|
+
# 3. Download from any node
|
|
37
|
+
docker exec firecloud-node-1 firecloud download <file_id> /data/restored.zip
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Architecture
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
┌─────────────────────────────────────────┐
|
|
46
|
+
│ fc-rag (Private RAG — opt-in) │ LLMOps
|
|
47
|
+
│ fc-mlops (Artifact Store — opt-in) │ MLOps
|
|
48
|
+
│ Docker + GitHub Actions │ DevOps
|
|
49
|
+
│ FireCloud Core (storage, crypto, P2P) │ Distributed Systems
|
|
50
|
+
└─────────────────────────────────────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Distributed Systems** — XChaCha20-Poly1305 encryption, FastCDC content-defined chunking, zfec erasure coding, mDNS peer discovery. Manifest consistency uses Lamport timestamps with last-writer-wins semantics. Node communication runs over TLS-protected binary RPC.
|
|
54
|
+
|
|
55
|
+
**DevOps** — Multi-node Docker Compose setup with health checks. GitHub Actions CI pipeline (lint → test → build) gates every merge.
|
|
56
|
+
|
|
57
|
+
**MLOps** — `fc-mlops` provides version-tracked ML artifact storage via FireCloud's `Node` API, a FastAPI telemetry endpoint with psutil system metrics, and IsolationForest-based anomaly detection on telemetry readings.
|
|
58
|
+
|
|
59
|
+
**LLMOps** — `fc-rag` is a fully local RAG pipeline using fastembed for embeddings, Qdrant (embedded mode) for vector search, and Ollama for local LLM inference — no text ever leaves your machine.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Security
|
|
64
|
+
|
|
65
|
+
FireCloud uses **HMAC-SHA-256 with a network-derived key** for chunk addressing instead of plain SHA-256. This raises the cost of confirmation-of-file attacks — an attacker who suspects a specific file is stored cannot verify its presence by computing chunk hashes from the plaintext, because valid chunk IDs require the network key. This protection holds as long as the network key remains confidential.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## AI/ML Extensions
|
|
70
|
+
|
|
71
|
+
FireCloud stores and retrieves encrypted content. The RAG and artifact layers run entirely on the client — nothing in plaintext crosses the server boundary.
|
|
72
|
+
|
|
73
|
+
### Private RAG (`fc-rag`)
|
|
74
|
+
|
|
75
|
+
Index your docs locally and query with a private LLM — no data leaves your machine.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install "firecloud-devnet[rag]"
|
|
79
|
+
fc-rag index ./docs
|
|
80
|
+
fc-rag query "How does FireCloud handle node departure?"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### MLOps Artifact Store (`fc-mlops`)
|
|
84
|
+
|
|
85
|
+
Version-track ML models, datasets, and checkpoints using FireCloud as the storage backend.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pip install "firecloud-devnet[mlops]"
|
|
89
|
+
fc-ml save ./model.pt --name resnet --version 1.0.0 --type model --metric accuracy=0.94
|
|
90
|
+
fc-ml simulate-failure
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Development
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone https://github.com/rajashekharsunkara/firecloud.git
|
|
99
|
+
cd firecloud
|
|
100
|
+
pip install -e ".[dev]"
|
|
101
|
+
pytest tests/ -v
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
services:
|
|
2
|
+
bootstrap-node:
|
|
3
|
+
build: .
|
|
4
|
+
container_name: firecloud-bootstrap
|
|
5
|
+
ports:
|
|
6
|
+
- "7474:7474"
|
|
7
|
+
volumes:
|
|
8
|
+
- fc-bootstrap-data:/data
|
|
9
|
+
environment:
|
|
10
|
+
- FIRECLOUD_PASSPHRASE=${FIRECLOUD_PASSPHRASE}
|
|
11
|
+
- FIRECLOUD_MAX_STORAGE_GB=${FIRECLOUD_MAX_STORAGE_GB:-10}
|
|
12
|
+
- FIRECLOUD_DATA_DIR=/data
|
|
13
|
+
command: ["start", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7474", "--storage", "/data"]
|
|
14
|
+
healthcheck:
|
|
15
|
+
test: ["CMD", "firecloud", "status", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--storage", "/data"]
|
|
16
|
+
interval: 30s
|
|
17
|
+
timeout: 10s
|
|
18
|
+
retries: 3
|
|
19
|
+
restart: unless-stopped
|
|
20
|
+
networks:
|
|
21
|
+
- firecloud-net
|
|
22
|
+
|
|
23
|
+
storage-node-1:
|
|
24
|
+
build: .
|
|
25
|
+
container_name: firecloud-node-1
|
|
26
|
+
ports:
|
|
27
|
+
- "7475:7475"
|
|
28
|
+
volumes:
|
|
29
|
+
- fc-node1-data:/data
|
|
30
|
+
environment:
|
|
31
|
+
- FIRECLOUD_PASSPHRASE=${FIRECLOUD_PASSPHRASE}
|
|
32
|
+
- FIRECLOUD_BOOTSTRAP=bootstrap-node:7474
|
|
33
|
+
- FIRECLOUD_MAX_STORAGE_GB=${FIRECLOUD_MAX_STORAGE_GB:-10}
|
|
34
|
+
- FIRECLOUD_DATA_DIR=/data
|
|
35
|
+
command: ["start", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7475", "--storage", "/data"]
|
|
36
|
+
healthcheck:
|
|
37
|
+
test: ["CMD", "firecloud", "status", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7475", "--storage", "/data"]
|
|
38
|
+
interval: 30s
|
|
39
|
+
timeout: 10s
|
|
40
|
+
retries: 3
|
|
41
|
+
restart: unless-stopped
|
|
42
|
+
depends_on:
|
|
43
|
+
- bootstrap-node
|
|
44
|
+
networks:
|
|
45
|
+
- firecloud-net
|
|
46
|
+
|
|
47
|
+
storage-node-2:
|
|
48
|
+
build: .
|
|
49
|
+
container_name: firecloud-node-2
|
|
50
|
+
ports:
|
|
51
|
+
- "7476:7476"
|
|
52
|
+
volumes:
|
|
53
|
+
- fc-node2-data:/data
|
|
54
|
+
environment:
|
|
55
|
+
- FIRECLOUD_PASSPHRASE=${FIRECLOUD_PASSPHRASE}
|
|
56
|
+
- FIRECLOUD_BOOTSTRAP=bootstrap-node:7474
|
|
57
|
+
- FIRECLOUD_MAX_STORAGE_GB=${FIRECLOUD_MAX_STORAGE_GB:-10}
|
|
58
|
+
- FIRECLOUD_DATA_DIR=/data
|
|
59
|
+
command: ["start", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7476", "--storage", "/data"]
|
|
60
|
+
healthcheck:
|
|
61
|
+
test: ["CMD", "firecloud", "status", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7476", "--storage", "/data"]
|
|
62
|
+
interval: 30s
|
|
63
|
+
timeout: 10s
|
|
64
|
+
retries: 3
|
|
65
|
+
restart: unless-stopped
|
|
66
|
+
depends_on:
|
|
67
|
+
- bootstrap-node
|
|
68
|
+
networks:
|
|
69
|
+
- firecloud-net
|
|
70
|
+
|
|
71
|
+
storage-node-3:
|
|
72
|
+
build: .
|
|
73
|
+
container_name: firecloud-node-3
|
|
74
|
+
ports:
|
|
75
|
+
- "7477:7477"
|
|
76
|
+
volumes:
|
|
77
|
+
- fc-node3-data:/data
|
|
78
|
+
environment:
|
|
79
|
+
- FIRECLOUD_PASSPHRASE=${FIRECLOUD_PASSPHRASE}
|
|
80
|
+
- FIRECLOUD_BOOTSTRAP=bootstrap-node:7474
|
|
81
|
+
- FIRECLOUD_MAX_STORAGE_GB=${FIRECLOUD_MAX_STORAGE_GB:-10}
|
|
82
|
+
- FIRECLOUD_DATA_DIR=/data
|
|
83
|
+
command: ["start", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7477", "--storage", "/data"]
|
|
84
|
+
healthcheck:
|
|
85
|
+
test: ["CMD", "firecloud", "status", "--passphrase", "${FIRECLOUD_PASSPHRASE}", "--port", "7477", "--storage", "/data"]
|
|
86
|
+
interval: 30s
|
|
87
|
+
timeout: 10s
|
|
88
|
+
retries: 3
|
|
89
|
+
restart: unless-stopped
|
|
90
|
+
depends_on:
|
|
91
|
+
- bootstrap-node
|
|
92
|
+
networks:
|
|
93
|
+
- firecloud-net
|
|
94
|
+
|
|
95
|
+
volumes:
|
|
96
|
+
fc-bootstrap-data:
|
|
97
|
+
fc-node1-data:
|
|
98
|
+
fc-node2-data:
|
|
99
|
+
fc-node3-data:
|
|
100
|
+
|
|
101
|
+
networks:
|
|
102
|
+
firecloud-net:
|
|
103
|
+
driver: bridge
|