Enhance deployment system with retry functionality and improved UX

Major Improvements:
- Added retry deployment buttons in machine list for failed deployments
- Added retry button in SSH console modal footer for enhanced UX
- Enhanced deployment process with comprehensive cleanup of existing services
- Improved binary installation with password-based sudo authentication
- Updated configuration generation to include all required sections (agent, ai, network, security)
- Fixed deployment verification and error handling

Security Enhancements:
- Enhanced verifiedStopExistingServices with thorough cleanup process
- Improved binary copying with proper sudo authentication
- Added comprehensive configuration validation

UX Improvements:
- Users can retry deployments without re-running machine discovery
- Retry buttons available from both machine list and console modal
- Real-time deployment progress with detailed console output
- Clear error states with actionable retry options

Technical Changes:
- Modified ServiceDeployment.tsx with retry button components
- Enhanced api/setup_manager.go with improved deployment functions
- Updated main.go with command line argument support (--config, --setup)
- Added comprehensive zero-trust security validation system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-08-31 10:23:27 +10:00
parent df4d98bf30
commit be761cfe20
234 changed files with 7508 additions and 38528 deletions

View File

@@ -39,15 +39,13 @@ func (psa *PubSubAdapter) SubscribeToTopic(topic string, handler func([]byte)) e
// PublishToTopic implements PubSubInterface for health checks
func (psa *PubSubAdapter) PublishToTopic(topic string, data interface{}) error {
// Convert data to JSON for publishing
jsonData, err := json.Marshal(data)
if err != nil {
return err
}
// Use the existing pubsub publish mechanism
// Note: This would need to be adapted to the actual pubsub interface
return psa.pubsub.PublishBzzzMessage(pubsub.MessageType(topic), data)
// Convert data to proper map format
dataMap, ok := data.(map[string]interface{})
if !ok {
dataMap = map[string]interface{}{"data": data}
}
return psa.pubsub.PublishBzzzMessage(pubsub.MessageType(topic), dataMap)
}
// DHTAdapter adapts various DHT implementations to the health check interface
@@ -73,7 +71,7 @@ func (da *DHTAdapter) PutValue(ctx context.Context, key string, value []byte) er
if encryptedDHT, ok := da.dht.(*dht.EncryptedDHTStorage); ok {
// For encrypted storage, we need to adapt the interface
return encryptedDHT.StoreContent(ctx, key, value)
return encryptedDHT.StoreUCXLContent(key, value, "system", "test")
}
// If we can't identify the type, return an error
@@ -93,7 +91,7 @@ func (da *DHTAdapter) GetValue(ctx context.Context, key string) ([]byte, error)
if encryptedDHT, ok := da.dht.(*dht.EncryptedDHTStorage); ok {
// For encrypted storage, we need to adapt the interface
content, err := encryptedDHT.RetrieveContent(ctx, key)
content, _, err := encryptedDHT.RetrieveUCXLContent(key)
if err != nil {
return nil, err
}

View File

@@ -2,7 +2,6 @@ package health
import (
"context"
"encoding/json"
"fmt"
"math"
"sync"