nimbuscli


Namenimbuscli JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/weak-head/nimbus
SummaryNimbus is engineered to optimize data backup processes and efficiently orchestrate service deployments.
upload_time2024-05-05 12:53:46
maintainerNone
docs_urlNone
authorOleksandr Zinchenko
requires_python<4.0,>=3.12
licenseMIT
keywords backup deploy administration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

  <img src="https://raw.githubusercontent.com/weak-head/nimbus/main/docs/logo.png" width="450" />
  
  # nimbus <!-- omit from toc --> 
  
  Nimbus is engineered to optimize data backup processes and efficiently orchestrate service deployments for homelabs and dev environments.
  <br/><br/>

  [![build](https://img.shields.io/github/actions/workflow/status/weak-head/nimbus/test.yaml)](https://github.com/weak-head/nimbus/actions/workflows/test.yaml)
  [![codecov](https://codecov.io/github/weak-head/nimbus/graph/badge.svg?token=yg0BbspGV6)](https://codecov.io/github/weak-head/nimbus)
  [![pypi](https://img.shields.io/pypi/v/nimbuscli?color=blue)](https://pypi.python.org/pypi/nimbuscli)
  [![py3.12](https://img.shields.io/badge/python-3.12-4584b6.svg)](https://www.python.org/downloads/release/python-3120/)
  [![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/license/mit)

</div>


## Table of Contents <!-- omit from toc -->

- [Overview](#overview)
- [Getting Started](#getting-started)
- [Usage](#usage)
  - [Backups](#backups)
  - [Deployments](#deployments)

## Overview

Nimbus stands as a comprehensive data backup manager and service deployment orchestrator tailored for homelabs, media centers, and local development environments. It offers a seamless, turnkey solution to streamline your data management and service orchestration needs. While Nimbus is robust for personal or developmental use, it is not intended to supplant production-level or mission-critical tools designed for commercial-scale backups and deployments.

## Getting Started

Install `ni` with [pipx](https://pipx.pypa.io/stable/) or `pip`:

```bash
pip install nimbuscli
ni --version
```

To do something with nimbus you need to:
  - Setup application configuration
  - Install `docker`
  - Install `rar`

For guidance and examples on setting up your configuration, please refer to the [configuration example](./docs/config.example.yaml).  

## Usage

By default, Nimbus searches for its configuration file at the `~/.nimbus/config.yaml` path.  
It is anticipated that all configurations for the application will be centralized within this file.  

> **Important Note on Glob Patterns in bash/sh**  
> When using the `ni` command, it’s essential to use `\*` in place of `*`.  
> This is because `bash` or `sh` interprets `*` as a glob pattern and attempts to expand it before passing it to `ni`.  
> By escaping the asterisk (`\*`), you ensure that `ni` receives the character literally, allowing it to process the glob pattern as intended.

### Backups

The `backup` command facilitates the creation of backups and enables their optional upload to a remote destination, such as an AWS S3 bucket.  
The command accepts optional selectors, that filter the configured backup groups using specified [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)).

```bash
ni backup [selectors]
```

Lets assume we have the following Nimbus configuration:

```yaml
profiles:
  archive:
    - name: rar-protected
      provider: rar
      password: SecretPassword
      recovery: 3
      compression: 0
  upload:
    - name: aws-archive
      provider: aws
      access_key: XXXXXXXXXXXXX
      secret_key: XXXXXXXXXXXXXXXXXXXXXXXXX
      bucket: backups.bucket.aws
      storage_class: STANDARD

commands:
  backup:
    destination: ~/.nimbus/backups
    archiver: rar-protected
    uploader: aws-archive
    directories: 
      photos:
        - ~/Pictures
        - /mnt/photos
      cloud:
        - /mnt/nextcloud
      docs:
        - ~/Documents
```

With this configuration, the following `backup` commands would result in:

| Command | Selected Backup groups |
| --- | --- |
| `ni backup` | photos cloud docs |
| `ni backup nx\*` | |
| `ni backup photos` | photos |
| `ni backup ph\* \*cloud\*` | photos cloud |
| `ni backup \*o\?\?` | cloud docs |

### Deployments

The `up` and `down` commands manage deployments of services. Nimbus supports services structured as [Docker Compose](https://docs.docker.com/compose/) stacks and performs recursive service discovery for the configured directories.  
The command accepts optional selectors, that filter the discovered services using specified [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)).

```bash
ni up [selectors]
ni down [selectors]
```

Lets assume we have the following Nimbus configuration:

```yaml
commands:
  deploy:
    services:
      - ~/.nimbus/services
```

And under the `~/.nimbus/services` we have the following directory structure:

```
|- services
    |- media
        |- .env
        |- compose.yaml
    |- cloud
        |- .env
        |- compose.yaml
    |- git
        |- some_file.txt 
        |- start.sh
```

With this configuration and directory structure, the following deployment commands would result in:

| Command | Selected Services |
| --- | --- |
| `ni up` | media cloud |
| `ni up media` | media |
| `ni down g\*` | |
| `ni down git` | |
| `ni down cl\*` | cloud |


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/weak-head/nimbus",
    "name": "nimbuscli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "backup, deploy, administration",
    "author": "Oleksandr Zinchenko",
    "author_email": "zinchenko@live.com",
    "download_url": "https://files.pythonhosted.org/packages/77/68/527c1d5fc0cc0367a60169cd30a19e4f9b44fd54534f391c12dc5feb0283/nimbuscli-0.3.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n  <img src=\"https://raw.githubusercontent.com/weak-head/nimbus/main/docs/logo.png\" width=\"450\" />\n  \n  # nimbus <!-- omit from toc --> \n  \n  Nimbus is engineered to optimize data backup processes and efficiently orchestrate service deployments for homelabs and dev environments.\n  <br/><br/>\n\n  [![build](https://img.shields.io/github/actions/workflow/status/weak-head/nimbus/test.yaml)](https://github.com/weak-head/nimbus/actions/workflows/test.yaml)\n  [![codecov](https://codecov.io/github/weak-head/nimbus/graph/badge.svg?token=yg0BbspGV6)](https://codecov.io/github/weak-head/nimbus)\n  [![pypi](https://img.shields.io/pypi/v/nimbuscli?color=blue)](https://pypi.python.org/pypi/nimbuscli)\n  [![py3.12](https://img.shields.io/badge/python-3.12-4584b6.svg)](https://www.python.org/downloads/release/python-3120/)\n  [![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/license/mit)\n\n</div>\n\n\n## Table of Contents <!-- omit from toc -->\n\n- [Overview](#overview)\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n  - [Backups](#backups)\n  - [Deployments](#deployments)\n\n## Overview\n\nNimbus stands as a comprehensive data backup manager and service deployment orchestrator tailored for homelabs, media centers, and local development environments. It offers a seamless, turnkey solution to streamline your data management and service orchestration needs. While Nimbus is robust for personal or developmental use, it is not intended to supplant production-level or mission-critical tools designed for commercial-scale backups and deployments.\n\n## Getting Started\n\nInstall `ni` with [pipx](https://pipx.pypa.io/stable/) or `pip`:\n\n```bash\npip install nimbuscli\nni --version\n```\n\nTo do something with nimbus you need to:\n  - Setup application configuration\n  - Install `docker`\n  - Install `rar`\n\nFor guidance and examples on setting up your configuration, please refer to the [configuration example](./docs/config.example.yaml).  \n\n## Usage\n\nBy default, Nimbus searches for its configuration file at the `~/.nimbus/config.yaml` path.  \nIt is anticipated that all configurations for the application will be centralized within this file.  \n\n> **Important Note on Glob Patterns in bash/sh**  \n> When using the `ni` command, it\u2019s essential to use `\\*` in place of `*`.  \n> This is because `bash` or `sh` interprets `*` as a glob pattern and attempts to expand it before passing it to `ni`.  \n> By escaping the asterisk (`\\*`), you ensure that `ni` receives the character literally, allowing it to process the glob pattern as intended.\n\n### Backups\n\nThe `backup` command facilitates the creation of backups and enables their optional upload to a remote destination, such as an AWS S3 bucket.  \nThe command accepts optional selectors, that filter the configured backup groups using specified [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)).\n\n```bash\nni backup [selectors]\n```\n\nLets assume we have the following Nimbus configuration:\n\n```yaml\nprofiles:\n  archive:\n    - name: rar-protected\n      provider: rar\n      password: SecretPassword\n      recovery: 3\n      compression: 0\n  upload:\n    - name: aws-archive\n      provider: aws\n      access_key: XXXXXXXXXXXXX\n      secret_key: XXXXXXXXXXXXXXXXXXXXXXXXX\n      bucket: backups.bucket.aws\n      storage_class: STANDARD\n\ncommands:\n  backup:\n    destination: ~/.nimbus/backups\n    archiver: rar-protected\n    uploader: aws-archive\n    directories: \n      photos:\n        - ~/Pictures\n        - /mnt/photos\n      cloud:\n        - /mnt/nextcloud\n      docs:\n        - ~/Documents\n```\n\nWith this configuration, the following `backup` commands would result in:\n\n| Command | Selected Backup groups |\n| --- | --- |\n| `ni backup` | photos cloud docs |\n| `ni backup nx\\*` | |\n| `ni backup photos` | photos |\n| `ni backup ph\\* \\*cloud\\*` | photos cloud |\n| `ni backup \\*o\\?\\?` | cloud docs |\n\n### Deployments\n\nThe `up` and `down` commands manage deployments of services. Nimbus supports services structured as [Docker Compose](https://docs.docker.com/compose/) stacks and performs recursive service discovery for the configured directories.  \nThe command accepts optional selectors, that filter the discovered services using specified [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)).\n\n```bash\nni up [selectors]\nni down [selectors]\n```\n\nLets assume we have the following Nimbus configuration:\n\n```yaml\ncommands:\n  deploy:\n    services:\n      - ~/.nimbus/services\n```\n\nAnd under the `~/.nimbus/services` we have the following directory structure:\n\n```\n|- services\n    |- media\n        |- .env\n        |- compose.yaml\n    |- cloud\n        |- .env\n        |- compose.yaml\n    |- git\n        |- some_file.txt \n        |- start.sh\n```\n\nWith this configuration and directory structure, the following deployment commands would result in:\n\n| Command | Selected Services |\n| --- | --- |\n| `ni up` | media cloud |\n| `ni up media` | media |\n| `ni down g\\*` | |\n| `ni down git` | |\n| `ni down cl\\*` | cloud |\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Nimbus is engineered to optimize data backup processes and efficiently orchestrate service deployments.",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/weak-head/nimbus",
        "Repository": "https://github.com/weak-head/nimbus"
    },
    "split_keywords": [
        "backup",
        " deploy",
        " administration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "caacaf50a27ea9fd131074fd1f125ac0ff6522072efd8a87b560a99c33f50203",
                "md5": "931347d94c7184660888b004422ddef4",
                "sha256": "60ae620b372bc501cb35687419dbf849adf6255bae3835825a2049a41e6dfab1"
            },
            "downloads": -1,
            "filename": "nimbuscli-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "931347d94c7184660888b004422ddef4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 38269,
            "upload_time": "2024-05-05T12:53:44",
            "upload_time_iso_8601": "2024-05-05T12:53:44.676820Z",
            "url": "https://files.pythonhosted.org/packages/ca/ac/af50a27ea9fd131074fd1f125ac0ff6522072efd8a87b560a99c33f50203/nimbuscli-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7768527c1d5fc0cc0367a60169cd30a19e4f9b44fd54534f391c12dc5feb0283",
                "md5": "8f5de089510bb9d242f8897460b76a49",
                "sha256": "b3a86a8dc9ad3bf1aa1e6572f113032f363471af94f5d617ba6834262b28226c"
            },
            "downloads": -1,
            "filename": "nimbuscli-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8f5de089510bb9d242f8897460b76a49",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 28987,
            "upload_time": "2024-05-05T12:53:46",
            "upload_time_iso_8601": "2024-05-05T12:53:46.330110Z",
            "url": "https://files.pythonhosted.org/packages/77/68/527c1d5fc0cc0367a60169cd30a19e4f9b44fd54534f391c12dc5feb0283/nimbuscli-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-05 12:53:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "weak-head",
    "github_project": "nimbus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nimbuscli"
}
        
Elapsed time: 0.25410s