A tool for generating astronomer software deployment compute reports
Project description
Orbis
Orbis is a deployment compute report generator tool developed by RDC Team. It analyzes data from Prometheus to provide insights into deployment metrics and resource utilization for Astronomer Software platforms.
Docs
- Internal Docs : https://potential-waffle-pl91nlj.pages.github.io/
- External Docs : https://astronomer.github.io/orbis-docs/
Features
- Generates comprehensive deployment compute reports
- Analyzes CPU, memory, and pod count metrics
- Supports both Kubernetes and Celery executors
- Creates visualizations for easy data interpretation
- Exports reports in DOCX, JSON, and CSV formats
- Supports resume functionality for interrupted report generation
- Diagnostic scanner for collecting cluster information
Flow Diagram
Installation
To install Orbis, follow these steps:
-
Download the distributions from Releases
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the package:
pip install orbis-0.4.0-py3-none-any.whl
Docker Build
You can also run Orbis using Docker. Here's how:
-
Build the Docker image:
docker build -t orbis-tool .
-
Run Orbis using Docker:
# Run interactive shell docker run -it orbis-tool bash # Run Orbis command directly (example) docker run --rm -it \ --env-file .env \ -v $(pwd)/output:/app/output \ orbis-tool orbis compute-software \ -s <start-date> \ -e <end-date> \ -o <organization>
Replace
<start-date>,<end-date>, and<organization>with your desired values.Note: Make sure to:
- Create a
.envfile with required environment variables - Mount the output directory to persist the generated reports
- Create a
Configuration
Before running Orbis, Generate a System Admin Level API Token and add it to the .env file as ASTRO_SOFTWARE_API_TOKEN=<GENERATED_TOKEN>.
Usage
NOTE: The sizing subcommand is now deprecated and will be removed in future versions.
To generate a deployment compute report for Astronomer Software, use the following command:
orbis compute-software -s START_DATE -e END_DATE -o ORGANIZATION_ID [-v] [-w Workspaces] [-z] [-r] [-p] [-u]
Arguments:
-s, --start_date: Start date for the report (format: YYYY-MM-DD)-e, --end_date: End date for the report (format: YYYY-MM-DD)-o, --organization_id: BASEDOMAIN-v, --verbose: Enable verbose logging (optional)-c, --clusters: Comma-separated list of cluster IDs (for Astro, optional)-w, --workspaces: Comma-separated list of Workspace IDs (for Software, optional)-z, --compress: Compress the output reports (optional)-r, --resume: Resume report generation from the last saved state (optional)-p, --persist: Persist temporary files in output folder (optional)-u, --url: Pre-signed (in quotes) URL to upload report (for Software, optional)
Example:
orbis compute-software -s 2023-01-01 -e 2023-01-31 -o your-organization-domain.com
Scanner
The scanner functionality allows you to collect diagnostic information from Kubernetes clusters:
orbis scanner create -n NAMESPACE --image quay.io/astronomer/orbis-scanner:latest [OPTIONS]
Key commands:
orbis scanner create: Create and run diagnostic scannerorbis scanner retrieve: Retrieve data from existing scanner podorbis scanner status: Check scanner job statusorbis scanner clean: Clean up scanner resources
See scanner-image/ directory for container image definition.
Output
Orbis generates:
- A comprehensive deployment compute report in DOCX format
- A JSON report for automation purposes
- A CSV report for automation purposes
Development
To set up the development environment:
-
Clone the repository
-
Install development dependencies:
pip install -e ".[dev]" -
Install pre-commit hooks:
pre-commit install -
Run tests:
pytest tests/
Debugging
Create a .vscode folder and add launch.json file with the following contents:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Orbis",
"type": "debugpy",
"request": "launch",
"module": "orbis.cli",
"console": "integratedTerminal",
"args": [
"sizing",
"-o",
"<org_id>",
"-s",
"2024-07-03",
"-e",
"2024-07-04"
]
}
]
}
Using pre-commit
Pre-commit is used to maintain code quality. Here's how to use it:
-
Run pre-commit on all files:
pre-commit run --all-files -
Run pre-commit on staged files:
pre-commit run -
Run a specific hook:
pre-commit run <hook_id>Replace
<hook_id>with the ID of the specific hook you want to run (e.g.,ruff). -
To bypass pre-commit hooks when committing:
git commit -m "Your commit message" --no-verify
Pre-commit will run automatically before each commit once the hooks are installed.
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 astronomer_orbis-0.8.0rc13.tar.gz.
File metadata
- Download URL: astronomer_orbis-0.8.0rc13.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47b3435695400b128c50a93fcf7326fd92c5e796ed7b58871a58342013d0cf00
|
|
| MD5 |
f1d15d10dc51d8e37eff0e426b42704f
|
|
| BLAKE2b-256 |
852be15cfc6a4fb778bba28ed76b349f4b5f1b8c98ab37c1c812fbde37c775be
|
Provenance
The following attestation bundles were made for astronomer_orbis-0.8.0rc13.tar.gz:
Publisher:
pypi.yaml on astronomer/orbis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astronomer_orbis-0.8.0rc13.tar.gz -
Subject digest:
47b3435695400b128c50a93fcf7326fd92c5e796ed7b58871a58342013d0cf00 - Sigstore transparency entry: 339649981
- Sigstore integration time:
-
Permalink:
astronomer/orbis@b1a70ff8e265b5593fd6fa2207720a7d3791000f -
Branch / Tag:
refs/tags/0.8.0-rc.13 - Owner: https://github.com/astronomer
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@b1a70ff8e265b5593fd6fa2207720a7d3791000f -
Trigger Event:
release
-
Statement type:
File details
Details for the file astronomer_orbis-0.8.0rc13-py3-none-any.whl.
File metadata
- Download URL: astronomer_orbis-0.8.0rc13-py3-none-any.whl
- Upload date:
- Size: 72.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6641d9cabc8aacdf74c83f671c08b88d2040f5c9dba49c463a863dc63e2ab63
|
|
| MD5 |
b50cce8c9ba28483854cc650b84415ed
|
|
| BLAKE2b-256 |
3ec1c3053ddebaa52d65195f632e8c2639f681f0bf3384f03666848d69c2f722
|
Provenance
The following attestation bundles were made for astronomer_orbis-0.8.0rc13-py3-none-any.whl:
Publisher:
pypi.yaml on astronomer/orbis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astronomer_orbis-0.8.0rc13-py3-none-any.whl -
Subject digest:
d6641d9cabc8aacdf74c83f671c08b88d2040f5c9dba49c463a863dc63e2ab63 - Sigstore transparency entry: 339650009
- Sigstore integration time:
-
Permalink:
astronomer/orbis@b1a70ff8e265b5593fd6fa2207720a7d3791000f -
Branch / Tag:
refs/tags/0.8.0-rc.13 - Owner: https://github.com/astronomer
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@b1a70ff8e265b5593fd6fa2207720a7d3791000f -
Trigger Event:
release
-
Statement type: