trops


Nametrops JSON
Version 0.2.25 PyPI version JSON
download
home_pagehttp://github.com/kojiwell/trops
SummaryTrack operations
upload_time2024-06-30 21:55:34
maintainerNone
docs_urlNone
authorKoji Tanaka
requires_python>=3.8
licenseMIT
keywords linux system administration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            *****
Trops
*****

.. image:: https://img.shields.io/pypi/v/trops
   :target: https://pypi.org/project/trops/
   :alt: PyPI Package

.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg
   :target: LICENSE
   :alt: Repository License

Trops is a command-line tool designed for tracking system operations on destributed Linux systems. It keeps a log of executed commands and modified files, being helpful for developing Ansible roles, Dockerfiles, and similar tasks.

It aims for solving these challenges:

- Keeping track of when and what has been done on which host (for which issue)
- Note-taking for solo system administrators of destributed systems
- "Potentially" bridging the gap between Dev and Ops

Prerequisites
=============

- OS: Linux, MacOS
- Shell: Bash, Zsh
- Python: 3.8 or higher
- Git: 2.28 or higher

Installation
============

Ubuntu::

    sudo apt install pipx git
    pipx install trops

Rocky::

    sudo dnf install epel-release git
    sudo dnf install python3.12-pip
    pip3.12 install --user pipx
    pipx install trops

Miniconda::

    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    chmod +x Miniconda3-latest-Linux-x86_64.sh
    ./Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda3
    $HOME//miniconda3/bin/conda install git
    $HOME/miniconda3/bin/pip install trops
    mkdir $HOME/bin
    cd $HOME/bin
    ln -s ../miniconda3/bin/git git
    ln -s ../miniconda3/bin/trops trops
    export PATH=$HOME/bin:$PATH # Add this line to your .bashrc

Quickstart
==========

Activate trops::

    export TROPS_DIR="/path/to/your/trops"
    test -d $TROPS_DIR || mkdir -p $TROPS_DIR

    # for Bash
    eval "$(trops init bash)"
    # for Zsh
    eval "$(trops init zsh)"

Create a trops environment(e.g. myenv)::

    trops env create myenv

Turn on/off background tracking::

    # Turn on
    ontrops myenv

    # Turn off
    offtrops

If you turn it on, every command will be logged, and edited file will be commited to its Git repository ($TROPS_DIR/repo/<env>.git). So try getting some work done, like installing or compiling an application, and then execute `trops log` command to check the log::

    # Get your work done, and then check log
    trops log

    # You can also pass the output to Trops KouMyo(km), 
    # which unclutters and shows log in a table
    trops log | trops km

If you want to use GitHub or GitLab as a remote private repository, which is a good idea, you can link your Trops Git repository to a remote Git repository using this command::

    # At creation
    trops env create --git-remote=git@github.com:username/repository_name.git myenv

    # or update
    ontrops myenv
    trops env update --git-remote=git@github.com:username/repository_name.git

Now, Trops should be able to make your system operation a sort of issue-driven project. You can create an issue on the GitHub/GitLab repository, such as "Install barfoo #1," and then set the issue number as a tag in Trops like this::

    # '#<issue number>'
    ttags '#1'

    # repo_name#<number>
    ttags repo_name#1

Once your work is done, you can save and push the log::

    # Save the log as a markdown table
    trops log | trops km --save

    # And then, push your trops' commits to the remote repository
    trops repo push

As you can see on the issue page, what you've done is linked to the issue you tagged. You should also be able to find the markdown table from that page.

And now, you can start working on automating what you've interactively done by using Ansible,
Salt, Chef, Puppet, or whatever tools down the line.

So, Trops helps you easily try new things, and you don't have to worry about forgetting what
you've done. And then, once you've got used to it, it will actually help you organize your 
day-to-day multitasking, which is probably something that a lot of system admins cannot avoid.

Contributing
============

If you have a problem, please `create an issue <https://github.com/kojiwell/trops/issues/new>`_ or a pull request.

1. Fork it ( https://github.com/kojiwell/trops/fork )
2. Create your feature branch (``git checkout -b my-new-feature``)
3. Commit your changes (``git commit -am 'Add some feature'``)
4. Push to the branch (``git push origin my-new-feature``)
5. Create a new Pull Request


            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/kojiwell/trops",
    "name": "trops",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "linux system administration",
    "author": "Koji Tanaka",
    "author_email": "kojiwelly@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/90/163ecf8c87d552844d69f959f8fa34f940c033ebcf1de99e96c710ef5a13/trops-0.2.25.tar.gz",
    "platform": null,
    "description": "*****\nTrops\n*****\n\n.. image:: https://img.shields.io/pypi/v/trops\n   :target: https://pypi.org/project/trops/\n   :alt: PyPI Package\n\n.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg\n   :target: LICENSE\n   :alt: Repository License\n\nTrops is a command-line tool designed for tracking system operations on destributed Linux systems. It keeps a log of executed commands and modified files, being helpful for developing Ansible roles, Dockerfiles, and similar tasks.\n\nIt aims for solving these challenges:\n\n- Keeping track of when and what has been done on which host (for which issue)\n- Note-taking for solo system administrators of destributed systems\n- \"Potentially\" bridging the gap between Dev and Ops\n\nPrerequisites\n=============\n\n- OS: Linux, MacOS\n- Shell: Bash, Zsh\n- Python: 3.8 or higher\n- Git: 2.28 or higher\n\nInstallation\n============\n\nUbuntu::\n\n    sudo apt install pipx git\n    pipx install trops\n\nRocky::\n\n    sudo dnf install epel-release git\n    sudo dnf install python3.12-pip\n    pip3.12 install --user pipx\n    pipx install trops\n\nMiniconda::\n\n    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n    chmod +x Miniconda3-latest-Linux-x86_64.sh\n    ./Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda3\n    $HOME//miniconda3/bin/conda install git\n    $HOME/miniconda3/bin/pip install trops\n    mkdir $HOME/bin\n    cd $HOME/bin\n    ln -s ../miniconda3/bin/git git\n    ln -s ../miniconda3/bin/trops trops\n    export PATH=$HOME/bin:$PATH # Add this line to your .bashrc\n\nQuickstart\n==========\n\nActivate trops::\n\n    export TROPS_DIR=\"/path/to/your/trops\"\n    test -d $TROPS_DIR || mkdir -p $TROPS_DIR\n\n    # for Bash\n    eval \"$(trops init bash)\"\n    # for Zsh\n    eval \"$(trops init zsh)\"\n\nCreate a trops environment(e.g. myenv)::\n\n    trops env create myenv\n\nTurn on/off background tracking::\n\n    # Turn on\n    ontrops myenv\n\n    # Turn off\n    offtrops\n\nIf you turn it on, every command will be logged, and edited file will be commited to its Git repository ($TROPS_DIR/repo/<env>.git). So try getting some work done, like installing or compiling an application, and then execute `trops log` command to check the log::\n\n    # Get your work done, and then check log\n    trops log\n\n    # You can also pass the output to Trops KouMyo(km), \n    # which unclutters and shows log in a table\n    trops log | trops km\n\nIf you want to use GitHub or GitLab as a remote private repository, which is a good idea, you can link your Trops Git repository to a remote Git repository using this command::\n\n    # At creation\n    trops env create --git-remote=git@github.com:username/repository_name.git myenv\n\n    # or update\n    ontrops myenv\n    trops env update --git-remote=git@github.com:username/repository_name.git\n\nNow, Trops should be able to make your system operation a sort of issue-driven project. You can create an issue on the GitHub/GitLab repository, such as \"Install barfoo #1,\" and then set the issue number as a tag in Trops like this::\n\n    # '#<issue number>'\n    ttags '#1'\n\n    # repo_name#<number>\n    ttags repo_name#1\n\nOnce your work is done, you can save and push the log::\n\n    # Save the log as a markdown table\n    trops log | trops km --save\n\n    # And then, push your trops' commits to the remote repository\n    trops repo push\n\nAs you can see on the issue page, what you've done is linked to the issue you tagged. You should also be able to find the markdown table from that page.\n\nAnd now, you can start working on automating what you've interactively done by using Ansible,\nSalt, Chef, Puppet, or whatever tools down the line.\n\nSo, Trops helps you easily try new things, and you don't have to worry about forgetting what\nyou've done. And then, once you've got used to it, it will actually help you organize your \nday-to-day multitasking, which is probably something that a lot of system admins cannot avoid.\n\nContributing\n============\n\nIf you have a problem, please `create an issue <https://github.com/kojiwell/trops/issues/new>`_ or a pull request.\n\n1. Fork it ( https://github.com/kojiwell/trops/fork )\n2. Create your feature branch (``git checkout -b my-new-feature``)\n3. Commit your changes (``git commit -am 'Add some feature'``)\n4. Push to the branch (``git push origin my-new-feature``)\n5. Create a new Pull Request\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Track operations",
    "version": "0.2.25",
    "project_urls": {
        "Homepage": "http://github.com/kojiwell/trops"
    },
    "split_keywords": [
        "linux",
        "system",
        "administration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d90163ecf8c87d552844d69f959f8fa34f940c033ebcf1de99e96c710ef5a13",
                "md5": "a21967342c45c4ca8c21884ae3f50a92",
                "sha256": "23516d05c0da4d6988edda1064b1d748ebb8061aed9ecffc622423730a9c718a"
            },
            "downloads": -1,
            "filename": "trops-0.2.25.tar.gz",
            "has_sig": false,
            "md5_digest": "a21967342c45c4ca8c21884ae3f50a92",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23010,
            "upload_time": "2024-06-30T21:55:34",
            "upload_time_iso_8601": "2024-06-30T21:55:34.516956Z",
            "url": "https://files.pythonhosted.org/packages/2d/90/163ecf8c87d552844d69f959f8fa34f940c033ebcf1de99e96c710ef5a13/trops-0.2.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-30 21:55:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kojiwell",
    "github_project": "trops",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "trops"
}
        
Elapsed time: 0.27066s