181 lines
4.4 KiB
Markdown
181 lines
4.4 KiB
Markdown
|
|
# Mac Development Setup - What You Need
|
||
|
|
|
||
|
|
## Current Situation
|
||
|
|
|
||
|
|
You develop Archipelago on a **remote Debian server** (192.168.1.228), not locally on your Mac.
|
||
|
|
|
||
|
|
Your Mac is used for:
|
||
|
|
- ✅ **Editing code** (VSCode/Cursor)
|
||
|
|
- ✅ **Git operations** (commit, push, pull)
|
||
|
|
- ✅ **Deploying to remote** (`deploy-to-target.sh`)
|
||
|
|
- ✅ **Building ISOs** (occasionally)
|
||
|
|
|
||
|
|
Your Mac is NOT used for:
|
||
|
|
- ❌ Running containers locally
|
||
|
|
- ❌ Building Rust locally
|
||
|
|
- ❌ Running the backend locally
|
||
|
|
- ❌ Running the frontend dev server locally
|
||
|
|
|
||
|
|
## Disk Usage Analysis
|
||
|
|
|
||
|
|
### 🔴 Can Delete (Total: ~66 GB)
|
||
|
|
|
||
|
|
1. **Docker Desktop: 53 GB**
|
||
|
|
- You're not running containers locally
|
||
|
|
- All containers run on 192.168.1.228
|
||
|
|
- Safe to completely uninstall
|
||
|
|
|
||
|
|
2. **Rust Build Cache: 1.6 GB** (`core/target/`)
|
||
|
|
- Builds happen on remote server via `deploy-to-target.sh`
|
||
|
|
- Rust compiler still needed for occasional local builds
|
||
|
|
- Cache rebuilds automatically
|
||
|
|
|
||
|
|
3. **ISO Build Artifacts: 8.6 GB** (`image-recipe/build/`)
|
||
|
|
- Temporary files from ISO building
|
||
|
|
- Recreated when you build a new ISO
|
||
|
|
- Safe to delete
|
||
|
|
|
||
|
|
4. **Old ISO Files: ~3 GB** (`image-recipe/results/`)
|
||
|
|
- Keep latest ISO only (~500MB)
|
||
|
|
- Delete old versions
|
||
|
|
|
||
|
|
### 🟢 Keep These Tools
|
||
|
|
|
||
|
|
1. **Rust/Cargo** ✅
|
||
|
|
- For occasional local builds
|
||
|
|
- For `deploy-to-target.sh` (builds before deploying)
|
||
|
|
- Size: ~200 MB
|
||
|
|
|
||
|
|
2. **Node.js/npm** ✅
|
||
|
|
- For frontend builds in `deploy-to-target.sh`
|
||
|
|
- For editing with IDE autocomplete
|
||
|
|
- Size: ~100 MB
|
||
|
|
|
||
|
|
3. **Git** ✅
|
||
|
|
- Version control
|
||
|
|
- Essential
|
||
|
|
|
||
|
|
4. **SSH** ✅
|
||
|
|
- Remote server access
|
||
|
|
- Essential for deployment
|
||
|
|
|
||
|
|
### ⚠️ Optional (You Choose)
|
||
|
|
|
||
|
|
1. **Podman** (~100 MB)
|
||
|
|
- Currently installed but not used
|
||
|
|
- Could remove: `brew uninstall podman`
|
||
|
|
- You use Podman on the *remote server*, not locally
|
||
|
|
|
||
|
|
2. **xorriso, p7zip** (ISO build tools)
|
||
|
|
- Only needed if building ISOs locally
|
||
|
|
- Can reinstall when needed: `brew install xorriso p7zip`
|
||
|
|
|
||
|
|
## Recommended Setup
|
||
|
|
|
||
|
|
### Minimal Mac Setup (Recommended)
|
||
|
|
```
|
||
|
|
✅ VSCode/Cursor (code editing)
|
||
|
|
✅ Git (version control)
|
||
|
|
✅ SSH (remote access)
|
||
|
|
✅ Rust/Cargo (for deploy script)
|
||
|
|
✅ Node.js/npm (for deploy script)
|
||
|
|
✅ One latest ISO file (~500 MB)
|
||
|
|
❌ NO Docker Desktop
|
||
|
|
❌ NO local containers
|
||
|
|
❌ NO build artifacts
|
||
|
|
```
|
||
|
|
|
||
|
|
**Total disk usage: ~500 MB + source code**
|
||
|
|
|
||
|
|
### Your Development Workflow
|
||
|
|
```bash
|
||
|
|
# 1. Edit code locally on Mac
|
||
|
|
vim core/archipelago/src/...
|
||
|
|
vim neode-ui/src/...
|
||
|
|
|
||
|
|
# 2. Deploy to remote server
|
||
|
|
./scripts/deploy-to-target.sh --live
|
||
|
|
|
||
|
|
# 3. Test on remote server
|
||
|
|
open http://192.168.1.228
|
||
|
|
|
||
|
|
# 4. Check logs (if needed)
|
||
|
|
ssh archipelago@192.168.1.228 'sudo journalctl -u archipelago -f'
|
||
|
|
|
||
|
|
# 5. Build ISO (when needed)
|
||
|
|
cd image-recipe
|
||
|
|
./build-debian-iso.sh # Only when making a release
|
||
|
|
```
|
||
|
|
|
||
|
|
## Cleanup Instructions
|
||
|
|
|
||
|
|
### Quick Cleanup (Run This Now)
|
||
|
|
```bash
|
||
|
|
cd /Users/dorian/Projects/archy
|
||
|
|
./cleanup-mac.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
This removes:
|
||
|
|
- Rust build cache
|
||
|
|
- ISO build artifacts
|
||
|
|
- Old ISO files
|
||
|
|
|
||
|
|
**Saves: ~13 GB**
|
||
|
|
|
||
|
|
### Complete Cleanup (Optional)
|
||
|
|
|
||
|
|
1. **Uninstall Docker Desktop** (53 GB)
|
||
|
|
```bash
|
||
|
|
# Option 1: Using the app
|
||
|
|
# Open Docker Desktop → Troubleshoot → Uninstall
|
||
|
|
|
||
|
|
# Option 2: Manual removal
|
||
|
|
rm -rf ~/Library/Containers/com.docker.docker
|
||
|
|
rm -rf ~/Library/Application\ Support/Docker\ Desktop
|
||
|
|
rm -rf ~/.docker
|
||
|
|
brew uninstall --cask docker
|
||
|
|
```
|
||
|
|
|
||
|
|
2. **Remove Podman** (if not used)
|
||
|
|
```bash
|
||
|
|
brew uninstall podman
|
||
|
|
```
|
||
|
|
|
||
|
|
3. **Remove ISO build tools** (if not needed)
|
||
|
|
```bash
|
||
|
|
brew uninstall xorriso p7zip
|
||
|
|
```
|
||
|
|
|
||
|
|
**Total savings: ~66 GB**
|
||
|
|
|
||
|
|
## FAQ
|
||
|
|
|
||
|
|
**Q: Will this break my development workflow?**
|
||
|
|
A: No! You'll still be able to edit code and deploy. Build artifacts regenerate automatically.
|
||
|
|
|
||
|
|
**Q: What if I need to build locally?**
|
||
|
|
A: The tools (Rust, Node) remain installed. Only the cached artifacts are removed.
|
||
|
|
|
||
|
|
**Q: What about Docker containers?**
|
||
|
|
A: All containers run on the remote server (192.168.1.228), not locally.
|
||
|
|
|
||
|
|
**Q: Can I rebuild ISOs after cleanup?**
|
||
|
|
A: Yes! Just run `./build-debian-iso.sh` - it will recreate the build artifacts.
|
||
|
|
|
||
|
|
**Q: What if I delete too much?**
|
||
|
|
A: The cleanup script is conservative. Everything removed can be regenerated.
|
||
|
|
|
||
|
|
## After Cleanup
|
||
|
|
|
||
|
|
Your Mac will have:
|
||
|
|
- ✅ 66+ GB free disk space
|
||
|
|
- ✅ Fast, lean development environment
|
||
|
|
- ✅ All source code intact
|
||
|
|
- ✅ Full development capabilities
|
||
|
|
- ✅ Latest ISO ready to flash
|
||
|
|
|
||
|
|
Your workflow remains the same:
|
||
|
|
```
|
||
|
|
Edit → Deploy → Test (on remote) → Commit
|
||
|
|
```
|