# 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
```bash
# 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
```bash
# 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:
```yaml
# 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:
```yaml
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
```yaml
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
```yaml
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
```yaml
packages:
- git
- python3
- nodejs
- podman
users:
- name: developer
groups: ["wheel", "podman"]
passwd: dev123
nodes:
dev-workstation:
hostname: devbox
packages:
- code
- firefox
```
## Best Practices
1. **Use YAML anchors** for repeated configurations
2. **Store sensitive data** separately (passwords, keys)
3. **Version control** your configuration files
4. **Test configurations** in a non-production environment first
5. **Use meaningful node names** that reflect their purpose
6. **Document custom configurations** with comments
## Troubleshooting
### ISO Creation Fails
Install one of the ISO creation tools:
```bash
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:
```bash
./cloud_seeder_cli.py config.yaml --log-level DEBUG
```
Check cloud-init logs on the target system:
```bash
sudo journalctl -u cloud-init
sudo cat /var/log/cloud-init.log
```
## License
MIT License - See LICENSE file for details
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. 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
Raw data
{
"_id": null,
"home_page": "https://github.com/chris17453/cloud-seeder",
"name": "cloud-seeder",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Chris Watkins <chris@watkinslabs.com>",
"keywords": "cloud-init, cloud, automation, infrastructure, devops, seed, iso",
"author": "Chris Watkins",
"author_email": "Chris Watkins <chris@watkinslabs.com>",
"download_url": "https://files.pythonhosted.org/packages/e4/80/47f5d6b86cb359b8f69b5860050f8278e00b435d6468f67e0086ba3115c8/cloud_seeder-0.1.0.tar.gz",
"platform": null,
"description": "# Cloud Seeder\n\nA production-ready CLI tool for generating cloud-init configurations and seed ISOs from YAML templates.\n\n## Features\n\n- **Generic and Flexible**: Not tied to any specific use case\n- **YAML-based Configuration**: Simple, declarative configuration format\n- **Multi-node Support**: Define multiple nodes in a single configuration\n- **Inheritance Model**: Global settings with node-specific overrides\n- **ISO Generation**: Automatically create cloud-init seed ISOs\n- **Network Configuration**: Support for both static and DHCP networking\n- **Validation**: Configuration validation before generation\n- **Clean Output Structure**: Organized directory structure for outputs\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/cloud-seeder.git\ncd cloud-seeder\n\n# Make the CLI executable\nchmod +x cloud_seeder_cli.py\n\n# Install dependencies (if needed)\npip install pyyaml\n\n# For ISO generation, install one of:\nsudo dnf install genisoimage # Fedora/CentOS\nsudo apt install genisoimage # Ubuntu/Debian\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Generate cloud-init configurations\n./cloud_seeder_cli.py config.yaml\n\n# Generate configurations and create ISOs\n./cloud_seeder_cli.py config.yaml --iso\n\n# Clean output directory before generating\n./cloud_seeder_cli.py config.yaml --clean --iso\n\n# Validate configuration only\n./cloud_seeder_cli.py config.yaml --validate-only\n```\n\n### Command Line Options\n\n```\npositional arguments:\n config Configuration file (YAML)\n\noptional arguments:\n -h, --help show this help message and exit\n --output-dir OUTPUT_DIR, -o OUTPUT_DIR\n Output directory (default: output)\n --iso, -i Create seed ISOs\n --clean, -c Clean output directory before generating\n --log-level {DEBUG,INFO,WARNING,ERROR}, -l {DEBUG,INFO,WARNING,ERROR}\n Logging level\n --validate-only, -v Only validate configuration without generating files\n```\n\n## Configuration Structure\n\n### Global Settings\n\nGlobal settings apply to all nodes unless overridden:\n\n```yaml\n# System settings\ntimezone: America/New_York\nlocale: en_US.UTF-8\n\n# Package management\npackage_management:\n update: true\n upgrade: false\n reboot_if_required: false\n\n# SSH configuration\nssh:\n password_auth: false\n disable_root: true\n\n# Packages for all nodes\npackages:\n - vim-enhanced\n - tmux\n - htop\n\n# Users for all nodes\nusers:\n - name: admin\n groups: [\"wheel\"]\n ssh_authorized_keys:\n - ssh-rsa AAAAB3...\n```\n\n### Node Configuration\n\nEach node can have its own specific configuration:\n\n```yaml\nnodes:\n web-server:\n hostname: web01\n fqdn: web01.example.com\n \n network:\n ip_address: 10.0.1.10\n gateway: 10.0.1.1\n dns_servers: [10.0.1.1, 8.8.8.8]\n \n packages:\n - nginx\n - certbot\n \n runcmd:\n - systemctl enable nginx\n - systemctl start nginx\n```\n\n## Output Structure\n\n```\noutput/\n\u251c\u2500\u2500 configs/ # Cloud-init YAML files\n\u2502 \u251c\u2500\u2500 node1-cloud-init.yaml\n\u2502 \u2514\u2500\u2500 node2-cloud-init.yaml\n\u251c\u2500\u2500 seeds/ # Seed file directories\n\u2502 \u251c\u2500\u2500 node1/\n\u2502 \u2502 \u251c\u2500\u2500 meta-data\n\u2502 \u2502 \u251c\u2500\u2500 user-data\n\u2502 \u2502 \u2514\u2500\u2500 network-config\n\u2502 \u2514\u2500\u2500 node2/\n\u2514\u2500\u2500 images/ # ISO files (if --iso used)\n \u251c\u2500\u2500 node1-seed.iso\n \u2514\u2500\u2500 node2-seed.iso\n```\n\n## Examples\n\n### Web Server Farm\n\n```yaml\npackages:\n - nginx\n - firewalld\n\nnodes:\n web-01:\n hostname: web01\n network:\n ip_address: 10.0.1.10\n gateway: 10.0.1.1\n \n web-02:\n hostname: web02\n network:\n ip_address: 10.0.1.11\n gateway: 10.0.1.1\n```\n\n### Kubernetes Cluster\n\n```yaml\npackages:\n - containerd\n - kubeadm\n - kubelet\n - kubectl\n\nnodes:\n master-01:\n hostname: k8s-master-01\n network:\n ip_address: 10.0.2.10\n runcmd:\n - kubeadm init --pod-network-cidr=10.244.0.0/16\n \n worker-01:\n hostname: k8s-worker-01\n network:\n ip_address: 10.0.2.20\n```\n\n### Development Environment\n\n```yaml\npackages:\n - git\n - python3\n - nodejs\n - podman\n\nusers:\n - name: developer\n groups: [\"wheel\", \"podman\"]\n passwd: dev123\n\nnodes:\n dev-workstation:\n hostname: devbox\n packages:\n - code\n - firefox\n```\n\n## Best Practices\n\n1. **Use YAML anchors** for repeated configurations\n2. **Store sensitive data** separately (passwords, keys)\n3. **Version control** your configuration files\n4. **Test configurations** in a non-production environment first\n5. **Use meaningful node names** that reflect their purpose\n6. **Document custom configurations** with comments\n\n## Troubleshooting\n\n### ISO Creation Fails\n\nInstall one of the ISO creation tools:\n```bash\nsudo dnf install genisoimage # Fedora/CentOS\nsudo apt install genisoimage # Ubuntu/Debian\n```\n\n### Network Configuration Not Applied\n\nEnsure your cloud provider or hypervisor supports cloud-init network configuration.\n\n### Logs and Debugging\n\nEnable debug logging:\n```bash\n./cloud_seeder_cli.py config.yaml --log-level DEBUG\n```\n\nCheck cloud-init logs on the target system:\n```bash\nsudo journalctl -u cloud-init\nsudo cat /var/log/cloud-init.log\n```\n\n## License\n\nMIT License - See LICENSE file for details\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## Support\n\n- Create an issue on GitHub\n- Check existing issues for solutions\n- Read cloud-init documentation at https://cloud-init.io# cloud-seeder\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A tool for generating cloud-init configurations and seed ISOs, works with vmware",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/chris17453/cloud-seeder/issues",
"Documentation": "https://github.com/chris17453/cloud-seeder/wiki",
"Homepage": "https://github.com/chris17453/cloud-seeder",
"Repository": "https://github.com/chris17453/cloud-seeder"
},
"split_keywords": [
"cloud-init",
" cloud",
" automation",
" infrastructure",
" devops",
" seed",
" iso"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f8649678b75d28d4753309d8308324d14317e9bfb4134528bdca5e036d62e7b1",
"md5": "548079f33b6280303e0894bcb085035c",
"sha256": "69a0c899dc76448d61b467f8d91479a087ddfcd4ced1d457c4d77501688865a5"
},
"downloads": -1,
"filename": "cloud_seeder-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "548079f33b6280303e0894bcb085035c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 15489,
"upload_time": "2025-07-20T18:09:11",
"upload_time_iso_8601": "2025-07-20T18:09:11.589676Z",
"url": "https://files.pythonhosted.org/packages/f8/64/9678b75d28d4753309d8308324d14317e9bfb4134528bdca5e036d62e7b1/cloud_seeder-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e48047f5d6b86cb359b8f69b5860050f8278e00b435d6468f67e0086ba3115c8",
"md5": "ce8184a2ae697ced11d61e9c304b4418",
"sha256": "ed097081342635f6d10bccdc30815ae3f5ce45f4c6c7584ccd9e4afa678911a5"
},
"downloads": -1,
"filename": "cloud_seeder-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "ce8184a2ae697ced11d61e9c304b4418",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26449,
"upload_time": "2025-07-20T18:09:12",
"upload_time_iso_8601": "2025-07-20T18:09:12.974791Z",
"url": "https://files.pythonhosted.org/packages/e4/80/47f5d6b86cb359b8f69b5860050f8278e00b435d6468f67e0086ba3115c8/cloud_seeder-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 18:09:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chris17453",
"github_project": "cloud-seeder",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "PyYAML",
"specs": [
[
">=",
"5.1"
]
]
}
],
"lcname": "cloud-seeder"
}