feat(core): Initial project scaffold and implementation: Deno CLI, ISO tooling, cloud-init generation, packaging and installer scripts
This commit is contained in:
72
readme.hints.md
Normal file
72
readme.hints.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# Development Hints
|
||||
|
||||
## Project Structure
|
||||
|
||||
This project follows the nupst/spark pattern for Deno-based CLI tools with binary distribution.
|
||||
|
||||
## Key Components
|
||||
|
||||
1. **ISO Management** (`ts/classes/`)
|
||||
- `iso-downloader.ts` - Downloads Ubuntu ISOs from official mirrors
|
||||
- `iso-cache.ts` - Manages cached ISOs with multi-version support
|
||||
- `iso-extractor.ts` - Extracts ISOs using xorriso
|
||||
- `iso-packer.ts` - Repacks modified ISOs into bootable images
|
||||
- `iso-builder.ts` - Orchestrates the entire build process
|
||||
|
||||
2. **Cloud-Init** (`ts/classes/`)
|
||||
- `cloud-init-generator.ts` - Generates cloud-init configuration files
|
||||
- `config-manager.ts` - Loads and validates YAML configs
|
||||
|
||||
3. **CLI** (`ts/cli.ts`)
|
||||
- Command-line interface with commands: build, cache, template, validate
|
||||
|
||||
## System Dependencies
|
||||
|
||||
The tool requires these system tools at runtime:
|
||||
- `xorriso` - ISO manipulation
|
||||
- `syslinux-utils` - For USB-bootable ISOs (isohybrid command)
|
||||
|
||||
## Development Commands
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
deno install
|
||||
|
||||
# Run in development mode
|
||||
deno task dev --help
|
||||
|
||||
# Type checking
|
||||
deno task check
|
||||
|
||||
# Format code
|
||||
deno task fmt
|
||||
|
||||
# Lint
|
||||
deno task lint
|
||||
|
||||
# Run tests
|
||||
deno task test
|
||||
|
||||
# Compile binaries
|
||||
deno task compile
|
||||
```
|
||||
|
||||
## Distribution
|
||||
|
||||
Binaries are compiled for 5 platforms:
|
||||
- Linux x64
|
||||
- Linux ARM64
|
||||
- macOS x64
|
||||
- macOS ARM64
|
||||
- Windows x64
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Implement CLI flag-based building (currently only config files work)
|
||||
2. Add interactive mode with prompts
|
||||
3. Implement boot scripts injection with systemd service creation
|
||||
4. Add pre-install packages feature (requires squashfs manipulation)
|
||||
5. Write comprehensive tests
|
||||
6. Compile and test binaries
|
||||
7. Set up CI/CD pipeline
|
||||
8. Publish to npm
|
||||
Reference in New Issue
Block a user