chore: update md
This commit is contained in:
parent
74f5c7b540
commit
c93557c78d
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
RUN_PATH=$(dirname "$(dirname "$0")")
|
||||
#if [ -d "$RUN_PATH/etcdcerts" ] ; then
|
||||
#if [ -d "$RUN_PATH/etcdcerts" ] ; then
|
||||
# rm -rf "$RUN_PATH/etcdcerts"
|
||||
#fi
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Info: KCL Settings for {{kloud_title | default (value=kloud_name)}} services with provisioning
|
||||
# Author: JesusPerez jesus@cloudnative.zone
|
||||
# Info: KCL Settings for {{kloud_title | default (value=kloud_name)}} services with provisioning
|
||||
# Author: JesusPerez jesus@cloudnative.zone
|
||||
# Release: 0.0.1
|
||||
# Date: 7-07-2024
|
||||
|
||||
@ -9,7 +9,7 @@ provisioning.Settings {
|
||||
main_name = "{{kloud_name}}"
|
||||
main_title = "{{kloud_title | default (value=kloud_name)}}"
|
||||
# Settings Data is AUTO Generated, Checked and AUTO Filled during operations taskservs
|
||||
# Path for Automatic generated setings for VPC, Subnets, SG, etc.
|
||||
# Path for Automatic generated setings for VPC, Subnets, SG, etc.
|
||||
#settings_path = "${provider}_settings.yaml"
|
||||
#settings_path = "provider_settings.yaml"
|
||||
# Directory path to collect created infos, taskservs
|
||||
@ -26,12 +26,12 @@ provisioning.Settings {
|
||||
runset = {
|
||||
# Wait until requested taskserv is completed: true or false
|
||||
wait = True
|
||||
# Format for output: human (defaul) | yaml | json
|
||||
# Server info can be requested with: upclt server show HOSTNAME -o yaml
|
||||
# Format for output: human (defaul) | yaml | json
|
||||
# Server info can be requested with: upclt server show HOSTNAME -o yaml
|
||||
output_format = "yaml"
|
||||
# Output path to copy results
|
||||
# Output path to copy results
|
||||
output_path = "tmp/NOW"
|
||||
# Inventory file
|
||||
# Inventory file
|
||||
inventory_file = "inventory.yaml"
|
||||
# Use 'time' to get time info for commands if is not empty
|
||||
use_time = True
|
||||
@ -42,11 +42,11 @@ provisioning.Settings {
|
||||
#cluster_admin_host: 3.249.232.11
|
||||
# Cluster clusters admin hosts port to connect via SSH
|
||||
cluster_admin_port = 22
|
||||
# Time to wait in seconds for servers for started state and ssh
|
||||
# Time to wait in seconds for servers for started state and ssh
|
||||
servers_wait_started = 40
|
||||
# Cluster clusters admin user connect via SSH
|
||||
#cluster_admin_user = "root" if provider != "aws" else "admin"
|
||||
cluster_admin_user = "root"
|
||||
cluster_admin_user = "root"
|
||||
clusters_save_path = "/${main_name}/clusters"
|
||||
#clusters_paths = [ "clusters" ]
|
||||
servers_paths = [ "defs/servers" ]
|
||||
|
||||
@ -27,7 +27,7 @@ Setup and manage platform service configurations in `provisioning/config/runtime
|
||||
# 2. Service (if TypeDialog/Quick)
|
||||
# 3. Mode (solo/multiuser/cicd/enterprise)
|
||||
# 4. Backend (web/tui/cli, if TypeDialog)
|
||||
```
|
||||
```bash
|
||||
|
||||
### Command-Line Options
|
||||
|
||||
@ -54,13 +54,13 @@ Setup and manage platform service configurations in `provisioning/config/runtime
|
||||
|
||||
# Clean all runtime configurations
|
||||
./provisioning/scripts/setup-platform-config.sh --clean
|
||||
```
|
||||
```bash
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Initial Setup (Empty Runtime)
|
||||
|
||||
```
|
||||
```bash
|
||||
Interactive Prompt
|
||||
↓
|
||||
├─ TypeDialog (Recommended)
|
||||
@ -75,11 +75,11 @@ Interactive Prompt
|
||||
├─ Compose all services: defaults + mode overlay
|
||||
├─ Create 8 .ncl files
|
||||
└─ Auto-export to 8 .toml files
|
||||
```
|
||||
```bash
|
||||
|
||||
### 2. Update Existing Configuration
|
||||
|
||||
```
|
||||
```bash
|
||||
Detect Existing Config
|
||||
↓
|
||||
Choose Action:
|
||||
@ -87,11 +87,11 @@ Choose Action:
|
||||
├─ Update via TypeDialog (edit existing)
|
||||
├─ Use quick mode (regenerate)
|
||||
└─ List current configs
|
||||
```
|
||||
```bash
|
||||
|
||||
### 3. Manual NCL Edits
|
||||
|
||||
```
|
||||
```bash
|
||||
User edits: provisioning/config/runtime/orchestrator.solo.ncl
|
||||
↓
|
||||
Run: ./setup-platform-config.sh --generate-toml
|
||||
@ -99,13 +99,13 @@ Run: ./setup-platform-config.sh --generate-toml
|
||||
Auto-exports to: provisioning/config/runtime/generated/orchestrator.solo.toml
|
||||
↓
|
||||
Service loads TOML automatically
|
||||
```
|
||||
```bash
|
||||
|
||||
## Configuration Layers
|
||||
|
||||
The script composes configurations from multiple layers:
|
||||
|
||||
```
|
||||
```bash
|
||||
1. Schema (TYPE-SAFE CONTRACT)
|
||||
↓
|
||||
provisioning/schemas/platform/schemas/orchestrator.ncl
|
||||
@ -135,13 +135,13 @@ The script composes configurations from multiple layers:
|
||||
↓
|
||||
provisioning/config/runtime/generated/orchestrator.solo.toml
|
||||
(Rust service reads this)
|
||||
```
|
||||
```bash
|
||||
|
||||
## Services & Modes
|
||||
|
||||
### 8 Available Services
|
||||
|
||||
```
|
||||
```bash
|
||||
1. orchestrator - Main orchestration engine
|
||||
2. control-center - Web UI and management console
|
||||
3. mcp-server - Model Context Protocol server
|
||||
@ -150,12 +150,12 @@ The script composes configurations from multiple layers:
|
||||
6. rag - Retrieval-Augmented Generation
|
||||
7. ai-service - AI model integration
|
||||
8. provisioning-daemon - Background operations
|
||||
```
|
||||
```bash
|
||||
|
||||
### 4 Deployment Modes
|
||||
|
||||
| Mode | Specs | Use Case |
|
||||
|------|-------|----------|
|
||||
| ------ | ------- | ---------- |
|
||||
| `solo` | 2 CPU, 4GB RAM | Development, testing |
|
||||
| `multiuser` | 4 CPU, 8GB RAM | Team staging |
|
||||
| `cicd` | 8 CPU, 16GB RAM | CI/CD pipelines |
|
||||
@ -163,7 +163,7 @@ The script composes configurations from multiple layers:
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
```bash
|
||||
provisioning/
|
||||
├── config/
|
||||
│ └── runtime/ # 🔒 PRIVATE (gitignored)
|
||||
@ -187,7 +187,7 @@ provisioning/
|
||||
│
|
||||
└── scripts/
|
||||
└── setup-platform-config.sh # This script
|
||||
```
|
||||
```bash
|
||||
|
||||
## Requirements
|
||||
|
||||
@ -211,7 +211,7 @@ The `setup-platform-config.sh` script is a **standalone tool** ready to use inde
|
||||
# Step 2: Run services
|
||||
export ORCHESTRATOR_MODE=solo
|
||||
cargo run -p orchestrator
|
||||
```
|
||||
```bash
|
||||
|
||||
### Future: When Installer is Implemented
|
||||
|
||||
@ -241,7 +241,7 @@ echo "Building platform services..."
|
||||
cargo build -p orchestrator -p control-center -p mcp-server
|
||||
|
||||
echo "Installation complete!"
|
||||
```
|
||||
```bash
|
||||
|
||||
### CI/CD Integration (Available Now)
|
||||
|
||||
@ -261,7 +261,7 @@ cargo test --all
|
||||
|
||||
# Deploy
|
||||
docker-compose -f provisioning/platform/infrastructure/docker/docker-compose.cicd.yml up
|
||||
```
|
||||
```bash
|
||||
|
||||
## Important Notes
|
||||
|
||||
@ -272,7 +272,7 @@ If you manually edit `.ncl` files in `provisioning/config/runtime/`:
|
||||
```bash
|
||||
# Always regenerate TOMLs afterward
|
||||
./provisioning/scripts/setup-platform-config.sh --generate-toml
|
||||
```
|
||||
```bash
|
||||
|
||||
### 🔒 Private Configurations
|
||||
|
||||
@ -296,7 +296,7 @@ The script is **idempotent** - run it multiple times safely:
|
||||
./provisioning/scripts/setup-platform-config.sh --quick-mode --mode multiuser
|
||||
|
||||
# Does NOT overwrite manually edited files (unless --clean is used)
|
||||
```
|
||||
```bash
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
@ -308,7 +308,7 @@ nickel typecheck provisioning/config/runtime/orchestrator.solo.ncl
|
||||
|
||||
# View detailed error
|
||||
nickel export --format toml provisioning/config/runtime/orchestrator.solo.ncl
|
||||
```
|
||||
```bash
|
||||
|
||||
### TOML Export Fails
|
||||
|
||||
@ -318,7 +318,7 @@ nickel typecheck provisioning/config/runtime/orchestrator.solo.ncl
|
||||
|
||||
# Try manual export
|
||||
nickel export --format toml provisioning/config/runtime/orchestrator.solo.ncl
|
||||
```
|
||||
```bash
|
||||
|
||||
### Service Won't Start
|
||||
|
||||
@ -331,7 +331,7 @@ cat provisioning/config/runtime/generated/orchestrator.solo.toml | head -20
|
||||
|
||||
# Verify service can read TOML
|
||||
ORCHESTRATOR_MODE=solo cargo run -p orchestrator --
|
||||
```
|
||||
```bash
|
||||
|
||||
## Examples
|
||||
|
||||
@ -350,7 +350,7 @@ ORCHESTRATOR_MODE=solo cargo run -p orchestrator --
|
||||
# Run service:
|
||||
export ORCHESTRATOR_MODE=solo
|
||||
cargo run -p orchestrator
|
||||
```
|
||||
```bash
|
||||
|
||||
### Example 2: Interactive TypeDialog Setup
|
||||
|
||||
@ -369,7 +369,7 @@ cargo run -p orchestrator
|
||||
# Run service:
|
||||
export ORCHESTRATOR_MODE=multiuser
|
||||
cargo run -p orchestrator
|
||||
```
|
||||
```bash
|
||||
|
||||
### Example 3: Update After Manual Edit
|
||||
|
||||
@ -386,7 +386,7 @@ cat provisioning/config/runtime/generated/orchestrator.solo.toml | head -20
|
||||
# Restart service with new config
|
||||
pkill orchestrator
|
||||
ORCHESTRATOR_MODE=solo cargo run -p orchestrator
|
||||
```
|
||||
```bash
|
||||
|
||||
## Performance Notes
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user