trops


Nametrops JSON
Version 0.2.23 PyPI version JSON
download
home_pagehttp://github.com/kojiwell/trops
SummaryTrack operations
upload_time2024-01-21 06:18:54
maintainer
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
- Shell: Bash or Zsh
- Python: 3.8 or higher
- Git: 2.28 or higher

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

Ubuntu::

    sudo apt install python3 python3-pip git
    sudo pip3.11 install trops

Rocky::

    sudo dnf install python3.11 python3.11-pip git
    sudo pip3.11 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 editing a file will be commited to its git repo ($TROPS_DIR/repo/<env>.git). So try installing or compiling some application, and then type trops log command::

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

    # Or pass the output to Trops KouMyo(km), 
    # which unclutters and shows log as a table
    trops log | trops km

If you want to use Github or GitLab as a remote private repository, I think it is a good idea.
You can link your Trops' bare git repository to a remote git repository by this::

    # 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 you can make your system operation as an issue-driven project. So create an issue on your 
Github/GitLab Issue -- like "Install barfoo #1" -- and then set the issue number as a tag 
on your Trops like this::

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

    # repo_name#<number>
    ttags repo_name#1

Once your work is done, try this::

    # 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 your issue page, what you've done is linked to the issue you tagged.
And you can 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": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "linux system administration",
    "author": "Koji Tanaka",
    "author_email": "kojiwelly@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/90/a65e43c81a316abaa3377e079aeff560e88cef8b77e60f3a781d049e8172/trops-0.2.23.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\n- Shell: Bash or Zsh\n- Python: 3.8 or higher\n- Git: 2.28 or higher\n\nInstallation\n============\n\nUbuntu::\n\n    sudo apt install python3 python3-pip git\n    sudo pip3.11 install trops\n\nRocky::\n\n    sudo dnf install python3.11 python3.11-pip git\n    sudo pip3.11 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 editing a file will be commited to its git repo ($TROPS_DIR/repo/<env>.git). So try installing or compiling some application, and then type trops log command::\n\n    # Get your work done, and then check log\n    trops log\n\n    # Or pass the output to Trops KouMyo(km), \n    # which unclutters and shows log as a table\n    trops log | trops km\n\nIf you want to use Github or GitLab as a remote private repository, I think it is a good idea.\nYou can link your Trops' bare git repository to a remote git repository by this::\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 you can make your system operation as an issue-driven project. So create an issue on your \nGithub/GitLab Issue -- like \"Install barfoo #1\" -- and then set the issue number as a tag \non your 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, try this::\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 your issue page, what you've done is linked to the issue you tagged.\nAnd you can 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.23",
    "project_urls": {
        "Homepage": "http://github.com/kojiwell/trops"
    },
    "split_keywords": [
        "linux",
        "system",
        "administration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a890a65e43c81a316abaa3377e079aeff560e88cef8b77e60f3a781d049e8172",
                "md5": "8a4a33e81d787753cb6109cf86a311b6",
                "sha256": "1567f19d06fa532a6eea1af704c932bbf6ac55e922f981164e975a72fea2ee04"
            },
            "downloads": -1,
            "filename": "trops-0.2.23.tar.gz",
            "has_sig": false,
            "md5_digest": "8a4a33e81d787753cb6109cf86a311b6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 22355,
            "upload_time": "2024-01-21T06:18:54",
            "upload_time_iso_8601": "2024-01-21T06:18:54.027846Z",
            "url": "https://files.pythonhosted.org/packages/a8/90/a65e43c81a316abaa3377e079aeff560e88cef8b77e60f3a781d049e8172/trops-0.2.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-21 06:18:54",
    "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.17707s