From 93240f63001db6a65813058949fc57237743a85f Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Sun, 6 Jul 2025 14:34:58 -0700 Subject: [PATCH] Refactor wild-cluster-config-generate script; remove --force option and improve cluster secrets generation. Add wild-cluster-node-boot-assets-download script for downloading Talos installer images and assets. Update wild-setup-cluster to integrate new boot asset download process and adjust configuration steps. Clean up wild-setup-services and update documentation for clarity on new processes. --- bin/wild-cluster-config-generate | 96 ++------ ...=> wild-cluster-node-boot-assets-download} | 2 +- bin/wild-dnsmasq-install | 4 +- bin/wild-setup-cluster | 227 ++++++++---------- bin/wild-setup-services | 3 - docs/SETUP_FULL.md | 97 +++++--- scripts/common.sh | 11 +- setup/home-scaffold/.gitignore | 1 + 8 files changed, 190 insertions(+), 251 deletions(-) rename bin/{wild-cluster-node-image-create => wild-cluster-node-boot-assets-download} (99%) diff --git a/bin/wild-cluster-config-generate b/bin/wild-cluster-config-generate index 7cf1544..4c99830 100755 --- a/bin/wild-cluster-config-generate +++ b/bin/wild-cluster-config-generate @@ -11,7 +11,6 @@ usage() { echo "" echo "Options:" echo " -h, --help Show this help message" - echo " --force Force regeneration even if config already exists" echo "" echo "This script will:" echo " - Generate initial cluster secrets and configurations" @@ -19,8 +18,7 @@ usage() { echo " - Set up the foundation for node-specific machine configs" echo "" echo "Requirements:" - echo " - Must be run from a wild-cloud directory" - echo " - Cluster name and VIP must be configured" + echo " - Must be run from a Wild Cloud home directory" echo " - talosctl must be available in PATH" } @@ -32,10 +30,6 @@ while [[ $# -gt 0 ]]; do usage exit 0 ;; - --force) - FORCE=true - shift - ;; -*) echo "Unknown option $1" usage @@ -68,92 +62,40 @@ print_header "Talos Cluster Configuration Generation" NODE_SETUP_DIR="${WC_HOME}/setup/cluster-nodes" mkdir -p "${NODE_SETUP_DIR}/generated" -# Check if cluster configuration already exists +# Generate cluster secrets + if [ -f "${NODE_SETUP_DIR}/generated/secrets.yaml" ] && [ "$FORCE" = false ]; then - print_success "Cluster configuration already exists" - print_info "Generated files:" - for file in "${NODE_SETUP_DIR}/generated"/*.yaml; do - if [ -f "$file" ]; then - print_info " - $(basename "$file")" - fi - done - echo "" - print_info "Use --force to regenerate cluster configuration" + print_success "Cluster secrets already exists in ${NODE_SETUP_DIR}/generated/" exit 0 fi -# Get cluster configuration -CLUSTER_NAME=$(get_current_config "cluster.name") -VIP=$(get_current_config "cluster.nodes.control.vip") - -# Validate required configuration -if [ -z "$CLUSTER_NAME" ] || [ "$CLUSTER_NAME" = "null" ]; then - print_error "Cluster name not configured" - print_info "Please run 'wild-setup' first to configure cluster.name" - exit 1 +# Prepare directory for generated secrets +print_info "Generating new cluster secrets..." +if [ -d "${NODE_SETUP_DIR}/generated" ]; then + print_warning "Removing existing secrets directory..." + rm -rf "${NODE_SETUP_DIR}/generated" fi +mkdir -p "${NODE_SETUP_DIR}/generated" +talosctl gen secrets +print_info "New secrets will be generated in ${NODE_SETUP_DIR}/generated/" -if [ -z "$VIP" ] || [ "$VIP" = "null" ]; then - print_error "Control plane VIP not configured" - print_info "Please run 'wild-setup' first to configure cluster.nodes.control.vip" - exit 1 -fi +# Ensure we have the configuration we need. + +prompt_if_unset_config "cluster.name" "Cluster name" "wild-cluster" +CLUSTER_NAME=$(wild-config "cluster.name") + +prompt_if_unset_config "cluster.nodes.control.vip" "Control plane virtual IP (VIP)" +VIP=$(wild-config "cluster.nodes.control.vip") # Generate cluster configuration print_info "Generating initial cluster configuration..." print_info "Cluster name: $CLUSTER_NAME" print_info "Control plane endpoint: https://$VIP:6443" -if [ "$FORCE" = true ] && [ -d "${NODE_SETUP_DIR}/generated" ]; then - print_warning "Removing existing cluster configuration..." - rm -rf "${NODE_SETUP_DIR}/generated" - mkdir -p "${NODE_SETUP_DIR}/generated" -fi - cd "${NODE_SETUP_DIR}/generated" -talosctl gen secrets talosctl gen config --with-secrets secrets.yaml "$CLUSTER_NAME" "https://$VIP:6443" cd - >/dev/null # Verify generated files -REQUIRED_FILES=("secrets.yaml" "controlplane.yaml" "worker.yaml" "talosconfig") -MISSING_FILES=() - -for file in "${REQUIRED_FILES[@]}"; do - if [ ! -f "${NODE_SETUP_DIR}/generated/$file" ]; then - MISSING_FILES+=("$file") - fi -done - -if [ ${#MISSING_FILES[@]} -gt 0 ]; then - print_error "Some required files were not generated:" - for file in "${MISSING_FILES[@]}"; do - print_error " - $file" - done - exit 1 -fi - -print_success "Cluster configuration generated successfully!" -echo "" -print_info "Generated files:" -for file in "${NODE_SETUP_DIR}/generated"/*.yaml "${NODE_SETUP_DIR}/generated/talosconfig"; do - if [ -f "$file" ]; then - filesize=$(du -h "$file" | cut -f1) - print_success " ✓ $(basename "$file") ($filesize)" - fi -done - -echo "" -print_info "Configuration details:" -print_info " - Cluster name: $CLUSTER_NAME" -print_info " - Control plane endpoint: https://$VIP:6443" -print_info " - Generated in: ${NODE_SETUP_DIR}/generated/" - -echo "" -print_info "Next steps:" -echo " 1. Node-specific machine configs can now be generated" -echo " 2. Use wild-cluster-node-machine-config-generate for each node" -echo " 3. Apply configs to nodes with talosctl apply-config" -echo " 4. Bootstrap the first control plane node" print_success "Cluster configuration generation completed!" \ No newline at end of file diff --git a/bin/wild-cluster-node-image-create b/bin/wild-cluster-node-boot-assets-download similarity index 99% rename from bin/wild-cluster-node-image-create rename to bin/wild-cluster-node-boot-assets-download index 1245330..9cfd035 100755 --- a/bin/wild-cluster-node-image-create +++ b/bin/wild-cluster-node-boot-assets-download @@ -5,7 +5,7 @@ set -o pipefail # Usage function usage() { - echo "Usage: wild-cluster-node-image-create [options]" + echo "Usage: wild-cluster-node-boot-assets-download [options]" echo "" echo "Generate custom Talos installer image URLs for cluster nodes." echo "" diff --git a/bin/wild-dnsmasq-install b/bin/wild-dnsmasq-install index f695854..53d416a 100755 --- a/bin/wild-dnsmasq-install +++ b/bin/wild-dnsmasq-install @@ -105,7 +105,7 @@ if [ ! -f "${KERNEL_CACHE_PATH}" ] || [ ! -f "${INITRAMFS_CACHE_PATH}" ]; then echo " Kernel: ${KERNEL_CACHE_PATH}" echo " Initramfs: ${INITRAMFS_CACHE_PATH}" echo "" - echo "Please run 'wild-cluster-node-image-create' first to download and cache the assets." + echo "Please run 'wild-cluster-node-boot-assets-download' first to download and cache the assets." exit 1 fi @@ -135,7 +135,7 @@ if [ ! -f "${IPXE_EFI_CACHE}" ] || [ ! -f "${IPXE_BIOS_CACHE}" ] || [ ! -f "${IP echo " iPXE BIOS: ${IPXE_BIOS_CACHE}" echo " iPXE ARM64: ${IPXE_ARM64_CACHE}" echo "" - echo "Please run 'wild-cluster-node-image-create' first to download and cache the assets." + echo "Please run 'wild-cluster-node-boot-assets-download' first to download and cache the assets." exit 1 fi diff --git a/bin/wild-setup-cluster b/bin/wild-setup-cluster index f05a1a3..2d72cfe 100755 --- a/bin/wild-setup-cluster +++ b/bin/wild-setup-cluster @@ -66,22 +66,31 @@ else init_wild_env fi -# Check basic configuration -check_basic_config - print_header "Wild Cloud Cluster Setup" print_info "Setting up cluster infrastructure" echo "" -# ============================================================================= +# Generate initial cluster configuration + +wild-cluster-config-generate + +# Configure Talos cli with our new cluster context + +HAS_CONTEXT=$(talos config get | grep -c "") +if [ "$HAS_CONTEXT" -eq 0 ]; then + print_info "No Talos context found for cluster , creating..." + talos config merge ${WC_HOME}/setup/cluster-nodes/generated/talosconfig + talos config use + print_success "Talos context for created and set as current" +fi + # Talos asset download -# ============================================================================= if [ "${SKIP_INSTALLER}" = false ]; then print_header "Installer Image Generation" - print_info "Running wild-cluster-node-image-create..." - wild-cluster-node-image-create + print_info "Running wild-cluster-node-boot-assets-download..." + wild-cluster-node-boot-assets-download print_success "Installer image generated" echo "" @@ -90,36 +99,21 @@ else fi # ============================================================================= -# Network and Cluster Configuration +# Configuration # ============================================================================= +prompt_if_unset_config "owner.email" "Owner email address" + # Configure network settings -if [ -z "$(get_current_config "cloud.router.ip")" ]; then - print_header "Network Configuration" - - CURRENT_IP=$(ip route get 8.8.8.8 | awk '{print $7; exit}' 2>/dev/null || echo "192.168.1.100") - GATEWAY_IP=$(ip route | grep default | awk '{print $3; exit}' 2>/dev/null || echo "192.168.1.1") - SUBNET_PREFIX=$(echo "${CURRENT_IP}" | cut -d. -f1-3) - - prompt_if_unset_config "cloud.router.ip" "Router/Gateway IP" "${GATEWAY_IP}" - prompt_if_unset_config "cloud.dns.ip" "DNS server IP (dnsmasq machine)" "${SUBNET_PREFIX}.50" - prompt_if_unset_config "cloud.dhcpRange" "DHCP range for dnsmasq" "${SUBNET_PREFIX}.100,${SUBNET_PREFIX}.200" - prompt_if_unset_config "cloud.dnsmasq.interface" "Network interface for dnsmasq" "eth0" - prompt_if_unset_config "cloud.dns.externalResolver" "External DNS resolver" "1.1.1.1" - - print_success "Network configuration completed" - echo "" -fi - -# Configure cluster settings -print_header "Kubernetes Cluster Configuration" - CURRENT_IP=$(ip route get 8.8.8.8 | awk '{print $7; exit}' 2>/dev/null || echo "192.168.1.100") +GATEWAY_IP=$(ip route | grep default | awk '{print $3; exit}' 2>/dev/null || echo "192.168.1.1") SUBNET_PREFIX=$(echo "${CURRENT_IP}" | cut -d. -f1-3) -# Talos version -prompt_if_unset_config "cluster.nodes.talos.version" "Talos version" "v1.10.4" -talos_version=$(wild-config "cluster.nodes.talos.version") +prompt_if_unset_config "cloud.router.ip" "Router/Gateway IP" "${GATEWAY_IP}" +prompt_if_unset_config "cloud.dns.ip" "DNS server IP (dnsmasq machine)" "${SUBNET_PREFIX}.50" +prompt_if_unset_config "cloud.dhcpRange" "DHCP range for dnsmasq" "${SUBNET_PREFIX}.100,${SUBNET_PREFIX}.200" +prompt_if_unset_config "cloud.dnsmasq.interface" "Network interface for dnsmasq" "eth0" +prompt_if_unset_config "cloud.dns.externalResolver" "External DNS resolver" "1.1.1.1" # MetalLB IP address pool prompt_if_unset_config "cluster.ipAddressPool" "MetalLB IP address pool" "${SUBNET_PREFIX}.80-${SUBNET_PREFIX}.89" @@ -133,6 +127,10 @@ if [ -z "$current_lb_ip" ] || [ "$current_lb_ip" = "null" ]; then print_info "Set load balancer IP to: ${lb_ip} (first IP in MetalLB pool)" fi +# Talos version +prompt_if_unset_config "cluster.nodes.talos.version" "Talos version" "v1.10.4" +talos_version=$(wild-config "cluster.nodes.talos.version") + # Talos schematic ID current_schematic_id=$(get_current_config "cluster.nodes.talos.schematicId") if [ -z "$current_schematic_id" ] || [ "$current_schematic_id" = "null" ]; then @@ -156,77 +154,40 @@ fi cluster_name=$(get_current_config "cluster.name") prompt_if_unset_config "cluster.externalDns.ownerId" "External DNS owner ID" "external-dns-${cluster_name}" -print_success "Cluster configuration completed" -echo "" + # ============================================================================= -# Node Hardware Detection +# Node setup # ============================================================================= if [ "${SKIP_HARDWARE}" = false ]; then - print_header "Node Hardware Detection" - - print_info "This phase will help you register Talos nodes by discovering their hardware." - print_info "You'll need nodes booted in maintenance mode and accessible via IP." - echo "" - - # Configure control plane network topology first - if [ -z "$(get_current_config "cluster.nodes.control.vip")" ]; then - print_header "Control Plane Network Configuration" - # Detect current network for suggestions - CURRENT_IP=$(ip route get 8.8.8.8 | awk '{print $7; exit}' 2>/dev/null || echo "192.168.1.100") - SUBNET_PREFIX=$(echo "${CURRENT_IP}" | cut -d. -f1-3) - - print_info "Configure control plane nodes (you need at least 3 for HA):" - echo "" - - prompt_if_unset_config "cluster.nodes.control.vip" "Control plane virtual IP" "${SUBNET_PREFIX}.90" - vip=$(wild-config "cluster.nodes.control.vip") - - # Automatically configure the first three IPs after VIP for control plane nodes - vip_last_octet=$(echo "$vip" | cut -d. -f4) - vip_prefix=$(echo "$vip" | cut -d. -f1-3) - - print_info "Configuring control plane nodes using consecutive IPs after VIP:" - for i in 1 2 3; do - node_ip="${vip_prefix}.$(( vip_last_octet + i ))" - print_info " Control plane node $i: $node_ip" + print_header "Control Plane Configuration" - # Initialize the node in cluster.nodes.active if not already present - if [ -z "$(get_current_config "cluster.nodes.active.\"${node_ip}\".control")" ]; then - wild-config-set "cluster.nodes.active.\"${node_ip}\".control" "true" - fi - done - - print_success "Control plane network configuration completed" - echo "" - fi - - # # Generate initial cluster configuration - # print_header "Cluster Configuration Generation" - # print_info "Generating base cluster configuration with talosctl gen config..." - # wild-cluster-config-generate - - # Detect and register control plane nodes - print_header "Control Plane Node Registration" - - # Get VIP to determine control plane IPs - vip=$(get_current_config "cluster.nodes.control.vip") - if [ -z "$vip" ]; then - print_error "VIP not configured. Run control plane network configuration first." - exit 1 - fi - + print_info "Configure control plane nodes (you need at least 3 for HA):" + echo "" + + prompt_if_unset_config "cluster.nodes.control.vip" "Control plane virtual IP" "${SUBNET_PREFIX}.90" + vip=$(wild-config "cluster.nodes.control.vip") + + # Automatically configure the first three IPs after VIP for control plane nodes vip_last_octet=$(echo "$vip" | cut -d. -f4) vip_prefix=$(echo "$vip" | cut -d. -f1-3) + + # Detect and register control plane nodes + print_header "Control Plane Node Registration" # Process each control plane node IP for i in 1 2 3; do TARGET_IP="${vip_prefix}.$(( vip_last_octet + i ))" echo "" print_info "Registering control plane node: $TARGET_IP" - + + # Initialize the node in cluster.nodes.active if not already present + if [ -z "$(get_current_config "cluster.nodes.active.\"${TARGET_IP}\".control")" ]; then + wild-config-set "cluster.nodes.active.\"${TARGET_IP}\".control" "true" + fi + # Check if node is already configured existing_interface=$(get_current_config "cluster.nodes.active.\"${TARGET_IP}\".interface") if [ -n "$existing_interface" ] && [ "$existing_interface" != "null" ]; then @@ -234,25 +195,25 @@ if [ "${SKIP_HARDWARE}" = false ]; then print_info " - Interface: $existing_interface" print_info " - Disk: $(get_current_config "cluster.nodes.active.\"${TARGET_IP}\".disk")" - # Generate machine config for this node if necessary. + # Generate machine config patch for this node if necessary. NODE_SETUP_DIR="${WC_HOME}/setup/cluster-nodes" - CONFIG_FILE="${NODE_SETUP_DIR}/final/${TARGET_IP}.yaml" + CONFIG_FILE="${NODE_SETUP_DIR}/patch/${TARGET_IP}.yaml" if [ ! -f "$CONFIG_FILE" ]; then - print_info "Generating missing machine configuration for $TARGET_IP..." - if wild-cluster-node-machine-config-generate "$TARGET_IP"; then - print_success "Machine configuration generated for $TARGET_IP" + print_info "Generating missing machine configuration patch for $TARGET_IP..." + if wild-cluster-node-patch-generate "$TARGET_IP"; then + print_success "Machine configuration patch generated for $TARGET_IP" else - print_warning "Failed to generate machine configuration for $TARGET_IP" + print_warning "Failed to generate machine configuration patch for $TARGET_IP" fi else - print_info " ✓ Machine config exists: $CONFIG_FILE" + print_info " ✓ Machine configuration patch exists: $CONFIG_FILE" fi continue fi - - read -p "Do you want to register control plane node $TARGET_IP now? (y/N): " -r register_node + + read -p "Do you want to bring up control plane node $TARGET_IP now? (y/N): " -r register_node if [[ ! $register_node =~ ^[Yy]$ ]]; then - print_info "Skipping node $TARGET_IP registration" + print_info "Skipping bringing up node $TARGET_IP registration" continue fi @@ -319,7 +280,6 @@ if [ "${SKIP_HARDWARE}" = false ]; then print_info "Updating configuration for $TARGET_IP..." wild-config-set "cluster.nodes.active.\"${TARGET_IP}\".interface" "$INTERFACE" wild-config-set "cluster.nodes.active.\"${TARGET_IP}\".disk" "$SELECTED_DISK" - wild-config-set "cluster.nodes.active.\"${TARGET_IP}\".control" "true" # Copy current Talos version and schematic ID to this node current_talos_version=$(get_current_config "cluster.nodes.talos.version") @@ -330,34 +290,57 @@ if [ "${SKIP_HARDWARE}" = false ]; then if [ -n "$current_schematic_id" ] && [ "$current_schematic_id" != "null" ]; then wild-config-set "cluster.nodes.active.\"${TARGET_IP}\".schematicId" "$current_schematic_id" fi - - print_success "Node $TARGET_IP registered successfully" - - # Generate machine config. - print_info "Generating machine configuration for $TARGET_IP..." - if wild-cluster-node-machine-config-generate "$TARGET_IP"; then - print_success "Machine configuration generated for $TARGET_IP" - - # Ask if user wants to apply the configuration now - echo "" - read -p "Apply configuration to node $TARGET_IP now? (y/N): " -r apply_config - if [[ $apply_config =~ ^[Yy]$ ]]; then - if [ "$DETECTION_IP" != "$TARGET_IP" ]; then - # Node is in maintenance mode, use insecure flag - print_info "Applying configuration in insecure mode (maintenance mode)..." - wild-cluster-node-up "$TARGET_IP" --insecure - else - # Node is already configured, use secure mode - print_info "Applying configuration..." - wild-cluster-node-up "$TARGET_IP" - fi + + echo "" + read -p "Bring node $TARGET_IP up now? (y/N): " -r apply_config + if [[ $apply_config =~ ^[Yy]$ ]]; then + if [ "$DETECTION_IP" != "$TARGET_IP" ]; then + # Node is in maintenance mode, use insecure flag + print_info "Applying configuration in insecure mode (maintenance mode)..." + wild-cluster-node-up "$TARGET_IP" --insecure else - print_info "Configuration not applied. You can apply it later with:" - print_info " wild-cluster-node-up $TARGET_IP --insecure" + # Node is already configured, use secure mode + print_info "Applying configuration..." + wild-cluster-node-up "$TARGET_IP" fi + + # Bootstrap the cluster after the first node is up. + if [ "$i" -eq 1 ]; then + read -p "The cluster should be bootstrapped after the first control node is ready. Is it ready?: " -r is_ready + if [[ $is_ready =~ ^[Yy]$ ]]; then + print_info "Bootstrapping control plane node $TARGET_IP..." + talos config endpoint "$TARGET_IP" + + # Attempt to bootstrap the cluster + if talosctl bootstrap --nodes "$TARGET_IP" 2>&1 | tee /tmp/bootstrap_output.log; then + print_success "Control plane node $TARGET_IP bootstrapped successfully!" + else + # Check if the error is because it's already bootstrapped + if grep -q "etcd data directory is not empty\|AlreadyExists" /tmp/bootstrap_output.log; then + print_info "Cluster is already bootstrapped on $TARGET_IP" + else + print_error "Failed to bootstrap control plane node $TARGET_IP" + print_info "Bootstrap output:" + cat /tmp/bootstrap_output.log + rm -f /tmp/bootstrap_output.log + continue + fi + fi + rm -f /tmp/bootstrap_output.log + + talosctl config endpoint "$vip" + print_info "Talos endpoint set to control plane VIP: $vip" + + talosctl kubeconfig "$vip" + print_success "Talos kubeconfig updated for control plane VIP: $vip" + fi + fi + else - print_warning "Failed to generate machine configuration for $TARGET_IP" + print_info "Configuration not applied. You can apply it later with:" + print_info " wild-cluster-node-up $TARGET_IP --insecure" fi + fi done diff --git a/bin/wild-setup-services b/bin/wild-setup-services index 907450d..f7f098f 100755 --- a/bin/wild-setup-services +++ b/bin/wild-setup-services @@ -58,9 +58,6 @@ else init_wild_env fi -# Check basic configuration -check_basic_config - # Check cluster configuration if [ -z "$(get_current_config "cluster.name")" ]; then print_error "Cluster configuration is missing" diff --git a/docs/SETUP_FULL.md b/docs/SETUP_FULL.md index e2d07f1..6a1e0a0 100644 --- a/docs/SETUP_FULL.md +++ b/docs/SETUP_FULL.md @@ -27,7 +27,16 @@ cd ~ mkdir ~/my-wild-cloud cd my-wild-cloud -wild-init +wild-setup-scaffold +``` + +## Download Cluster Node Boot Assets + +We use Talos linux for node operating systems. Run this script to download the OS for use in the rest of the setup. + +```bash +# Generate node boot assets (PXE, iPXE, ISO) +wild-cluster-node-boot-assets-download ``` ## Dnsmasq @@ -36,54 +45,70 @@ wild-init - Ensure it is accessible with ssh. ```bash -wild-dnsmasq-install +# Install dnsmasq with PXE boot support +wild-dnsmasq-install --install ``` ## Cluster Setup +### Cluster Infrastructure Setup + ```bash -# ONE-TIME CLUSTER INITIALIZATION (run once per cluster) -./init-cluster.sh +# Configure network, cluster settings, and register nodes +wild-setup-cluster ``` -### Join control nodes +This interactive script will: +- Configure network settings (router IP, DNS, DHCP range) +- Configure cluster settings (Talos version, schematic ID, MetalLB pool) +- Help you register control plane and worker nodes by detecting their hardware +- Generate machine configurations for each node +- Apply machine configurations to nodes +- Bootstrap the cluster after the first node. -Boot each nodes with Talos ISO in maintenance mode. +### Install Cluster Services ```bash -./detect-node-hardware.sh -./generate-machine-configs.sh -talosctl apply-config --insecure -n 192.168.8.168 --file final/controlplane-node-1.yaml +wild-setup-services ``` -### Cluster bootstrap - -After all control plane nodes are configured. - -```bash -# Bootstrap the cluster using any control node -talosctl bootstrap --nodes 192.168.8.31 --endpoint 192.168.8.31 - -# Get kubeconfig -talosctl kubeconfig - -# Verify cluster is ready -kubectl get nodes -``` - -### Cluster services - -```bash -./setup/cluster/setup-all.sh -./setup/cluster/validate-setup.sh -``` - -## Installing Wild Cloud apps +## Installing Wild Cloud Apps ```bash +# List available applications wild-apps-list -wild-app-fetch -wild-app-config -wild-app-deploy -# Optional: Check in app templates. + +# Deploy an application +wild-app-deploy + +# Check app status +wild-app-doctor + +# Remove an application +wild-app-delete +``` + +## Individual Node Management + +If you need to manage individual nodes: + +```bash +# Generate patch for a specific node +wild-cluster-node-patch-generate + +# Generate final machine config (uses existing patch) +wild-cluster-node-machine-config-generate + +# Apply configuration with options +wild-cluster-node-up [--insecure] [--skip-patch] [--dry-run] +``` + +## Asset Management + +```bash +# Download/cache boot assets (kernel, initramfs, ISO, iPXE) +wild-cluster-node-boot-assets-download + +# Install dnsmasq with specific schematic +wild-dnsmasq-install --schematic-id --install ``` diff --git a/scripts/common.sh b/scripts/common.sh index 9e2d836..e2bba4a 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -21,7 +21,7 @@ # - Print functions: print_header, print_info, print_warning, print_success, print_error # - Config functions: get_current_config, get_current_secret, prompt_with_default # - Config helpers: prompt_if_unset_config, prompt_if_unset_secret -# - Validation: check_wild_directory, check_basic_config +# - Validation: check_wild_directory # - Utilities: command_exists, file_readable, dir_writable, generate_random_string # ============================================================================= @@ -234,15 +234,6 @@ check_wild_directory() { fi } -# Check if basic configuration exists -check_basic_config() { - if [ -z "$(get_current_config "operator.email")" ]; then - print_error "Basic configuration is missing" - print_info "Run 'wild-setup-scaffold' first to configure basic settings" - exit 1 - fi -} - # ============================================================================= # UTILITY FUNCTIONS # ============================================================================= diff --git a/setup/home-scaffold/.gitignore b/setup/home-scaffold/.gitignore index 7321f05..f54d81a 100644 --- a/setup/home-scaffold/.gitignore +++ b/setup/home-scaffold/.gitignore @@ -3,3 +3,4 @@ secrets.yaml .bots/*/sessions backup/ .working +setup/cluster-nodes/generated/talosconfig