Make flags on wild-setup-services consistent with wild-service-setup.
This commit is contained in:
@@ -4,6 +4,7 @@ Bootloading
|
|||||||
certificaterequests
|
certificaterequests
|
||||||
certmanager
|
certmanager
|
||||||
containo
|
containo
|
||||||
|
controlplane
|
||||||
coredns
|
coredns
|
||||||
crds
|
crds
|
||||||
dnsmasq
|
dnsmasq
|
||||||
@@ -21,6 +22,7 @@ KUBECONFIG
|
|||||||
kubernetescrd
|
kubernetescrd
|
||||||
kustomization
|
kustomization
|
||||||
letsencrypt
|
letsencrypt
|
||||||
|
machineconfig
|
||||||
metallb
|
metallb
|
||||||
NEXTCLOUD
|
NEXTCLOUD
|
||||||
nftables
|
nftables
|
||||||
@@ -37,6 +39,8 @@ pgvector
|
|||||||
rcode
|
rcode
|
||||||
restic
|
restic
|
||||||
SAMEORIGIN
|
SAMEORIGIN
|
||||||
|
talosctl
|
||||||
|
TALOSCTL
|
||||||
traefik
|
traefik
|
||||||
USEPATH
|
USEPATH
|
||||||
vxlan
|
vxlan
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
echo "You can also run these components individually:"
|
echo "You can also run these components individually:"
|
||||||
echo " - wild-setup-scaffold [--update]"
|
echo " - wild-setup-scaffold [--update]"
|
||||||
echo " - wild-setup-cluster [--skip-installer] [--skip-hardware] [--skip-configs]"
|
echo " - wild-setup-cluster [--skip-installer] [--skip-hardware] [--skip-configs]"
|
||||||
echo " - wild-setup-services [--skip-install]"
|
echo " - wild-setup-services [--fetch] [--no-deploy]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "For detailed options for each component, use:"
|
echo "For detailed options for each component, use:"
|
||||||
echo " wild-setup-scaffold --help"
|
echo " wild-setup-scaffold --help"
|
||||||
|
|||||||
@@ -5,27 +5,34 @@ set -o pipefail
|
|||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
|
|
||||||
SKIP_INSTALL=false
|
FETCH=false
|
||||||
|
NO_DEPLOY=false
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--skip-install)
|
--fetch)
|
||||||
SKIP_INSTALL=true
|
FETCH=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--no-deploy|--skip-install)
|
||||||
|
NO_DEPLOY=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Install Kubernetes cluster services (Phase 4)."
|
echo "Set up all Kubernetes cluster services (Phase 4)."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --skip-install Generate service configs but skip installation"
|
echo " --fetch Fetch fresh templates for all services before setup"
|
||||||
|
echo " --no-deploy Configure all services but skip deployment"
|
||||||
|
echo " --skip-install Alias for --no-deploy (deprecated)"
|
||||||
echo " -h, --help Show this help message"
|
echo " -h, --help Show this help message"
|
||||||
echo ""
|
echo ""
|
||||||
echo "This script will:"
|
echo "This script will:"
|
||||||
echo " - Generate cluster service configurations"
|
echo " - Set up core services in dependency order (MetalLB, Traefik, cert-manager, etc.)"
|
||||||
echo " - Install core services (MetalLB, Traefik, cert-manager, etc.)"
|
echo " - Each service validates its prerequisites before deployment"
|
||||||
echo " - Each service will prompt for its required configuration"
|
echo " - Fail-fast with clear recovery instructions on errors"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Prerequisites:"
|
echo "Prerequisites:"
|
||||||
echo " - Run 'wild-setup-cluster' to set up cluster infrastructure"
|
echo " - Run 'wild-setup-cluster' to set up cluster infrastructure"
|
||||||
@@ -83,12 +90,21 @@ SERVICES_TO_INSTALL=(
|
|||||||
INSTALLED_COUNT=0
|
INSTALLED_COUNT=0
|
||||||
FAILED_COUNT=0
|
FAILED_COUNT=0
|
||||||
|
|
||||||
if [ "${SKIP_INSTALL}" = false ]; then
|
# Build service setup command flags
|
||||||
|
SERVICE_FLAGS=""
|
||||||
|
if [ "$FETCH" = true ]; then
|
||||||
|
SERVICE_FLAGS="$SERVICE_FLAGS --fetch"
|
||||||
|
fi
|
||||||
|
if [ "$NO_DEPLOY" = true ]; then
|
||||||
|
SERVICE_FLAGS="$SERVICE_FLAGS --no-deploy"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$NO_DEPLOY" = false ]; then
|
||||||
for service in "${SERVICES_TO_INSTALL[@]}"; do
|
for service in "${SERVICES_TO_INSTALL[@]}"; do
|
||||||
echo ""
|
echo ""
|
||||||
print_header "Setting up service: $service"
|
print_header "Setting up service: $service"
|
||||||
|
|
||||||
if wild-service-setup "$service" --fetch; then
|
if wild-service-setup "$service" $SERVICE_FLAGS; then
|
||||||
print_success "$service setup completed"
|
print_success "$service setup completed"
|
||||||
INSTALLED_COUNT=$((INSTALLED_COUNT + 1))
|
INSTALLED_COUNT=$((INSTALLED_COUNT + 1))
|
||||||
else
|
else
|
||||||
@@ -104,16 +120,34 @@ if [ "${SKIP_INSTALL}" = false ]; then
|
|||||||
print_success "All $INSTALLED_COUNT services set up successfully!"
|
print_success "All $INSTALLED_COUNT services set up successfully!"
|
||||||
else
|
else
|
||||||
print_error "Service setup stopped after $service failure"
|
print_error "Service setup stopped after $service failure"
|
||||||
print_info "Fix the issue and resume with: wild-service-setup $service --fetch"
|
print_info "Fix the issue and resume with: wild-service-setup $service $SERVICE_FLAGS"
|
||||||
print_info "Then continue with remaining services or re-run wild-setup-services"
|
print_info "Then continue with remaining services or re-run wild-setup-services"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
print_info "Skipping cluster services installation (--skip-install specified)"
|
print_info "Skipping cluster services deployment (--no-deploy specified)"
|
||||||
print_info "You can install them later with:"
|
print_info "Services will be configured but not deployed to cluster."
|
||||||
for service in "${SERVICES_TO_INSTALL[@]}"; do
|
for service in "${SERVICES_TO_INSTALL[@]}"; do
|
||||||
print_info " wild-service-setup $service --fetch"
|
echo ""
|
||||||
|
print_header "Configuring service: $service"
|
||||||
|
|
||||||
|
if wild-service-setup "$service" $SERVICE_FLAGS; then
|
||||||
|
print_success "$service configuration completed"
|
||||||
|
INSTALLED_COUNT=$((INSTALLED_COUNT + 1))
|
||||||
|
else
|
||||||
|
print_error "$service configuration failed"
|
||||||
|
FAILED_COUNT=$((FAILED_COUNT + 1))
|
||||||
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $FAILED_COUNT -eq 0 ]; then
|
||||||
|
print_success "All $INSTALLED_COUNT services configured successfully!"
|
||||||
|
print_info "To deploy them later, run: wild-setup-services"
|
||||||
|
else
|
||||||
|
print_error "Service configuration stopped after $service failure"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Summary output
|
# Summary output
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ Wild Cloud provides 34+ command-line tools (all prefixed with `wild-`) for manag
|
|||||||
|
|
||||||
**`wild-setup-services`** - Install cluster services (Phase 4)
|
**`wild-setup-services`** - Install cluster services (Phase 4)
|
||||||
- Manages MetalLB, Traefik, cert-manager, etc.
|
- Manages MetalLB, Traefik, cert-manager, etc.
|
||||||
- Options: `--skip-install` for config generation only
|
- Options: `--fetch` for fresh templates, `--no-deploy` for config-only
|
||||||
- **Usage**: `wild-setup-services [options]`
|
- **Usage**: `wild-setup-services [options]`
|
||||||
- **Requires**: Working Kubernetes cluster
|
- **Requires**: Working Kubernetes cluster
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,9 @@ Interactive process for each node:
|
|||||||
## Phase 4: Cluster Services Installation
|
## Phase 4: Cluster Services Installation
|
||||||
|
|
||||||
### Services Deployment Process
|
### Services Deployment Process
|
||||||
**Command**: `wild-setup-services`
|
**Command**: `wild-setup-services [options]`
|
||||||
|
- **`--fetch`**: Fetch fresh templates before setup
|
||||||
|
- **`--no-deploy`**: Configure only, skip deployment
|
||||||
|
|
||||||
**New Architecture**: Per-service atomic operations
|
**New Architecture**: Per-service atomic operations
|
||||||
- Uses `wild-service-setup <service>` for each service in dependency order
|
- Uses `wild-service-setup <service>` for each service in dependency order
|
||||||
|
|||||||
@@ -49,7 +49,13 @@ Internet → External DNS → MetalLB LoadBalancer → Traefik → Kubernetes Se
|
|||||||
### Complete Infrastructure Setup
|
### Complete Infrastructure Setup
|
||||||
```bash
|
```bash
|
||||||
# All services with fresh templates (recommended for first-time setup)
|
# All services with fresh templates (recommended for first-time setup)
|
||||||
|
wild-setup-services --fetch
|
||||||
|
|
||||||
|
# All services using existing templates (fastest)
|
||||||
wild-setup-services
|
wild-setup-services
|
||||||
|
|
||||||
|
# Configure all services but don't deploy (for planning)
|
||||||
|
wild-setup-services --no-deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
### Individual Service Management
|
### Individual Service Management
|
||||||
|
|||||||
Reference in New Issue
Block a user