Commit Graph

24 Commits

Author SHA1 Message Date
Jesús Pérez
b0f0655a71
chore: ignore .cache 2025-09-24 01:57:33 +01:00
Jesús Pérez
1697d0a39e
chore: fix config examples location 2025-09-24 01:56:12 +01:00
Jesús Pérez
3c3ef47f7f
feat(taskserv): implement real-time version checking with configurable HTTP client
- Add: GitHub API integration for live version checking in taskserv management
- Add: HTTP client configuration option (http.use_curl) in config.defaults.toml
- Add: Helper function fetch_latest_version with curl/http get support
- Fix: Settings path structure for prov_data_dirpath access pattern
- Remove: Legacy simulation code for version checking
- Update: Core configuration name from "provisioning-system" to "provisioning"
- Clean: Remove obsolete example configs and infrastructure files
2025-09-24 01:55:06 +01:00
Jesús Pérez
38a7470da0
feat(config): complete config-driven architecture migration
Finalize the config-driven architecture migration with comprehensive
configuration expansion and environment variable replacement.

Major Changes:
- config.defaults.toml: Add 54 new configuration sections for complete system coverage
  * Tool detection and plugin configuration
  * AI integration settings
  * SSH configuration options
  * Extension system configuration
  * Key Management Service (KMS) settings
- core/nulib/env.nu: Replace 81 environment variables with config-driven accessors
  * Convert all context-based lookups to config-get calls
  * Maintain backward compatibility with existing ENV variables
  * Streamline configuration loading and validation
- core/versions: Update Nushell version requirement to 0.107.1

New Files:
- core/nulib/lib_provisioning/utils/git-commit-msg.nu: Add git commit message utilities
- utils/commit-msg.nu: Add commit message generation helper

This completes the v2.0.0 config-driven architecture migration, replacing
200+ environment variables with hierarchical configuration management.
2025-09-23 13:25:31 +01:00
Jesús Pérez
6c538b62c8
feat: Complete config-driven architecture migration v2.0.0
Transform provisioning system from ENV-based to hierarchical config-driven architecture.
This represents a complete system redesign with breaking changes requiring migration.

## Migration Summary
- 65+ files migrated across entire codebase
- 200+ ENV variables replaced with 476 config accessors
- 29 syntax errors fixed across 17 files
- 92% token efficiency maintained during migration

## Core Features Added

### Hierarchical Configuration System
- 6-layer precedence: defaults → user → project → infra → env → runtime
- Deep merge strategy with intelligent precedence rules
- Multi-environment support (dev/test/prod) with auto-detection
- Configuration templates for all environments

### Enhanced Interpolation Engine
- Dynamic variables: {{paths.base}}, {{env.HOME}}, {{now.date}}
- Git context: {{git.branch}}, {{git.commit}}, {{git.remote}}
- SOPS integration: {{sops.decrypt()}} for secrets management
- Path operations: {{path.join()}} for dynamic construction
- Security: circular dependency detection, injection prevention

### Comprehensive Validation
- Structure, path, type, semantic, and security validation
- Code injection and path traversal detection
- Detailed error reporting with actionable messages
- Configuration health checks and warnings

## Architecture Changes

### Configuration Management (core/nulib/lib_provisioning/config/)
- loader.nu: 1600+ line hierarchical config loader with validation
- accessor.nu: 476 config accessor functions replacing ENV vars

### Provider System (providers/)
- AWS, UpCloud, Local providers fully config-driven
- Unified middleware system with standardized interfaces

### Task Services (core/nulib/taskservs/)
- Kubernetes, storage, networking, registry services migrated
- Template-driven configuration generation

### Cluster Management (core/nulib/clusters/)
- Complete lifecycle management through configuration
- Environment-specific cluster templates

## New Configuration Files
- config.defaults.toml: System defaults (84 lines)
- config.*.toml.example: Environment templates (400+ lines each)
- Enhanced CLI: validate, env, multi-environment support

## Security Enhancements
- Type-safe configuration access through validated functions
- SOPS integration for encrypted secrets management
- Input validation preventing injection attacks
- Environment isolation and access controls

## Breaking Changes
⚠️  ENV variables no longer supported as primary configuration
⚠️  Function signatures require --config parameter
⚠️  CLI arguments and return types modified
⚠️  Provider authentication now config-driven

## Migration Path
1. Backup current environment variables
2. Copy config.user.toml.example → config.user.toml
3. Migrate ENV vars to TOML format
4. Validate: ./core/nulib/provisioning validate config
5. Test functionality with new configuration

## Validation Results
 Structure valid
 Paths valid
 Types valid
 Semantic rules valid
 File references valid

System ready for production use with config-driven architecture.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 03:36:50 +01:00
Jesús Pérez
9408775f25
chore: fix exclude paths 2025-09-23 03:31:03 +01:00
Jesús Pérez
37ee6486d5 fix: resolve all syntax errors in provisioning modules
Fixed 29 syntax errors across 4 modules:
- servers/ (6 files, 13 errors): Fixed parentheses in PROVISIONING_ARGS expressions
- taskservs/ (4 files, 6 errors): Fixed parentheses in string interpolation
- main_provisioning/ (3 files, 3 errors): Fixed environment variable access
- lib_provisioning/utils/ (2 files, 2 errors): Fixed standalone env access

Pattern fixed:
- $"($env.PROVISIONING_ARGS? | default "") " → $"(($env.PROVISIONING_ARGS? | default "")) "
- $env.PROVISIONING_ARGS? | default "" → ($env.PROVISIONING_ARGS? | default "")

All modules now have valid Nushell syntax for proper parsing.
2025-09-23 00:00:01 +01:00
Jesús Pérez
1743dc82c2 test: validate migrated modules 2025-09-22 23:48:01 +01:00
Jesús Pérez
db75bb88f1 chore: complete analysis phase - syntax and env references 2025-09-22 23:47:59 +01:00
Jesús Pérez
19d2d1ae58 feat: add token-efficient migration agent scripts
- 01_analyze_syntax.sh: Find syntax errors (~1500 tokens)
- 02_fix_syntax.sh: Fix syntax in specific files (~1000 tokens)
- 03_analyze_env.sh: Find ENV references (~1200 tokens)
- 04_migrate_env.sh: Migrate ENV to config (~1500 tokens)
- 05_test_module.sh: Test modules after migration (~800 tokens)
- migration_coordinator.sh: Orchestrate complete migration
- README.md: Usage instructions and safety features

Total migration cost: ~15-20k tokens vs 50k+ monolithic approach
2025-09-22 23:44:56 +01:00
Jesús Pérez
0a837aed54 feat: add config module and agent setup for migration
- Add config module from backup (loader, accessor, migration)
- Add agent reference cards for token-efficient migration
- Add migration knowledge base and instructions
- Ready to start systematic config-driven migration
2025-09-22 23:36:59 +01:00
Jesús Pérez
a509868257 feat: initialize migration infrastructure on config-driven branch 2025-09-22 23:31:29 +01:00
Jesús Pérez
50745b0f22 chore: add current provisioning state before migration 2025-09-22 23:11:41 +01:00
Jesús Pérez
a9703b4748 chore: update .gitignore before config-driven migration 2025-09-22 23:11:31 +01:00
Jesús Pérex
77b63ef3c8
chore: check 2025-07-10 21:41:03 +01:00
Jesús Pérex
56c8a3fff0
add 2025-07-10 21:35:28 +01:00
Jesús Pérex
05bf246ac9
chore: change title 2025-07-10 21:32:57 +01:00
Jesús Pérex
0d9b5e8380 chore: add resources with images 2025-07-10 21:20:33 +01:00
Jesús Pérex
f4cebb8854 chore: update README 2025-07-10 21:19:18 +01:00
197c507c12
chore: fix content 2024-08-14 19:54:17 +01:00
0cad980ff4
chore: fix content 2024-08-14 19:52:23 +01:00
3cb5ed77a9
chore: fix content 2024-08-14 19:49:34 +01:00
a650280a6f
chore: fix content 2024-08-14 19:47:40 +01:00
85d4cfd099
init repo 2024-08-14 19:45:09 +01:00