cast-ai-se-cli


Namecast-ai-se-cli JSON
Version 0.0.24 PyPI version JSON
download
home_pageNone
SummaryProvides a CLI to run all sorts of sequences like demo prep.
upload_time2024-03-31 14:17:53
maintainerNone
docs_urlNone
authorDan Amzulescu
requires_python>=3.11
licenseNone
keywords cast command-line cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CAST AI SE CLI (cast-ai-se-cli package | se-cli tool)

[![PyPI version](https://img.shields.io/pypi/v/my-awesome-package.svg)](https://pypi.org/project/cast-ai-se-cli/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Code Style](https://img.shields.io/badge/code%20style-flake8-000000.svg)](https://flake8.pycqa.org/)

[![GitHub Issues](https://img.shields.io/github/issues/castai/solutions-engineering-lab)](https://github.com/castai/solutions-engineering-lab/issues)
[![GitHub release](https://img.shields.io/github/release/castai/solutions-engineering-lab)](https://github.com/castai/solutions-engineering-lab/releases)

## Introduction / Overview

This project aims to serve as swiss knife intended to serve CAST AI SEs.
Assisting with demo environment prep, providing snapshot analysis and many others in the future.
The CLI tool is based on a modular architecture and leverages API orchestration tools package -> cast-ai-se-tools

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

## Installation

To install, run:\
    `pip install cast-ai-se-cli`\
or forced:\
    `pip install cast-ai-se-cli --force-reinstall`

To upgrade, run:\
    `pip install --upgrade cast-ai-se-cli` \
or forced:\
    `pip install --upgrade --force-reinstall cast-ai-se-cli`

## Usage

For some of the functions(commands) the tool offers a configuration file is required (config.json).\
First time running the tool if file is not found, the tool would create an empty template file.\
The user is required to fill fields required to automate sequences related to the chosen command. \
The template comes with additional default parameters that can found [here](config_constants.py)


### High-Level:
### CLI commands:
    se-cli demo <prep|off> <eks|aks|gcp> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]
    se-cli snapshot <analyze> <brief|detailed> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]
    se-cli audit <analyze> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]
#### CLI commmands explained:
    se-cli demo <prep|off> <eks|aks|gcp>
- demo command is used to either **prep** a demo environment:\
Use the config.json data to get the cluster into a specific node count (default=7) \
with specific replicated demo replicas (default=2) and then delete previous nodes
Turning **off** a cluster would be invoking the hibernation cronjob.

- The subcommand **<eks|aks|gcp>** is to determine which cluster will be prep`ed or turned off.\

 
    se-cli snapshot <analyze> <brief|detailed>

- snapshot command is used to either generate a **brief** or **detailed** report of workloads that have some effect on 
scheduling:
- nodeSelector
- topologySpreadConstraints
- affinity
- runtimeClassName
- pdb`s 

Workloads analyzed:
- deployments
- replicaSets
- daemonSets
- statefulSets
- jobs

The detailed report includes the namespaces and names of workloads
 

### Options:
    -h, --help  Show this help message and exit.
    -d, --debug  Enable debug logging.
    -c, --cluster_id <cluster_id>  (Optional) Specify the cluster ID for the demo environment.

## Command->Outcome:

`se-cli demo prep` :

![Alt Text](images/demo_prep.png)

`se-cli demo off` :

![Alt Text](images/demo_off.png)

Hitting a timeout:

![Alt Text](images/demo_refresh-timeout.png)

`se-cli audit analyze` :

## Contributing

Contributions are welcome! To contribute, follow these steps:

git clone project as first step
create features/fixes by applying a simple <TYPE(fix/feature...)>/<INITIATING_USER>-<FEATURE/FIX-NAME> branch
do not forget to update version and open a PR
Please make sure CI process that enforces light flake8 lint passes (flak8 and other helper script can be found in helper_script folder)

## License

This project is licensed under the [APACHE License](LICENSE).


## Roadmap

- Version 0.1.0: First semi-major release end of 2023 Q4 - tested and vetted demo functionality
- Version 0.2.0: Second semi-major release to support snapshots analysis
- Version 0.3.0: Third semi-major to integrate with solution-engineering tool
- Version 1.0.0: First Major release tested and vetter all other previous releases (end of 2024 Q1)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cast-ai-se-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "cast command-line cli",
    "author": "Dan Amzulescu",
    "author_email": "dan@cast.ai",
    "download_url": "https://files.pythonhosted.org/packages/ef/e4/c4074928e1d9fe0000a95bb4234cec986ab3a476df947ee1e7229af14a6c/cast-ai-se-cli-0.0.24.tar.gz",
    "platform": null,
    "description": "# CAST AI SE CLI (cast-ai-se-cli package | se-cli tool)\r\n\r\n[![PyPI version](https://img.shields.io/pypi/v/my-awesome-package.svg)](https://pypi.org/project/cast-ai-se-cli/)\r\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r\n[![Code Style](https://img.shields.io/badge/code%20style-flake8-000000.svg)](https://flake8.pycqa.org/)\r\n\r\n[![GitHub Issues](https://img.shields.io/github/issues/castai/solutions-engineering-lab)](https://github.com/castai/solutions-engineering-lab/issues)\r\n[![GitHub release](https://img.shields.io/github/release/castai/solutions-engineering-lab)](https://github.com/castai/solutions-engineering-lab/releases)\r\n\r\n## Introduction / Overview\r\n\r\nThis project aims to serve as swiss knife intended to serve CAST AI SEs.\r\nAssisting with demo environment prep, providing snapshot analysis and many others in the future.\r\nThe CLI tool is based on a modular architecture and leverages API orchestration tools package -> cast-ai-se-tools\r\n\r\n## Table of Contents\r\n\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Contributing](#contributing)\r\n- [License](#license)\r\n\r\n## Installation\r\n\r\nTo install, run:\\\r\n    `pip install cast-ai-se-cli`\\\r\nor forced:\\\r\n    `pip install cast-ai-se-cli --force-reinstall`\r\n\r\nTo upgrade, run:\\\r\n    `pip install --upgrade cast-ai-se-cli` \\\r\nor forced:\\\r\n    `pip install --upgrade --force-reinstall cast-ai-se-cli`\r\n\r\n## Usage\r\n\r\nFor some of the functions(commands) the tool offers a configuration file is required (config.json).\\\r\nFirst time running the tool if file is not found, the tool would create an empty template file.\\\r\nThe user is required to fill fields required to automate sequences related to the chosen command. \\\r\nThe template comes with additional default parameters that can found [here](config_constants.py)\r\n\r\n\r\n### High-Level:\r\n### CLI commands:\r\n    se-cli demo <prep|off> <eks|aks|gcp> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]\r\n    se-cli snapshot <analyze> <brief|detailed> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]\r\n    se-cli audit <analyze> [--cluster_id <cluster_id>] [-h|--help] [-d|--debug]\r\n#### CLI commmands explained:\r\n    se-cli demo <prep|off> <eks|aks|gcp>\r\n- demo command is used to either **prep** a demo environment:\\\r\nUse the config.json data to get the cluster into a specific node count (default=7) \\\r\nwith specific replicated demo replicas (default=2) and then delete previous nodes\r\nTurning **off** a cluster would be invoking the hibernation cronjob.\r\n\r\n- The subcommand **<eks|aks|gcp>** is to determine which cluster will be prep`ed or turned off.\\\r\n\r\n \r\n    se-cli snapshot <analyze> <brief|detailed>\r\n\r\n- snapshot command is used to either generate a **brief** or **detailed** report of workloads that have some effect on \r\nscheduling:\r\n- nodeSelector\r\n- topologySpreadConstraints\r\n- affinity\r\n- runtimeClassName\r\n- pdb`s \r\n\r\nWorkloads analyzed:\r\n- deployments\r\n- replicaSets\r\n- daemonSets\r\n- statefulSets\r\n- jobs\r\n\r\nThe detailed report includes the namespaces and names of workloads\r\n \r\n\r\n### Options:\r\n    -h, --help  Show this help message and exit.\r\n    -d, --debug  Enable debug logging.\r\n    -c, --cluster_id <cluster_id>  (Optional) Specify the cluster ID for the demo environment.\r\n\r\n## Command->Outcome:\r\n\r\n`se-cli demo prep` :\r\n\r\n![Alt Text](images/demo_prep.png)\r\n\r\n`se-cli demo off` :\r\n\r\n![Alt Text](images/demo_off.png)\r\n\r\nHitting a timeout:\r\n\r\n![Alt Text](images/demo_refresh-timeout.png)\r\n\r\n`se-cli audit analyze` :\r\n\r\n## Contributing\r\n\r\nContributions are welcome! To contribute, follow these steps:\r\n\r\ngit clone project as first step\r\ncreate features/fixes by applying a simple <TYPE(fix/feature...)>/<INITIATING_USER>-<FEATURE/FIX-NAME> branch\r\ndo not forget to update version and open a PR\r\nPlease make sure CI process that enforces light flake8 lint passes (flak8 and other helper script can be found in helper_script folder)\r\n\r\n## License\r\n\r\nThis project is licensed under the [APACHE License](LICENSE).\r\n\r\n\r\n## Roadmap\r\n\r\n- Version 0.1.0: First semi-major release end of 2023 Q4 - tested and vetted demo functionality\r\n- Version 0.2.0: Second semi-major release to support snapshots analysis\r\n- Version 0.3.0: Third semi-major to integrate with solution-engineering tool\r\n- Version 1.0.0: First Major release tested and vetter all other previous releases (end of 2024 Q1)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Provides a CLI to run all sorts of sequences like demo prep.",
    "version": "0.0.24",
    "project_urls": null,
    "split_keywords": [
        "cast",
        "command-line",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "efe4c4074928e1d9fe0000a95bb4234cec986ab3a476df947ee1e7229af14a6c",
                "md5": "9e786699f050bb6e74c9497908489626",
                "sha256": "be882e4f1ff7372d919099b5bd94f1a4042f8187ca995928e4fed2da1609846b"
            },
            "downloads": -1,
            "filename": "cast-ai-se-cli-0.0.24.tar.gz",
            "has_sig": false,
            "md5_digest": "9e786699f050bb6e74c9497908489626",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17508,
            "upload_time": "2024-03-31T14:17:53",
            "upload_time_iso_8601": "2024-03-31T14:17:53.870501Z",
            "url": "https://files.pythonhosted.org/packages/ef/e4/c4074928e1d9fe0000a95bb4234cec986ab3a476df947ee1e7229af14a6c/cast-ai-se-cli-0.0.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-31 14:17:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "cast-ai-se-cli"
}
        
Elapsed time: 0.21712s