mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-11 07:58:50 +00:00
chore: update README and configuration for improved clarity and functionality
- Removed outdated feature list from README for a more concise overview. - Updated health check instructions and command references in the README. - Changed `make down` to `make stop` for consistency in stopping the development environment. - Enhanced the configuration in `config.go` to include additional RQLite and Raft addresses for better node communication. - Adjusted the build process in the release workflow to ensure all necessary gateway files are included.
This commit is contained in:
parent
432952ed69
commit
670c3f99df
3
.github/workflows/release-apt.yml
vendored
3
.github/workflows/release-apt.yml
vendored
@ -58,7 +58,8 @@ jobs:
|
||||
mkdir -p build/usr/local/bin
|
||||
go build -ldflags "$LDFLAGS" -o build/usr/local/bin/orama cmd/cli/main.go
|
||||
go build -ldflags "$LDFLAGS" -o build/usr/local/bin/debros-node cmd/node/main.go
|
||||
go build -ldflags "$LDFLAGS" -o build/usr/local/bin/debros-gateway cmd/gateway/main.go
|
||||
# Build the entire gateway package so helper files (e.g., config parsing) are included
|
||||
go build -ldflags "$LDFLAGS" -o build/usr/local/bin/debros-gateway ./cmd/gateway
|
||||
|
||||
- name: Create Debian package structure
|
||||
run: |
|
||||
|
||||
15
CHANGELOG.md
15
CHANGELOG.md
@ -13,6 +13,21 @@ The format is based on [Keep a Changelog][keepachangelog] and adheres to [Semant
|
||||
### Deprecated
|
||||
|
||||
### Fixed
|
||||
## [0.72.1] - 2025-12-09
|
||||
|
||||
### Added
|
||||
\n
|
||||
### Changed
|
||||
- Cleaned up the README by removing outdated feature lists and complex examples, focusing on the Quick Start guide.
|
||||
- Updated development configuration to correctly set advertised addresses for RQLite, improving internal cluster communication.
|
||||
- Simplified the build process for the `debros-gateway` binary in the Debian release workflow.
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Removed
|
||||
|
||||
### Fixed
|
||||
\n
|
||||
## [0.72.0] - 2025-11-28
|
||||
|
||||
### Added
|
||||
|
||||
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ test-e2e:
|
||||
|
||||
.PHONY: build clean test run-node run-node2 run-node3 run-example deps tidy fmt vet lint clear-ports install-hooks kill
|
||||
|
||||
VERSION := 0.72.0
|
||||
VERSION := 0.72.1
|
||||
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||
DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.commit=$(COMMIT)' -X 'main.date=$(DATE)'
|
||||
|
||||
77
README.md
77
README.md
@ -2,14 +2,6 @@
|
||||
|
||||
A decentralized peer-to-peer data platform built in Go. Combines distributed SQL (RQLite), pub/sub messaging, and resilient peer discovery so applications can share state without central infrastructure.
|
||||
|
||||
## Features
|
||||
|
||||
- **Distributed SQL** - RQLite with Raft consensus
|
||||
- **Pub/Sub Messaging** - Topic-based with automatic cleanup
|
||||
- **Namespace Isolation** - Multi-tenant support
|
||||
- **Secure Transport** - LibP2P + Noise/TLS encryption
|
||||
- **Unified Gateway** - Single port access to all node services
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Local Development
|
||||
@ -22,18 +14,12 @@ make build
|
||||
make dev
|
||||
```
|
||||
|
||||
The cluster automatically performs health checks before declaring success. Check the output for:
|
||||
|
||||
- Node unified gateway ports (6001-6005)
|
||||
- IPFS API endpoints
|
||||
- Olric cache server
|
||||
- Peer connection status
|
||||
- Example curl commands
|
||||
The cluster automatically performs health checks before declaring success.
|
||||
|
||||
### Stop Development Environment
|
||||
|
||||
```bash
|
||||
make down
|
||||
make stop
|
||||
```
|
||||
|
||||
## Testing Services
|
||||
@ -49,13 +35,9 @@ Each node is accessible via a single unified gateway port:
|
||||
```bash
|
||||
# Node-1 (port 6001)
|
||||
curl http://node-1.local:6001/health
|
||||
curl http://node-1.local:6001/rqlite/http/db/execute -H "Content-Type: application/json" -d '{"sql":"SELECT 1"}'
|
||||
curl http://node-1.local:6001/cluster/health
|
||||
curl http://node-1.local:6001/ipfs/api/v0/version
|
||||
|
||||
# Node-2 (port 6002)
|
||||
curl http://node-2.local:6002/health
|
||||
curl http://node-2.local:6002/rqlite/http/db/execute -H "Content-Type: application/json" -d '{"sql":"SELECT 1"}'
|
||||
|
||||
# Node-3 (port 6003)
|
||||
curl http://node-3.local:6003/health
|
||||
@ -67,46 +49,6 @@ curl http://node-4.local:6004/health
|
||||
curl http://node-5.local:6005/health
|
||||
```
|
||||
|
||||
### Main Gateway
|
||||
|
||||
The main gateway provides `/v1/*` routes for RQLite, pub/sub, and storage:
|
||||
|
||||
```bash
|
||||
# Gateway health
|
||||
curl http://node-1.local:6001/health
|
||||
|
||||
# Gateway status
|
||||
curl http://node-1.local:6001/v1/status
|
||||
|
||||
# Network peers
|
||||
curl http://node-1.local:6001/v1/network/status
|
||||
|
||||
# Database query
|
||||
curl http://node-1.local:6001/v1/rqlite/query \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"sql":"SELECT 1"}'
|
||||
|
||||
# Pub/Sub topics
|
||||
curl http://node-1.local:6001/v1/pubsub/topics
|
||||
```
|
||||
|
||||
### Direct Service Access (Debugging)
|
||||
|
||||
Direct access to individual service ports without unified gateway:
|
||||
|
||||
```bash
|
||||
# RQLite HTTP (each node on its own port)
|
||||
curl http://localhost:5001/db/execute -H "Content-Type: application/json" -d '{"sql":"SELECT 1"}' # Bootstrap
|
||||
curl http://localhost:5002/db/execute -H "Content-Type: application/json" -d '{"sql":"SELECT 1"}' # Node2
|
||||
|
||||
# IPFS API
|
||||
curl http://localhost:4501/api/v0/version # Bootstrap IPFS
|
||||
curl http://localhost:4502/api/v0/version # Node2 IPFS
|
||||
|
||||
# Olric Cache
|
||||
curl http://localhost:3320/stats
|
||||
```
|
||||
|
||||
## Network Architecture
|
||||
|
||||
### Unified Gateway Ports
|
||||
@ -147,7 +89,7 @@ orama dev logs node-1 --follow # Follow logs in real-time
|
||||
orama dev logs gateway --follow # Gateway logs
|
||||
|
||||
# Stop all services
|
||||
orama dev down
|
||||
orama stop
|
||||
|
||||
# Build binaries
|
||||
make build
|
||||
@ -222,16 +164,7 @@ echo "deb https://debrosficial.github.io/network/apt stable main" | sudo tee /et
|
||||
|
||||
sudo apt update && sudo apt install orama
|
||||
|
||||
# Interactive installation (recommended)
|
||||
sudo orama install
|
||||
|
||||
# Or with flags - First node (creates new cluster)
|
||||
sudo orama install --vps-ip <public_ip> --domain node-1.example.com
|
||||
|
||||
# Joining existing cluster
|
||||
sudo orama install --vps-ip <public_ip> --domain node-2.example.com \
|
||||
--peers /ip4/<first_node_ip>/tcp/4001/p2p/<peer_id> \
|
||||
--cluster-secret <64-hex-secret>
|
||||
sudo orama install --interactive
|
||||
```
|
||||
|
||||
### Service Management
|
||||
@ -255,7 +188,7 @@ orama logs ipfs --follow
|
||||
|
||||
```bash
|
||||
# Upgrade to latest version
|
||||
sudo orama upgrade --restart [--branch nightly]
|
||||
sudo orama upgrade --interactive
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
@ -148,10 +148,13 @@ func (ce *ConfigEnsurer) ensureNodeConfig(nodeSpec NodeSpec, peerAddrs []string)
|
||||
DataDir: nodeDir,
|
||||
RQLiteHTTPPort: nodeSpec.RQLiteHTTPPort,
|
||||
RQLiteRaftPort: nodeSpec.RQLiteRaftPort,
|
||||
RQLiteRaftInternalPort: nodeSpec.RQLiteRaftPort,
|
||||
RQLiteJoinAddress: nodeSpec.RQLiteJoinTarget,
|
||||
BootstrapPeers: peerAddrs,
|
||||
ClusterAPIPort: nodeSpec.ClusterAPIPort,
|
||||
IPFSAPIPort: nodeSpec.IPFSAPIPort,
|
||||
HTTPAdvAddress: fmt.Sprintf("localhost:%d", nodeSpec.RQLiteHTTPPort),
|
||||
RaftAdvAddress: fmt.Sprintf("localhost:%d", nodeSpec.RQLiteRaftPort),
|
||||
UnifiedGatewayPort: nodeSpec.UnifiedGatewayPort,
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user