From c93557c78da94747290c0997b3eb2a5de537c228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Pe=CC=81rez?= Date: Mon, 12 Jan 2026 04:44:59 +0000 Subject: [PATCH] chore: update md --- .../generate/default/bin/on_deploy_remove | 4 +- generators/generate/default/settings.k.j2 | 18 +++---- scripts/setup-platform-config.sh.md | 52 +++++++++---------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/generators/generate/default/bin/on_deploy_remove b/generators/generate/default/bin/on_deploy_remove index 9fdee06..147d9d3 100755 --- a/generators/generate/default/bin/on_deploy_remove +++ b/generators/generate/default/bin/on_deploy_remove @@ -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 diff --git a/generators/generate/default/settings.k.j2 b/generators/generate/default/settings.k.j2 index 55f48dd..77b92c8 100644 --- a/generators/generate/default/settings.k.j2 +++ b/generators/generate/default/settings.k.j2 @@ -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" ] diff --git a/scripts/setup-platform-config.sh.md b/scripts/setup-platform-config.sh.md index 2a25b87..1788f26 100644 --- a/scripts/setup-platform-config.sh.md +++ b/scripts/setup-platform-config.sh.md @@ -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