INFRA CONSOLIDATION - nself-org/cli GitHub Wiki

Infrastructure Command Consolidation

Migration Guide: v0.9.6 โ†’ v1.0.0

Overview

In nself v1.0.0, all infrastructure-related commands have been consolidated under a single infra command for better organization and discoverability.

What Changed

Old Structure (v0.9.5)

  • nself provider - Cloud provider management
  • nself cloud - Alias for provider (deprecated)
  • nself k8s - Kubernetes management
  • nself helm - Helm chart management

New Structure (v1.0.0)

  • nself infra provider - Cloud provider infrastructure
  • nself infra k8s - Kubernetes infrastructure
  • nself infra helm - Helm chart management

Complete Migration Map

Provider Commands

Old Command New Command Status
nself provider list nself infra provider list โœ… Working
nself provider init <name> nself infra provider init <name> โœ… Working
nself provider validate nself infra provider validate โœ… Working
nself provider show <name> nself infra provider show <name> โœ… Working
nself provider server create nself infra provider server create โœ… Working
nself provider server list nself infra provider server list โœ… Working
nself provider server ssh <id> nself infra provider server ssh <id> โœ… Working
nself provider cost estimate nself infra provider cost estimate โœ… Working
nself provider cost compare nself infra provider cost compare โœ… Working

Kubernetes Commands

Old Command New Command Status
nself k8s init nself infra k8s init โœ… Working
nself k8s convert nself infra k8s convert โœ… Working
nself k8s apply nself infra k8s apply โœ… Working
nself k8s deploy nself infra k8s deploy โœ… Working
nself k8s status nself infra k8s status โœ… Working
nself k8s logs <pod> nself infra k8s logs <pod> โœ… Working
nself k8s scale <dep> <n> nself infra k8s scale <dep> <n> โœ… Working
nself k8s rollback nself infra k8s rollback โœ… Working
nself k8s delete nself infra k8s delete โœ… Working
nself k8s cluster <action> nself infra k8s cluster <action> โœ… Working
nself k8s namespace <action> nself infra k8s namespace <action> โœ… Working

Helm Commands

Old Command New Command Status
nself helm init nself infra helm init โœ… Working
nself helm generate nself infra helm generate โœ… Working
nself helm install <release> nself infra helm install <release> โœ… Working
nself helm upgrade <release> nself infra helm upgrade <release> โœ… Working
nself helm rollback <release> nself infra helm rollback <release> โœ… Working
nself helm uninstall <release> nself infra helm uninstall <release> โœ… Working
nself helm list nself infra helm list โœ… Working
nself helm status <release> nself infra helm status <release> โœ… Working
nself helm values <release> nself infra helm values <release> โœ… Working
nself helm template nself infra helm template โœ… Working
nself helm package nself infra helm package โœ… Working
nself helm repo <action> nself infra helm repo <action> โœ… Working

Deprecation Warnings

Old commands still work but show deprecation warnings:

$ nself cloud list
โš  DEPRECATION: 'nself cloud' is deprecated and will be removed in v1.0.0
             Please use 'nself infra provider' instead.
             https://docs.nself.org/migration/cloud-to-infra

# ... then shows provider list ...

Backward Compatibility

All old commands continue to work through v0.9.x releases with deprecation warnings. They will be removed in v1.0.0.

Compatibility Wrappers

  • nself cloud โ†’ redirects to nself infra provider
  • nself provider โ†’ still works directly (no redirect needed yet)
  • nself k8s โ†’ still works directly (no redirect needed yet)
  • nself helm โ†’ still works directly (no redirect needed yet)

Benefits of Consolidation

  1. Better Organization: All infrastructure commands in one place
  2. Clearer Hierarchy: infra clearly indicates infrastructure management
  3. Easier Discovery: nself infra --help shows all 38 infrastructure subcommands
  4. Consistent Patterns: Matches other consolidated commands (auth, service, config)
  5. Reduced Top-Level Clutter: Fewer commands at top level (79 โ†’ 31)

Total Subcommands

The nself infra command consolidates 38 subcommands across three categories:

  • Provider: 14 subcommands
  • K8s: 11 subcommands
  • Helm: 12 subcommands

Migration Timeline

  • v0.9.5: Old commands work, no warnings
  • v0.9.6: Old commands work, deprecation warnings shown
  • v1.0.0: Old commands removed, must use new infra structure

Quick Reference

Provider Management

# List providers
nself infra provider list

# Initialize provider
nself infra provider init digitalocean

# Create server
nself infra provider server create --provider hetzner --size medium

# SSH to server
nself infra provider server ssh myserver

# Compare costs
nself infra provider cost compare

Kubernetes

# Initialize K8s
nself infra k8s init

# Convert compose to manifests
nself infra k8s convert

# Deploy
nself infra k8s deploy

# Check status
nself infra k8s status

# Scale deployment
nself infra k8s scale api --replicas 3

Helm

# Initialize chart
nself infra helm init

# Generate from compose
nself infra helm generate

# Install release
nself infra helm install myapp

# Upgrade release
nself infra helm upgrade myapp

# View releases
nself infra helm list

Support

For questions or issues with migration:

โš ๏ธ **GitHub.com Fallback** โš ๏ธ