๐ฅ CloudOps Automation at Scale ๐ฆ
๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ
๐ You can use CloudOps Automation Runbooks, built on Jupyter Notebooks, to quickly create SRE RunBooks for Runbook Automation and Cloud Infrastructure Management! ๐
๐ ๏ธ Features
- ๐ฅ โ
Lightning-Fast Toolchain: Powered by ๐ฆ
uv- Next-generation Python dependency and build management, ๐ruff- Linting and formatting at blazing speed, and ๐งช pytest - Robust testing framework with coverage reports. - ๐ฅ โ
Effortless CI/CD Pipelines: ๐ ๏ธ Taskfile Automation - Say goodbye to manual SDLC repetitive tasks, ๐ณ Containerized Workflows โ ๐ก๏ธ Security-first practices and Multi-stage Wolfi-based Docker builds for scalable production-ready environments, and โ๏ธ Auto-publish to
PyPIand GitHub Container Registry (GHCR) with GitHub Actions. - ๐ฅ โ๏ธCloudOps Automation and FinOps Toolkit โ Pre-configured hybrid-cloud workflows and seamlessly integrations (jupyterlab, mkdocs, boto3, moto) for managing cloud infrastructure ๐.
| Feature | Toolchain | Purpose |
|---|---|---|
| ๐ ๏ธ Configuration | pyproject.toml |
Centralized configuration for dependencies, testing, and linting. |
| ๐งน Task Automation | Taskfile |
Automates repetitive tasks like linting, testing, and publishing. |
| ๐ฆ Python Dependencies | uv |
Lightning-fast dependency resolution, caching, and builds. |
| ๐ Linting & Formatting | ruff |
Enforces code quality standards, auto-formatting, and import sorting. |
| ๐งช Testing Framework | pytest |
Comprehensive unit tests, integration tests with coverage reporting. |
| ๐ณ Docker Integration | Dockerfile + DevContainer |
Optimized wolfi-based multi-stage builds for CI/CD and local development environments. |
| ๐ฆพ CI/CD Pipelines | GitHub Actions |
Automated builds, tests, and deployments to PyPI and GHCR. |
| ๐ Security Compliance | chainguard/wolfi-base + SBOM + Attestations |
Ensures compliance, vulnerability scanning, and security transparency. |
๐ Quick Start
1. Clone the Repository
git clone https://github.com/nnthanh101/runbooks.git
cd runbooks
2. Install Dependencies and Run CI/CD Pipelines
echo "Install Python dependencies using UV"
task install
echo "Run CI/CD pipeline tasks: clean, lint, format, test, and build"
task ci
echo "Publish the project package to PyPI"
task publish
3. Run in DevContainer ๐ณ
- Open the project in VSCode.
- Install the Remote - Containers extension.
- Reopen in Container:
Command PaletteCtrl+Shift+Pโ Reopen in Container.
Project Structure
๐ End-to-end Production-grade project structure for successful ๐ CloudOps Automation and Visual Analytics FinOps projects ๐
cloudops-automation/
โโโ .devcontainer/ ## Dev Container configurations
โ โโโ Dockerfile ## Container image build file
โโโ .github/ ## CI/CD workflows
โ โโโ workflows/ ## GitHub Actions workflows
โ โโโ templates/ ## Workflow templates
โโโ .vscode/ ## IDE-specific configurations
โโโ config/ ## Configuration files (YAML, JSON)
โโโ data ๐ Where all your raw and processed data files are stored.
โ โโโ external <- Data from third-party sources.
โ โโโ interim <- Intermediate data that has been transformed.
โ โโโ processed <- The final, canonical data sets for modeling.
โ โโโ raw <- The original, unprocessed, immutable data dump.
โ
โโโ docs ๐ A default mkdocs project; see mkdocs.org for details
โ โโโ api/ ## API documentation
โ โโโ architecture/ ## Architecture diagrams
โ โโโ tutorials/ ## Tutorials and guides
โ โโโ getting-started.md ## Quickstart guide
โ โโโ index.md ## Overview documentation
โ
โโโ logs/ ## Log files for debugging
|
โโโ models ๐ง Store your trained and serialized models for easy access and versioning.
โ
โโโ notebooks ๐ป Jupyter notebooks for experiments and visualization.
โ โโโ data_exploration.ipynb
โ โโโ data_preprocessing.ipynb
โ โโโ model_training.ipynb
โ โโโ model_evaluation.ipynb
โ
โโโ pyproject.toml <- Project configuration file with package metadata for
โ runbooks and configuration for tools like black
โ
โโโ src/ ## ๐งฉ Source code for use in this project.
โ โโโ runbooks/ ## Main module for CloudOps Runbooks automation
โ โ โโโ __init__.py ## Package initializer
โ โ โโโ calculator.py ## [Python101] Calculator
โ โ โโโ config.py
โ โ โโโ exceptions.py
โ โ โโโ utils.py ## Utility scripts (logging, configs)
โ โ โโโ cleanup.py ## Cleanup automation runbook
โ โโโ main.py
โโโ test/ ## Unit and integration tests
โ โโโ conftest.py
โ โโโ __init__.py
โ โโโ test_calculator.py ## [Python101] Test cases for calculator
โ โโโ test_utils.py ## Test cases for utils
โ โโโ test_exceptions.py
โโโ templates/ ## Terraform and CloudFormation templates
โโโ tools/ ## Developer tools and scripts
โโโ .dockerignore ## Docker ignore file
โโโ .env ## Environment variables
โโโ .gitignore ## Git ignore file
โโโ .python-version ## Python version management
โโโ .gitignore
โโโ mkdocs.yml # Documentation generator configuration
โโโ README.md ๐ค Explain your project and its structure for better collaboration.
โโโ references <- Data dictionaries, manuals, and all other explanatory materials.
โ
โโโ reports ๐ Generated analysis (reports, charts, and plots) as HTML, PDF, LaTeX.
โ โโโ figures <- Generated graphics and figures to be used in reporting
โ
โโโ requirements.txt ๐ The requirements file for reproducing the analysis environment, for easy environment setup.
โโโ Taskfile <- Taskfile with convenience commands like `task data` or `task train`
Github Container Registry to store and manage Docker and OCI images
- Check if the image exists in GitHub Packages:
docker pull ghcr.io/nnthanh101/runbooks:latest
- If the image doesn't exist, build and push it:
docker build -t ghcr.io/nnthanh101/runbooks:latest .
docker login ghcr.io -u nnthanh -p GH_TOKEN
docker push ghcr.io/nnthanh101/runbooks:latest
- Inspect
docker inspect ghcr.io/nnthanh101/runbooks:latest