mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-11 08:18:49 +00:00
feat: implement resource validation checks for production deployment
- Added a new ResourceChecker type to validate system resources including disk space, RAM, and CPU cores. - Implemented CheckDiskSpace, CheckRAM, and CheckCPU methods to ensure minimum requirements are met for production deployment. - Integrated resource checks into the ProductionSetup's Phase1CheckPrerequisites method to enhance deployment reliability. - Updated systemd service generation to log output to specific log files instead of the journal for better log management.
This commit is contained in:
parent
e9bf94ba96
commit
ed80b5b023
13
CHANGELOG.md
13
CHANGELOG.md
@ -13,6 +13,19 @@ The format is based on [Keep a Changelog][keepachangelog] and adheres to [Semant
|
||||
### Deprecated
|
||||
|
||||
### Fixed
|
||||
## [0.66.1] - 2025-11-11
|
||||
|
||||
### Added
|
||||
\n
|
||||
### Changed
|
||||
- Allow bootstrap nodes to optionally define a join address to synchronize with another bootstrap cluster.
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Removed
|
||||
|
||||
### Fixed
|
||||
\n
|
||||
## [0.66.0] - 2025-11-11
|
||||
|
||||
### 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.66.0
|
||||
VERSION := 0.66.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)'
|
||||
|
||||
@ -67,7 +67,7 @@ Use `make dev` for the complete stack or run binaries individually with `go run
|
||||
|
||||
All runtime configuration lives in `~/.debros/`.
|
||||
|
||||
- `bootstrap.yaml`: `type: bootstrap`, blank `database.rqlite_join_address`
|
||||
- `bootstrap.yaml`: `type: bootstrap`, optionally set `database.rqlite_join_address` to join another bootstrap's cluster
|
||||
- `node*.yaml`: `type: node`, set `database.rqlite_join_address` (e.g. `localhost:7001`) and include the bootstrap `discovery.bootstrap_peers`
|
||||
- `gateway.yaml`: configure `gateway.bootstrap_peers`, `gateway.namespace`, and optional auth flags
|
||||
|
||||
@ -75,7 +75,7 @@ Validation reminders:
|
||||
|
||||
- HTTP and Raft ports must differ
|
||||
- Non-bootstrap nodes require a join address and bootstrap peers
|
||||
- Bootstrap nodes cannot define a join address
|
||||
- Bootstrap nodes can optionally define a join address to synchronize with another bootstrap
|
||||
- Multiaddrs must end with `/p2p/<peerID>`
|
||||
|
||||
Regenerate configs any time with `./bin/dbn config init --force`.
|
||||
|
||||
@ -493,12 +493,7 @@ func (c *Config) validateCrossFields() []error {
|
||||
}
|
||||
|
||||
// Cross-check rqlite_join_address vs node type
|
||||
if c.Node.Type == "bootstrap" && c.Database.RQLiteJoinAddress != "" {
|
||||
errs = append(errs, ValidationError{
|
||||
Path: "database.rqlite_join_address",
|
||||
Message: "must be empty for bootstrap node type",
|
||||
})
|
||||
}
|
||||
// Note: Bootstrap nodes can optionally join another bootstrap's cluster
|
||||
|
||||
if c.Node.Type == "node" && c.Database.RQLiteJoinAddress == "" {
|
||||
errs = append(errs, ValidationError{
|
||||
|
||||
@ -183,7 +183,7 @@ func TestValidateRQLiteJoinAddress(t *testing.T) {
|
||||
}{
|
||||
{"node with join", "node", "localhost:5001", false},
|
||||
{"node without join", "node", "", true},
|
||||
{"bootstrap with join", "bootstrap", "localhost:5001", true},
|
||||
{"bootstrap with join", "bootstrap", "localhost:5001", false},
|
||||
{"bootstrap without join", "bootstrap", "", false},
|
||||
{"invalid join format", "node", "localhost", true},
|
||||
{"invalid join port", "node", "localhost:99999", true},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user