Skip to main content

A tool for generating astronomer software deployment compute reports

Project description

Orbis

Orbis Logo

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

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

Flow Diagram

Alt text

Installation

To install Orbis, follow these steps:

  1. Download the distributions from Releases

  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. 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:

  1. Build the Docker image:

    docker build -t orbis-tool .
    
  2. 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 .env file with required environment variables
    • Mount the output directory to persist the generated reports

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

Output

Orbis generates:

  1. A comprehensive deployment compute report in DOCX format
  2. A JSON report for automation purposes
  3. A CSV report for automation purposes

Development

To set up the development environment:

  1. Clone the repository

  2. Install development dependencies:

    pip install -e ".[dev]"
    
  3. Install pre-commit hooks:

    pre-commit install
    
  4. 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:

  1. Run pre-commit on all files:

    pre-commit run --all-files
    
  2. Run pre-commit on staged files:

    pre-commit run
    
  3. 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).

  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astronomer_orbis-0.8.0rc4.tar.gz (37.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astronomer_orbis-0.8.0rc4-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file astronomer_orbis-0.8.0rc4.tar.gz.

File metadata

  • Download URL: astronomer_orbis-0.8.0rc4.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for astronomer_orbis-0.8.0rc4.tar.gz
Algorithm Hash digest
SHA256 dfc298e53b756063460d5609a67691fd2bbdc716546d251b342291f421bcf712
MD5 fa230f27011bd4fbbe8812d9a5983f16
BLAKE2b-256 3ff92b85322a261401c442fdb15c95f79e98a2ded919cbd4b70af3af1e361c2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for astronomer_orbis-0.8.0rc4.tar.gz:

Publisher: pypi.yaml on astronomer/orbis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astronomer_orbis-0.8.0rc4-py3-none-any.whl.

File metadata

File hashes

Hashes for astronomer_orbis-0.8.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 0523d0d351b63bb7f3ee4c044ec1f075c6d86e3af3693e4823a72d4f05fb8765
MD5 d9435f9c700e3ec8a41528ea5b4fa3be
BLAKE2b-256 200f92e6cc0e7f60dba323901fdc6559a9914715d114d1c13a6a6d73c6e8bd22

See more details on using hashes here.

Provenance

The following attestation bundles were made for astronomer_orbis-0.8.0rc4-py3-none-any.whl:

Publisher: pypi.yaml on astronomer/orbis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page