Cloud tools collection -- AWS infrastructure, CDN, and DevOps automation
Project description
Granny
Granny is a comprehensive Cloud DevOps toolkit designed to simplify and automate infrastructure management across multiple cloud providers. Built for developers and operations teams, Granny provides a unified command-line interface for managing AWS resources, CDN configurations, DNS records, storage solutions, and more.
What is Granny?
Granny is your Cloud Companion โ a collection of battle-tested tools that:
- Analyzes AWS resources (VPCs, Lambda functions) across all regions
- Manages Bunny CDN, including pull zones, cache purging, SSL certificates, and edge rules
- Controls DNS records across multiple providers (Cloudflare, Bunny, Hetzner, deSEC, ClouDNS)
- Provisions cloud infrastructure with reusable setup scripts
- Builds multi-architecture Docker images with deterministic tagging
- Deploys serverless functions to Scaleway FaaS
- Handles object storage across AWS S3, Bunny Storage, and Hetzner S3
- Manages email services (Mailjet sender setup, contact management, WorkMail users)
- Supports Bunny Edge Scripting for advanced CDN customization
Whether you're managing a single project or orchestrating infrastructure across multiple cloud providers, Granny provides the tools you need in one cohesive package.
Features
| Category | Capabilities |
|---|---|
| Analysis | List VPCs and Lambda functions across AWS regions |
| CDN | Bunny CDN pull zone CRUD, cache purging, SSL certificates, edge rules |
| DNS | Multi-provider DNS management (Cloudflare, Bunny, Hetzner, deSEC, ClouDNS) |
| Storage | AWS S3, Bunny Storage, Hetzner S3 bucket and file management |
| Serverless | Scaleway Functions (FaaS) deployment and management |
| Docker | Multi-arch image builds with deterministic hash-based tagging |
| Mailjet DNS setup, contact management, AWS WorkMail user administration | |
| Edge | Bunny Edge Script creation, deployment, and environment management |
| Credentials | Secure secret management with environment variable resolution |
| Infrastructure | Reusable setup scripts for common cloud patterns |
Quick Start
Installation
# Clone the repository
git clone https://github.com/your-org/granny-public.git
cd granny-public
# Install dependencies with uv
uv sync
# Or install globally from PyPI
pip install granny-devops
Tagged releases are published to both pypi.org and the public GitLab PyPI registry. If PyPI has not propagated a fresh release yet, use the GitLab registry fallback:
pip install --extra-index-url https://gitlab.com/api/v4/projects/81189862/packages/pypi/simple granny-devops
Configuration
Granny reads secrets from environment variables. Copy the example file and fill in the values:
cp .env.example .env
Edit .env with your API keys and credentials. The following environment variables are supported:
- Bunny:
BUNNY_API_KEY(plus per-customerBUNNY_API_KEY_<SLUG>) - Cloudflare:
CLOUDFLARE_API_TOKEN - deSEC:
DESEC_API_TOKEN - Hetzner DNS:
HETZNER_DNS_API_TOKEN - Hetzner S3:
HETZNER_S3_ACCESS_KEY,HETZNER_S3_SECRET_KEY - Scaleway:
SCW_ACCESS_KEY,SCW_SECRET_KEY,SCW_DEFAULT_PROJECT_ID - Mailjet:
MAILJET_API_KEY,MAILJET_SECRET_KEY - ClouDNS:
CLOUDNS_AUTH_ID,CLOUDNS_AUTH_PASSWORD,CLOUDNS_SUB_AUTH_ID,CLOUDNS_SUB_AUTH_USER - Docker Hub:
DOCKER_HUB_USER,DOCKER_HUB_TOKEN
Basic Usage
# Get help for all commands
granny --help
# Analyze AWS resources
granny analyze vpcs # List all VPCs across regions
granny analyze lambdas # List all Lambda functions
# Manage Bunny CDN
granny cdn purge 12345 # Purge cache for pull zone 12345
granny cdn list-zones # List all pull zones
granny cdn create-zone my-zone # Create a new pull zone
# Manage DNS records
granny dns list --domain example.com --provider cloudflare
granny dns add api.example.com --type A --provider hetzner
# Manage storage
granny storage bunny list # List Bunny storage zones
granny storage aws create my-bucket --website
# Build Docker images
granny docker build-base --image myapp-base --hash-file requirements.txt
# Deploy serverless functions
granny serverless deploy my-function --source-dir ./dist
# Manage credentials
granny credentials status # Show which secrets are configured
granny credentials get BUNNY_API_KEY
CLI Command Reference
For detailed documentation of all CLI commands, see the Documentation section below.
Use Cases
1. Multi-Cloud Infrastructure Analysis
Quickly audit your AWS resources across all regions without logging into the console:
# List all VPCs with their CIDR blocks and regions
granny analyze vpcs --json-output
# Find all Lambda functions with their runtimes
granny analyze lambdas --region us-east-1 eu-west-1
2. CDN Management
Manage Bunny CDN pull zones, cache, and SSL certificates:
# Purge cache for a specific pull zone
granny cdn purge 12345
# List all pull zones
granny cdn list-zones
# Create a new pull zone with origin
granny cdn create-zone "My Website" --origin-url https://my-origin.com
# Add a custom hostname
granny cdn add-hostname 12345 www.example.com
# Request SSL certificate
granny cdn ssl www.example.com --dns01
3. DNS Management
Manage DNS records across multiple providers with a unified interface:
# List all records for a domain
granny dns list --domain example.com --provider cloudflare
# Add an A record (auto-detects public IP)
granny dns add api.example.com --provider hetzner --domain example.com
# Add a CNAME record
granny dns add www.example.com --type CNAME --value example.com --provider bunny
# Delete a record
granny dns delete old.example.com --type A --provider cloudflare --yes
4. Storage Management
Work with object storage across AWS S3, Bunny Storage, and Hetzner:
# Create a Bunny storage zone
granny storage bunny create my-assets --region DE
# Upload a file
granny storage bunny upload my-zone ./assets/image.png --password my-password
# Create an S3 bucket with website hosting
granny storage aws create my-website --website
# Create a Hetzner S3 bucket
granny storage hetzner create my-bucket --region fsn1 --public
5. Serverless Deployments
Deploy functions to Scaleway FaaS:
# Create a namespace
granny serverless create-namespace my-app
# Create a function
granny serverless create-function my-namespace my-function --runtime node20
# Deploy code
granny serverless deploy my-function --source-dir ./dist --namespace my-app
6. Docker Builds
Build and push multi-architecture Docker images:
# Build a base image with hash-based tagging
granny docker build-base \
--image myapp-base \
--hash-file requirements.txt \
--hash-file package.json \
--secret npmtoken=NPM_TOKEN \
--login-docker-hub
7. Email Management
Configure Mailjet and AWS WorkMail:
# Setup Mailjet DNS for a domain
granny email mailjet setup-dns example.com
# Check Mailjet contact status
granny email mailjet check-contact user@example.com
# List WorkMail users
granny email workmail list-users example.com
# Create a WorkMail user
granny email workmail create-user example.com --email user@example.com --display-name "John Doe"
Documentation
Full documentation is available in the docs/ directory:
- ๐ CLI Reference โ Complete list of all CLI commands
- ๐ Analytics โ AWS resource analysis
- ๐ CDN Management โ Bunny CDN operations
- ๐ฆ Create Scripts โ Infrastructure provisioning
- ๐ Credentials โ Secret management
- ๐ DNS Management โ Domain and record management
- ๐ณ Docker โ Multi-arch image builds
- โก Edge Scripting โ Bunny Edge Script management
- ๐ง Email โ Mailjet and WorkMail
- โ๏ธ Serverless โ Scaleway FaaS
- ๐พ Storage โ Object storage management
Standalone Scripts
The granny/create/ directory contains standalone setup scripts for various cloud services:
setup_aws_cloudfront.pyโ Setup AWS CloudFront with security headerssetup_bunny_edge_script.pyโ Configure Bunny Edge Scriptingsetup_bunny_storage.pyโ Setup Bunny Storagesetup_cognito_identity_pool.pyโ Create Cognito identity poolssetup_hetzner_bunny.pyโ Hetzner + Bunny integrationsetup_mailjet_dns.pyโ Configure Mailjet DNS settingssetup_private_cdn.pyโ Setup private CDNsetup_s3_website.pyโ Configure S3 website hostingsetup_scaleway_faas.pyโ Setup Scaleway Functionssetup_workmail.pyโ Setup AWS WorkMailmanage_mailjet_contacts.pyโ Manage Mailjet contactsauto_certificate.pyโ SSL certificate automation
Run them directly:
python -m granny.create.setup_s3_website example.com --help
Or via the CLI:
granny create s3-website example.com --help
Project Structure
granny/
โโโ cli/ # CLI command modules
โ โโโ analyze.py # AWS resource analysis
โ โโโ cdn.py # Bunny CDN management
โ โโโ create.py # Infrastructure provisioning
โ โโโ credentials.py # Secret management
โ โโโ docker.py # Docker build commands
โ โโโ dns.py # DNS management
โ โโโ edge.py # Bunny Edge Scripting
โ โโโ email.py # Email management
โ โโโ main.py # CLI entrypoint
โ โโโ serverless.py # Serverless functions
โ โโโ storage.py # Storage management
โโโ analyze/ # AWS analysis modules
โโโ cdn/ # CDN provider modules
โโโ create/ # Setup scripts
โโโ credentials/ # Secret management
โโโ dns/ # DNS provider modules
โโโ docker/ # Docker build utilities
โโโ edge/ # Edge Scripting modules
โโโ email/ # Email service modules
โโโ serverless/ # Serverless provider modules
โโโ storage/ # Storage provider modules
โโโ report.py # Reporting utilities
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
uv run pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License โ see the LICENSE file for details.
Support
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check the documentation for detailed guides
- Run
granny --helporgranny <command> --helpfor CLI usage
Granny โ Making cloud infrastructure management simple again.
Built with โค๏ธ by Martin Wieser and contributors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file granny_devops-0.5.0.tar.gz.
File metadata
- Download URL: granny_devops-0.5.0.tar.gz
- Upload date:
- Size: 197.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
175a389f3e8a47048a41e890e0ddea13bdbb00ac51e994ffa0867b822db04eba
|
|
| MD5 |
d274d30609129ed748c906d893cfbfbc
|
|
| BLAKE2b-256 |
e706cecc0a209dfd049b51c1352a6a27e7dd1c9df3604e09651b4fc21fceda7b
|
File details
Details for the file granny_devops-0.5.0-py3-none-any.whl.
File metadata
- Download URL: granny_devops-0.5.0-py3-none-any.whl
- Upload date:
- Size: 232.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9241d529de97f868823d869a09f8b0cb61e0560119dd73616a6888840f5fddc2
|
|
| MD5 |
d7089fadd62b884825e512be0ac2cac4
|
|
| BLAKE2b-256 |
13e564acdc7dacaeef90d249bbd41f504cf1d0b84a6636b88dc08b3560b1a07d
|