Code Monkey home page Code Monkey logo

orquesta's Introduction

Orquesta - an open source automation tool for remote terminal operations

As its name implies (which means orchestra in English), this tool work as a director who indicates instructions to musicians (terminals in this context) and each piece is inside a sheet music (a script here). Well, really working with terminals is less complex, because it's possible to decompose all we require into four basic operations: select network nodes, open connections, send commands and close connections. It's the main idea behind the design.

Motivation

As usual, improvement opportunities arise when tools to work efficiently are missing and fortunately it's something that occurs very often. Keeping this in mind, I was needing a software that meets the following:

Open Source, looking for collaboration and customization

Provide a simple scripting interface to automate boring tasks

Always save the logs, don't know when you'll need it (a golden rule, at least in my job)

Usage

Configuration

Create a file with extension .cfg in the directory cfg that contain for example:

[DEFAULT]
port = 22
protocol = ssh

[foobar]
ip = 127.0.0.1

[foo]
ip = 127.0.0.1
port = 2222 

The DEFAULT section must contain the port (TCP port) and protocol (ssh or telnet) used by default in the nodes defined within the file. Then a section for each node and its respective ip address (version 4 or 6).

Initial window

When the program starts it shows a window like the following, here we select the logs directory, the project name and a group of nodes or terminals defined in the previous cfg file.

orquesta_init

Main window

Mainly consist in a text editor where we write the script and a list of nodes (terminals) that can be selected by clicking it or using the sel command (see next section).

orquesta_main

Available commands

command parameters description
open none open selected nodes
sel list of node names or all select the nodes in the list
set var value create the variable $var
send text send text to selected terminals
gsend text perform substitution of local variables
inv none invert selection
view none view selected nodes
close none close selected nodes
mainsel list of node names avoid the selection of nodes different to the provided in the list
# text comment

Keyboard shortcuts

shortcut action
F1 Execute current line and move to the next (if no errors)
F2 Execute current line
Ctrl + Shift + S Select all terminals
Ctrl + Shift + D Unselect all terminals
Ctrl + I Invert current selection
Ctrl + O Open selected terminals
Ctrl + Shift + C Close selected terminals
Ctrl + Alt + T Open local terminal in current logs path *
Ctrl + Alt + F Open file explorer in current logs path
Ctrl + E Exit application
Ctrl + S Save script
Ctrl + N New project

* It try to open git-bash as a first option, else cmd by default.

Using templates

Each script could be saved as a template. Just select the menu, write a name and the script would be available the next time the application starts.

Installation

Windows installer

Download here

For developers

git clone https://github.com/ej-f/orquesta.git
cd orquesta
pip install -r requirements.txt
cd orquesta
python orquesta.py

Requirements

  • Python 3.4
    • PyQt4 v4.11.3 -> GUI and process
    • pywin32 219 -> windows automation
    • cx_Freeze 4.3.4 -> to create a standalone executable if is needed
  • Qt Designer 4.8.6 -> GUI
  • Kitty 0.60 -> client (already included in this repository)

Todo

Improvements

  • Documentation
  • Testing
  • Clean up code base, redefine models and data structures

Nice to have features

  • Expect-like functionality
  • Commands highlight
  • Select elements using glob patterns
  • Cross platform compatibility
  • Automatic script execution

orquesta's People

Contributors

ej-f avatar

Stargazers

 avatar  avatar  avatar phi avatar  avatar langxugang avatar Riccardo Tinivella avatar Flyinglake avatar  avatar Wallysson avatar  avatar  avatar Bruno Rocha avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

orquesta's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.