Cloud Seeder
A production-ready CLI tool for generating cloud-init configurations and seed ISOs from YAML templates.
Features
- Generic and Flexible: Not tied to any specific use case
- YAML-based Configuration: Simple, declarative configuration format
- Multi-node Support: Define multiple nodes in a single configuration
- Inheritance Model: Global settings with node-specific overrides
- ISO Generation: Automatically create cloud-init seed ISOs
- Network Configuration: Support for both static and DHCP networking
- Validation: Configuration validation before generation
- Clean Output Structure: Organized directory structure for outputs
Installation
# Clone the repository
git clone https://github.com/yourusername/cloud-seeder.git
cd cloud-seeder
# Make the CLI executable
chmod +x cloud_seeder_cli.py
# Install dependencies (if needed)
pip install pyyaml
# For ISO generation, install one of:
sudo dnf install genisoimage # Fedora/CentOS
sudo apt install genisoimage # Ubuntu/Debian
Usage
Basic Usage
# Generate cloud-init configurations
./cloud_seeder_cli.py config.yaml
# Generate configurations and create ISOs
./cloud_seeder_cli.py config.yaml --iso
# Clean output directory before generating
./cloud_seeder_cli.py config.yaml --clean --iso
# Validate configuration only
./cloud_seeder_cli.py config.yaml --validate-only
Command Line Options
positional arguments:
config Configuration file (YAML)
optional arguments:
-h, --help show this help message and exit
--output-dir OUTPUT_DIR, -o OUTPUT_DIR
Output directory (default: output)
--iso, -i Create seed ISOs
--clean, -c Clean output directory before generating
--log-level {DEBUG,INFO,WARNING,ERROR}, -l {DEBUG,INFO,WARNING,ERROR}
Logging level
--validate-only, -v Only validate configuration without generating files
Configuration Structure
Global Settings
Global settings apply to all nodes unless overridden:
# System settings
timezone: America/New_York
locale: en_US.UTF-8
# Package management
package_management:
update: true
upgrade: false
reboot_if_required: false
# SSH configuration
ssh:
password_auth: false
disable_root: true
# Packages for all nodes
packages:
- vim-enhanced
- tmux
- htop
# Users for all nodes
users:
- name: admin
groups: ["wheel"]
ssh_authorized_keys:
- ssh-rsa AAAAB3...
Node Configuration
Each node can have its own specific configuration:
nodes:
web-server:
hostname: web01
fqdn: web01.example.com
network:
ip_address: 10.0.1.10
gateway: 10.0.1.1
dns_servers: [10.0.1.1, 8.8.8.8]
packages:
- nginx
- certbot
runcmd:
- systemctl enable nginx
- systemctl start nginx
Output Structure
output/
├── configs/ # Cloud-init YAML files
│ ├── node1-cloud-init.yaml
│ └── node2-cloud-init.yaml
├── seeds/ # Seed file directories
│ ├── node1/
│ │ ├── meta-data
│ │ ├── user-data
│ │ └── network-config
│ └── node2/
└── images/ # ISO files (if --iso used)
├── node1-seed.iso
└── node2-seed.iso
Examples
Web Server Farm
packages:
- nginx
- firewalld
nodes:
web-01:
hostname: web01
network:
ip_address: 10.0.1.10
gateway: 10.0.1.1
web-02:
hostname: web02
network:
ip_address: 10.0.1.11
gateway: 10.0.1.1
Kubernetes Cluster
packages:
- containerd
- kubeadm
- kubelet
- kubectl
nodes:
master-01:
hostname: k8s-master-01
network:
ip_address: 10.0.2.10
runcmd:
- kubeadm init --pod-network-cidr=10.244.0.0/16
worker-01:
hostname: k8s-worker-01
network:
ip_address: 10.0.2.20
Development Environment
packages:
- git
- python3
- nodejs
- podman
users:
- name: developer
groups: ["wheel", "podman"]
passwd: dev123
nodes:
dev-workstation:
hostname: devbox
packages:
- code
- firefox
Best Practices
- Use YAML anchors for repeated configurations
- Store sensitive data separately (passwords, keys)
- Version control your configuration files
- Test configurations in a non-production environment first
- Use meaningful node names that reflect their purpose
- Document custom configurations with comments
Troubleshooting
ISO Creation Fails
Install one of the ISO creation tools:
sudo dnf install genisoimage # Fedora/CentOS
sudo apt install genisoimage # Ubuntu/Debian
Network Configuration Not Applied
Ensure your cloud provider or hypervisor supports cloud-init network configuration.
Logs and Debugging
Enable debug logging:
./cloud_seeder_cli.py config.yaml --log-level DEBUG
Check cloud-init logs on the target system:
sudo journalctl -u cloud-init
sudo cat /var/log/cloud-init.log
License
MIT License - See LICENSE file for details
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
- Create an issue on GitHub
- Check existing issues for solutions
- Read cloud-init documentation at https://cloud-init.io# cloud-seeder
Metadata
Release files for cloud-seeder 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cloud_seeder-0.1.0.tar.gz | 26.4 kB | Without provenance | Details for cloud_seeder-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cloud_seeder-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cloud_seeder-0.1.0-py3-none-any.whl |
Total release size: 41.9 kB
Release files / cloud_seeder-0.1.0.tar.gz
| Download URL | cloud_seeder-0.1.0.tar.gz |
|---|---|
| Size | 26.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed097081342635f6d10bccdc30815ae3f5ce45f4c6c7584ccd9e4afa678911a5
|
|
BLAKE2b-256 checksum How to use checksums |
e48047f5d6b86cb359b8f69b5860050f8278e00b435d6468f67e0086ba3115c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / cloud_seeder-0.1.0-py3-none-any.whl
| Download URL | cloud_seeder-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69a0c899dc76448d61b467f8d91479a087ddfcd4ced1d457c4d77501688865a5
|
|
BLAKE2b-256 checksum How to use checksums |
f8649678b75d28d4753309d8308324d14317e9bfb4134528bdca5e036d62e7b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for cloud-seeder 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.