runbooks


Namerunbooks JSON
Version 0.2.3 PyPI version JSON
download
home_pageNone
SummaryCloudOps Automation Toolkit for DevOps and SRE teams.
upload_time2025-01-24 01:55:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) 2025, Nhat-Thanh Nguyen <nnthanh101@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords runbooks automation devops sre cloudops
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ๐Ÿ”ฅ CloudOps Automation at Scale ๐Ÿฆ…

๐ŸŒŸ You can use [CloudOps Automation Runbooks](https://cloudops.oceansoft.io), built on Jupyter Notebooks, to quickly create SRE RunBooks for Runbook Automation and Cloud Infrastructure Management! ๐ŸŒ

> [!IMPORTANT]
> **๐Ÿ† Mission**: Our mission is to simplify CloudOps Automation for DevOps and SRE teams by providing an extensive, community-driven repository of actions and runbooks that streamline day-to-day operations. 

> [!NOTE]
> **๐Ÿ‘๏ธ Vision**: Our vision is to be the ๐Ÿฅ‡ One-Stop Multi-Cloud Platform Engineering & Best Practices Solution for all CloudOps Automation needs, allowing DevOps and SRE teams to automate their workflows with ease, improve efficiency, and minimize toil.

[![๐Ÿ Runbooks PyPI version](https://img.shields.io/pypi/v/runbooks)](https://pypi.org/project/runbooks/) ![๐Ÿฆพ GitHub Container Registry](https://img.shields.io/github/v/tag/nnthanh101/runbooks:latest?label=GHCR%20Version&color=blue&logo=docker)


<div align="left">
  <a href="https://www.linkedin.com/in/nnthanh" target="blank"><img align="center" src="https://img.shields.io/badge/-nnthanh-blue?style=flat-square&logo=Linkedin&logoColor=white&link=https://www.linkedin.com/in/nnthanh/" alt="Nhat-Thanh Nguyen" height="25" width="100" /></a>
  <a href="https://github.com/nnthanh101/" target="blank"><img align="center" src="https://img.shields.io/github/followers/nnthanh101?label=Follow&style=social&link=https://github.com/nnthanh101/" alt="Thanh Nguyen" height="25" width="100" /></a>
  <a href="https://www.facebook.com/groups/platformengineering" target="blank"><img align="center" src="https://img.shields.io/badge/Facebook-blue?style=flat-square&logo=facebook&logoColor=white&link=[https://www.linkedin.com/in/nnthanh/](https://www.facebook.com/groups/platformengineering)" alt="Nhat-Thanh Nguyen" height="25" width="100" /></a>  
</div>

---

## ๐Ÿ› ๏ธ 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 `PyPI` and 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`](https://taskfile.dev/) | Automates repetitive tasks like linting, testing, and publishing.  |
| ๐Ÿ“ฆ Python Dependencies   | [`uv`](https://docs.astral.sh/uv/)  | Lightning-fast dependency resolution, caching, and builds. |
| ๐Ÿ’… Linting & Formatting  | [`ruff`](https://docs.astral.sh/ruff/) | Enforces code quality standards, auto-formatting, and import sorting.  |
| ๐Ÿงช Testing Framework     | [`pytest`](https://docs.pytest.org/)  | Comprehensive unit tests, integration tests with coverage reporting.    |
| ๐Ÿณ Docker Integration    | Dockerfile + [`DevContainer`](https://containers.dev/)  | Optimized wolfi-based multi-stage builds for CI/CD and local development environments. |
| ๐Ÿฆพ CI/CD Pipelines       | [`GitHub Actions`](https://github.com/features/actions) | Automated builds, tests, and deployments to PyPI and GHCR. |
| ๐Ÿ“ Security Compliance   | [`chainguard/wolfi-base`](https://hub.docker.com/r/chainguard/wolfi-base) + SBOM + Attestations | Ensures compliance, vulnerability scanning, and security transparency. |

---

### WIP

- [ ] ๐Ÿ“š auto doc generation
- [ ] **CLI Tools** โ€“ Typer simplifies automation for AWS resources.  
- [ ] **Logging** โ€“ Loguru ensures structured logs for debugging. 
- [x] ๐Ÿณ CI/CD Optimized Docker Image runs when a new *release* is created pushing to gh registry
- [x] ๐Ÿฆพ GitHub actions:
    - [x] auto publish to [`pypi`](https://pypi.org/) on push on `main`
    - [ ] auto creating a new tag on push on `main`, sync versions
    - [x] run `tests` and `lint` on `dev` and `main` when a PR is open

## ๐Ÿš€ Quick Start

### 1. Clone the Repository

```bash
git clone https://github.com/nnthanh101/runbooks.git
cd runbooks
```

### 2. Install Dependencies and Run CI/CD Pipelines

```bash
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 ๐Ÿณ

1. Open the project in **VSCode**.  
2. Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.  
3. **Reopen in Container**:  
   **Command Palette `Ctrl+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](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)

1. Check if the image exists in GitHub Packages:

```
docker pull ghcr.io/nnthanh101/runbooks:latest
```

2. 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
```

3. Inspect

```
docker inspect ghcr.io/nnthanh101/runbooks:latest
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "runbooks",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "runbooks, automation, DevOps, SRE, CloudOps",
    "author": null,
    "author_email": "runbooks maintainers <nnthanh101@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2b/46/8f829113d30f571f8c8ded79193c10e66ba6342ea1b4cb9ceac14c800930/runbooks-0.2.3.tar.gz",
    "platform": null,
    "description": "# \ud83d\udd25 CloudOps Automation at Scale \ud83e\udd85\n\n\ud83c\udf1f You can use [CloudOps Automation Runbooks](https://cloudops.oceansoft.io), built on Jupyter Notebooks, to quickly create SRE RunBooks for Runbook Automation and Cloud Infrastructure Management! \ud83c\udf10\n\n> [!IMPORTANT]\n> **\ud83c\udfc6 Mission**: Our mission is to simplify CloudOps Automation for DevOps and SRE teams by providing an extensive, community-driven repository of actions and runbooks that streamline day-to-day operations. \n\n> [!NOTE]\n> **\ud83d\udc41\ufe0f Vision**: Our vision is to be the \ud83e\udd47 One-Stop Multi-Cloud Platform Engineering & Best Practices Solution for all CloudOps Automation needs, allowing DevOps and SRE teams to automate their workflows with ease, improve efficiency, and minimize toil.\n\n[![\ud83d\udc0d Runbooks PyPI version](https://img.shields.io/pypi/v/runbooks)](https://pypi.org/project/runbooks/) ![\ud83e\uddbe GitHub Container Registry](https://img.shields.io/github/v/tag/nnthanh101/runbooks:latest?label=GHCR%20Version&color=blue&logo=docker)\n\n\n<div align=\"left\">\n  <a href=\"https://www.linkedin.com/in/nnthanh\" target=\"blank\"><img align=\"center\" src=\"https://img.shields.io/badge/-nnthanh-blue?style=flat-square&logo=Linkedin&logoColor=white&link=https://www.linkedin.com/in/nnthanh/\" alt=\"Nhat-Thanh Nguyen\" height=\"25\" width=\"100\" /></a>\n  <a href=\"https://github.com/nnthanh101/\" target=\"blank\"><img align=\"center\" src=\"https://img.shields.io/github/followers/nnthanh101?label=Follow&style=social&link=https://github.com/nnthanh101/\" alt=\"Thanh Nguyen\" height=\"25\" width=\"100\" /></a>\n  <a href=\"https://www.facebook.com/groups/platformengineering\" target=\"blank\"><img align=\"center\" src=\"https://img.shields.io/badge/Facebook-blue?style=flat-square&logo=facebook&logoColor=white&link=[https://www.linkedin.com/in/nnthanh/](https://www.facebook.com/groups/platformengineering)\" alt=\"Nhat-Thanh Nguyen\" height=\"25\" width=\"100\" /></a>  \n</div>\n\n---\n\n## \ud83d\udee0\ufe0f Features\n\n* \ud83e\udd49 \u2705**Lightning-Fast Toolchain**: Powered by \ud83d\udce6 `uv` - Next-generation Python dependency and build management, \ud83d\udc85 `ruff` - Linting and formatting at blazing speed, and \ud83e\uddea pytest - Robust testing framework with coverage reports.\n* \ud83e\udd48 \u2705**Effortless CI/CD Pipelines**: \ud83d\udee0\ufe0f Taskfile Automation - Say goodbye to manual SDLC repetitive tasks, \ud83d\udc33 Containerized Workflows \u2013 \ud83d\udee1\ufe0f Security-first practices and Multi-stage Wolfi-based Docker builds for scalable production-ready environments, and \u2699\ufe0f Auto-publish to `PyPI` and GitHub Container Registry (`GHCR`) with GitHub Actions.\n* \ud83e\udd47 \u2611\ufe0f**CloudOps Automation and FinOps Toolkit** \u2013 Pre-configured hybrid-cloud workflows and seamlessly integrations (jupyterlab, mkdocs, boto3, moto) for managing cloud infrastructure \ud83c\udf10.  \n\n| **Feature**              | **Toolchain**                            | **Purpose**                                        |\n|--------------------------|-------------------------------------|----------------------------------------------------|\n| \ud83d\udee0\ufe0f Configuration         | `pyproject.toml`                 | Centralized configuration for dependencies, testing, and linting.  |\n| \ud83e\uddf9 Task Automation       | [`Taskfile`](https://taskfile.dev/) | Automates repetitive tasks like linting, testing, and publishing.  |\n| \ud83d\udce6 Python Dependencies   | [`uv`](https://docs.astral.sh/uv/)  | Lightning-fast dependency resolution, caching, and builds. |\n| \ud83d\udc85 Linting & Formatting  | [`ruff`](https://docs.astral.sh/ruff/) | Enforces code quality standards, auto-formatting, and import sorting.  |\n| \ud83e\uddea Testing Framework     | [`pytest`](https://docs.pytest.org/)  | Comprehensive unit tests, integration tests with coverage reporting.    |\n| \ud83d\udc33 Docker Integration    | Dockerfile + [`DevContainer`](https://containers.dev/)  | Optimized wolfi-based multi-stage builds for CI/CD and local development environments. |\n| \ud83e\uddbe CI/CD Pipelines       | [`GitHub Actions`](https://github.com/features/actions) | Automated builds, tests, and deployments to PyPI and GHCR. |\n| \ud83d\udcdd Security Compliance   | [`chainguard/wolfi-base`](https://hub.docker.com/r/chainguard/wolfi-base) + SBOM + Attestations | Ensures compliance, vulnerability scanning, and security transparency. |\n\n---\n\n### WIP\n\n- [ ] \ud83d\udcda auto doc generation\n- [ ] **CLI Tools** \u2013 Typer simplifies automation for AWS resources.  \n- [ ] **Logging** \u2013 Loguru ensures structured logs for debugging. \n- [x] \ud83d\udc33 CI/CD Optimized Docker Image runs when a new *release* is created pushing to gh registry\n- [x] \ud83e\uddbe GitHub actions:\n    - [x] auto publish to [`pypi`](https://pypi.org/) on push on `main`\n    - [ ] auto creating a new tag on push on `main`, sync versions\n    - [x] run `tests` and `lint` on `dev` and `main` when a PR is open\n\n## \ud83d\ude80 Quick Start\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/nnthanh101/runbooks.git\ncd runbooks\n```\n\n### 2. Install Dependencies and Run CI/CD Pipelines\n\n```bash\necho \"Install Python dependencies using UV\"\ntask install\n\necho \"Run CI/CD pipeline tasks: clean, lint, format, test, and build\"\ntask ci\n\necho \"Publish the project package to PyPI\"\ntask publish\n```\n\n### 3. Run in DevContainer \ud83d\udc33\n\n1. Open the project in **VSCode**.  \n2. Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.  \n3. **Reopen in Container**:  \n   **Command Palette `Ctrl+Shift+P` \u2192 Reopen in Container**.  \n\n---\n\n## Project Structure\n\n> \ud83d\udee0 End-to-end Production-grade project structure for successful \ud83d\udc8e CloudOps Automation and Visual Analytics FinOps projects \ud83d\ude80\n\n```\ncloudops-automation/\n\u251c\u2500\u2500 .devcontainer/     ## Dev Container configurations\n\u2502   \u2514\u2500\u2500 Dockerfile     ## Container image build file\n\u251c\u2500\u2500 .github/           ## CI/CD workflows\n\u2502   \u251c\u2500\u2500 workflows/     ## GitHub Actions workflows\n\u2502   \u2514\u2500\u2500 templates/     ## Workflow templates\n\u251c\u2500\u2500 .vscode/           ## IDE-specific configurations\n\u251c\u2500\u2500 config/            ## Configuration files (YAML, JSON)\n\u251c\u2500\u2500 data               \ud83d\udd0d Where all your raw and processed data files are stored.\n\u2502   \u251c\u2500\u2500 external       <- Data from third-party sources.\n\u2502   \u251c\u2500\u2500 interim        <- Intermediate data that has been transformed.\n\u2502   \u251c\u2500\u2500 processed      <- The final, canonical data sets for modeling.\n\u2502   \u2514\u2500\u2500 raw            <- The original, unprocessed, immutable data dump.\n\u2502\n\u251c\u2500\u2500 docs               \ud83d\udcd3 A default mkdocs project; see mkdocs.org for details\n\u2502   \u251c\u2500\u2500 api/                 ## API documentation\n\u2502   \u251c\u2500\u2500 architecture/        ## Architecture diagrams\n\u2502   \u251c\u2500\u2500 tutorials/           ## Tutorials and guides\n\u2502   \u251c\u2500\u2500 getting-started.md   ## Quickstart guide\n\u2502   \u2514\u2500\u2500 index.md             ## Overview documentation\n\u2502\n\u251c\u2500\u2500 logs/                    ## Log files for debugging\n|\n\u251c\u2500\u2500 models             \ud83e\udde0 Store your trained and serialized models for easy access and versioning.\n\u2502\n\u251c\u2500\u2500 notebooks          \ud83d\udcbb Jupyter notebooks for experiments and visualization.\n\u2502   \u251c\u2500\u2500 data_exploration.ipynb\n\u2502   \u251c\u2500\u2500 data_preprocessing.ipynb\n\u2502   \u251c\u2500\u2500 model_training.ipynb\n\u2502   \u2514\u2500\u2500 model_evaluation.ipynb\n\u2502\n\u251c\u2500\u2500 pyproject.toml     <- Project configuration file with package metadata for \n\u2502                         runbooks and configuration for tools like black\n\u2502\n\u251c\u2500\u2500 src/                            ## \ud83e\udde9 Source code for use in this project.\n\u2502   \u251c\u2500\u2500 runbooks/                   ## Main module for CloudOps Runbooks automation\n\u2502   \u2502   \u251c\u2500\u2500 __init__.py             ## Package initializer\n\u2502   \u2502   \u251c\u2500\u2500 calculator.py           ## [Python101] Calculator\n\u2502   \u2502   \u251c\u2500\u2500 config.py\n\u2502   \u2502   \u251c\u2500\u2500 exceptions.py\n\u2502   \u2502   \u251c\u2500\u2500 utils.py                ## Utility scripts (logging, configs)\n\u2502   \u2502   \u2514\u2500\u2500 cleanup.py              ## Cleanup automation runbook\n\u2502   \u251c\u2500\u2500 main.py     \n\u251c\u2500\u2500 test/                           ## Unit and integration tests\n\u2502   \u251c\u2500\u2500 conftest.py\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u251c\u2500\u2500 test_calculator.py          ## [Python101] Test cases for calculator\n\u2502   \u251c\u2500\u2500 test_utils.py               ## Test cases for utils\n\u2502   \u2514\u2500\u2500 test_exceptions.py         \n\u251c\u2500\u2500 templates/                      ## Terraform and CloudFormation templates\n\u251c\u2500\u2500 tools/                          ## Developer tools and scripts\n\u251c\u2500\u2500 .dockerignore                   ## Docker ignore file\n\u251c\u2500\u2500 .env                            ## Environment variables\n\u251c\u2500\u2500 .gitignore                      ## Git ignore file\n\u251c\u2500\u2500 .python-version                 ## Python version management\n\u251c\u2500\u2500 .gitignore\n\u251c\u2500\u2500 mkdocs.yml                      # Documentation generator configuration\n\u251c\u2500\u2500 README.md          \ud83e\udd1d Explain your project and its structure for better collaboration.\n\u251c\u2500\u2500 references         <- Data dictionaries, manuals, and all other explanatory materials.\n\u2502\n\u251c\u2500\u2500 reports            \ud83d\udcca Generated analysis (reports, charts, and plots) as HTML, PDF, LaTeX.\n\u2502   \u2514\u2500\u2500 figures        <- Generated graphics and figures to be used in reporting\n\u2502\n\u251c\u2500\u2500 requirements.txt   \ud83d\udee0 The requirements file for reproducing the analysis environment, for easy environment setup.\n\u2514\u2500\u2500 Taskfile           <- Taskfile with convenience commands like `task data` or `task train`\n\n```\n\n### [Github Container Registry to store and manage Docker and OCI images](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)\n\n1. Check if the image exists in GitHub Packages:\n\n```\ndocker pull ghcr.io/nnthanh101/runbooks:latest\n```\n\n2. If the image doesn't exist, build and push it:\n\n```\ndocker build -t ghcr.io/nnthanh101/runbooks:latest .\ndocker login ghcr.io -u nnthanh -p GH_TOKEN\ndocker push ghcr.io/nnthanh101/runbooks:latest\n```\n\n3. Inspect\n\n```\ndocker inspect ghcr.io/nnthanh101/runbooks:latest\n```\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  \"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  \"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  \"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.  \"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  \"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  \"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  \"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  \"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"  \"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets \"[]\" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same \"printed page\" as the copyright notice for easier identification within third-party archives.  Copyright (c) 2025, Nhat-Thanh Nguyen <nnthanh101@gmail.com>  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ",
    "summary": "CloudOps Automation Toolkit for DevOps and SRE teams.",
    "version": "0.2.3",
    "project_urls": null,
    "split_keywords": [
        "runbooks",
        " automation",
        " devops",
        " sre",
        " cloudops"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9affcb7a2b15c2d4e80a492826fa3a84685c940dc0f0b66631076bb80882183b",
                "md5": "b1a4c24529ed4df41e99674f93a5b8d0",
                "sha256": "aba0c5bb08d554506b3f9b8710aeca0cf6e52e2c1ca1f75be636d2438cb0b54f"
            },
            "downloads": -1,
            "filename": "runbooks-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b1a4c24529ed4df41e99674f93a5b8d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 88955,
            "upload_time": "2025-01-24T01:55:06",
            "upload_time_iso_8601": "2025-01-24T01:55:06.885688Z",
            "url": "https://files.pythonhosted.org/packages/9a/ff/cb7a2b15c2d4e80a492826fa3a84685c940dc0f0b66631076bb80882183b/runbooks-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2b468f829113d30f571f8c8ded79193c10e66ba6342ea1b4cb9ceac14c800930",
                "md5": "e78bbdba2bce171da2b1c1e051575c8b",
                "sha256": "b62eeaf6f128a2d6c8fc0815eb634ba88d6032493f8c355565bbf92c37636410"
            },
            "downloads": -1,
            "filename": "runbooks-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e78bbdba2bce171da2b1c1e051575c8b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 68114,
            "upload_time": "2025-01-24T01:55:09",
            "upload_time_iso_8601": "2025-01-24T01:55:09.784457Z",
            "url": "https://files.pythonhosted.org/packages/2b/46/8f829113d30f571f8c8ded79193c10e66ba6342ea1b4cb9ceac14c800930/runbooks-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-24 01:55:09",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "runbooks"
}
        
Elapsed time: 3.59562s