sbabashahi / multiservice

Multiservice is a tool to run the same commands on multiple services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiservice

Multiservice (ms) is a tool to run the same commands on multiple services.

Install

$ pip install multiservice

Usage

$ multiservice [OPTIONS] COMMAND [SERVICES]...

Options:

  • -c, --config TEXT: [default: ~/.multiservice.yml]
  • COMMAND: [required]: command name from the config
  • [SERVICES]...: a list of services aliases

Examples:

Run a command named status on all services:

$ ms status

Run a command named status on some services:

$ ms status as rs

Execute custom script

$ ms execute --execute 'git status && git diff' as rs

Edit the config file

$ ms edit

Configuration

Multiservice uses a config file to define commands and services. Default path is ~/.multiservice.yml, but you can specify a path using --config or -c options.

Config example:

root: ~/projects/
template: source ./venv/bin/activate && {COMMAND}

editor: vim

# alias: directory
services:
  as: attributes-service
  rs: reports-service

commands:
  status: git status
  reset: git reset origin/develop --hard
  pull: >
    git checkout develop -q &&
    git pull

About

Multiservice is a tool to run the same commands on multiple services.


Languages

Language:Python 95.8%Language:Makefile 4.2%