Remove automatic deployment prompt from setup script
Changes: - scripts/setup-homelab.sh: Remove interactive deployment prompt - Users must now run deploy script manually - Simplifies both scripts (no sudo workarounds needed) - Clearer two-step process: setup then deploy - Documentation updates: - README.md: Updated step 3-4 with manual deployment - docs/getting-started.md: Removed step 6 (log out), clarified steps - docs/manual-setup.md: Added sudo to deploy command - docs/troubleshooting/COMMON-ISSUES.md: Added sudo to all deploy commands Rationale: - Automatic deployment via 'su -' cannot work with sudo requirement - Manual two-step process is clearer and more reliable - Setup focuses on configuration, deploy focuses on services
This commit is contained in:
@@ -98,7 +98,7 @@ The infrastructure uses Traefik for reverse proxy with automatic SSL, Authelia f
|
|||||||
- **Create admin user and password hash**
|
- **Create admin user and password hash**
|
||||||
- Set up directory structure and Docker networks
|
- Set up directory structure and Docker networks
|
||||||
|
|
||||||
**Important:** Log out and back in (or run `newgrp docker`) after setup completes.
|
**Important:** If NVIDIA drivers were installed, reboot before continuing. Otherwise, proceed to step 4.
|
||||||
|
|
||||||
4. **Run deployment script:**
|
4. **Run deployment script:**
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ The infrastructure uses Traefik for reverse proxy with automatic SSL, Authelia f
|
|||||||
- Open Dockge in your browser
|
- Open Dockge in your browser
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./scripts/deploy-homelab.sh
|
sudo ./scripts/deploy-homelab.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** The script will prompt to optionally pre-pull images for additional stacks. This takes time but speeds up future deployments. Default is no. Wildcard certificate generation takes 2-5 minutes.
|
**Note:** The script will prompt to optionally pre-pull images for additional stacks. This takes time but speeds up future deployments. Default is no. Wildcard certificate generation takes 2-5 minutes.
|
||||||
|
|||||||
@@ -67,13 +67,11 @@ For most users, the automated setup script handles everything:
|
|||||||
- Set up Docker networks (homelab, traefik, dockerproxy, media)
|
- Set up Docker networks (homelab, traefik, dockerproxy, media)
|
||||||
- Detect NVIDIA GPU and offer driver installation
|
- Detect NVIDIA GPU and offer driver installation
|
||||||
|
|
||||||
6. **Log out and back in** (or run `newgrp docker`)
|
**Important:** If NVIDIA drivers were installed, reboot your system now before continuing.
|
||||||
> Don't skip this step!
|
|
||||||
Required for Docker group permissions.
|
|
||||||
|
|
||||||
7. **Deploy homelab**:
|
6. **Deploy homelab**:
|
||||||
```bash
|
```bash
|
||||||
./scripts/deploy-homelab.sh
|
sudo ./scripts/deploy-homelab.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
**The deploy script automatically:**
|
**The deploy script automatically:**
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ If manual setup works, you can switch to the automated scripts for future update
|
|||||||
```bash
|
```bash
|
||||||
# Just run the deploy script
|
# Just run the deploy script
|
||||||
cd ~/AI-Homelab
|
cd ~/AI-Homelab
|
||||||
./scripts/deploy-homelab.sh
|
sudo ./scripts/deploy-homelab.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
The deploy script is idempotent - it won't break existing configurations.
|
The deploy script is idempotent - it won't break existing configurations.
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ docker compose up -d
|
|||||||
**Solution:**
|
**Solution:**
|
||||||
```bash
|
```bash
|
||||||
# Re-run deployment script (safe - won't affect running services)
|
# Re-run deployment script (safe - won't affect running services)
|
||||||
./scripts/deploy-homelab.sh
|
sudo ./scripts/deploy-homelab.sh
|
||||||
|
|
||||||
# Or manually fix:
|
# Or manually fix:
|
||||||
cd /opt/stacks/dashboards/homepage
|
cd /opt/stacks/dashboards/homepage
|
||||||
@@ -182,7 +182,7 @@ sudo systemctl stop systemd-resolved
|
|||||||
ls -la /opt/stacks/
|
ls -la /opt/stacks/
|
||||||
|
|
||||||
# Re-run deployment to copy stacks
|
# Re-run deployment to copy stacks
|
||||||
./scripts/deploy-homelab.sh
|
sudo ./scripts/deploy-homelab.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Performance Issues
|
## Performance Issues
|
||||||
@@ -235,7 +235,7 @@ sudo ./scripts/reset-test-environment.sh
|
|||||||
|
|
||||||
# Then re-run setup and deploy
|
# Then re-run setup and deploy
|
||||||
sudo ./scripts/setup-homelab.sh
|
sudo ./scripts/setup-homelab.sh
|
||||||
./scripts/deploy-homelab.sh
|
sudo ./scripts/deploy-homelab.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Partial Reset (Single Stack)
|
### Partial Reset (Single Stack)
|
||||||
|
|||||||
@@ -587,43 +587,14 @@ echo ""
|
|||||||
log_info "Setup complete!"
|
log_info "Setup complete!"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Prompt to run deployment script
|
# Instructions for deployment
|
||||||
if [ "${NVIDIA_REBOOT_NEEDED:-false}" != true ]; then
|
if [ "${NVIDIA_REBOOT_NEEDED:-false}" = true ]; then
|
||||||
echo ""
|
|
||||||
read -p "Would you like to run the deployment script now? [Y/n]: " -n 1 -r RUN_DEPLOY
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Default to yes if empty
|
|
||||||
RUN_DEPLOY=${RUN_DEPLOY:-Y}
|
|
||||||
|
|
||||||
if [[ $RUN_DEPLOY =~ ^[Yy]$ ]]; then
|
|
||||||
log_info "Starting deployment script..."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Check if user needs to log out first for Docker group
|
|
||||||
if ! groups "$ACTUAL_USER" | grep -q docker; then
|
|
||||||
log_warning "You need to log out and back in for Docker group permissions."
|
|
||||||
log_info "Run this command after logging back in:"
|
|
||||||
echo ""
|
|
||||||
echo " cd ~/AI-Homelab && ./scripts/deploy-homelab.sh"
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
# Run deployment script as the actual user with sudo
|
|
||||||
cd "$(dirname "$0")/.." || exit 1
|
|
||||||
su - "$ACTUAL_USER" -c "cd $PWD && sudo ./scripts/deploy-homelab.sh"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
log_info "Deployment skipped. Run it manually when ready:"
|
|
||||||
echo ""
|
|
||||||
echo " cd ~/AI-Homelab"
|
|
||||||
echo " ./scripts/deploy-homelab.sh"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
log_info "Please reboot your system for NVIDIA drivers, then run:"
|
log_info "Please reboot your system for NVIDIA drivers, then run:"
|
||||||
|
else
|
||||||
|
log_info "Next step - deploy your homelab services:"
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo " cd ~/AI-Homelab"
|
echo " cd ~/AI-Homelab"
|
||||||
echo " ./scripts/deploy-homelab.sh"
|
echo " sudo ./scripts/deploy-homelab.sh"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user