Skip to content

LazyCat is a configuration management system written in C and Scheme.

License

Notifications You must be signed in to change notification settings

artyom-poptsov/lazycat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LazyCat is a configuration management system. It is on the early stages of development, but already can do some useful work.

LazyCat is distributed under the terms of GNU GPLv3 license or (at your option) any later version. See COPYING for details.

For information about open issues and ideas about development of the project see TODO file.

Overview

LazyCat consists of the four main parts: UI, daemon, proxies and optional clients that are running on hosts.

Currently there are two user interfaces:

  • lazycat-gtk (GTK)
  • lc (CLI)

Proxies are processes which are used by the lazycat-daemon to send messages through computer network.

Currently LazyCat shipped with TCP and SSH proxy. It is not recommended to use TCP proxy in the real tasks because it hasn’t got any authentification mechanism yet, and sends data as unencrypted text streams.

SSH proxy uses authorisation based on public keys. To use this proxy you must have SSH daemon running on the every host.

The private/public key names are hardcoded for now: they are ~/.ssh/lazycat and ~/.ssh/lazycat.pub respectively.

Requirements

LazyCat has got the following dependences:

Usage Examples

First of all, you have to start the daemon:

$ lazycat-daemon

Then you can add hosts to be able to manage them:

$ lc add home-network lazy-pc1 ssh-proxy "avp@pc1:22" \
    "A lazy computer"

You can get list of hosts with “list” command:

$ lc list hosts

Hosts are addressed by their IDs. For example, to send command to a concrete host, you can pass its ID to the exec command. Say you want to send uname -a to the host with ID 2:

$ lc exec -n 2 uname -a

If you don’t specify a host ID, a command will be sent to all the accessible hosts:

$ lc exec uname -a

It’s possible to compare outputs from hosts with output from the master host. In other words, you’ll get only diff between different outputs instead of full output from the every host.

Set master host:

$ lc set master 5

Get output from the master host:

$ lc diff --get-pattern "uname -a"

Check the output. If it’s OK, continue the operation:

$ lc diff --continue

If something went wrong, you can abort the operation:

$ lc diff --abort

All commands have short documentation and usage examples. Use -h key to get help:

$ lc -h
$ lc exec -h

Hacking

There are few ways to get useful information about the program. The first is to use standard Guile tool display-commentary to get information about files.

Second, lazycat sources are well documented. I.e. you can find commentaries for almost all procedures. Protocol description can be found in common/protocol.scm file. Augmented Bacus-Naur Form (ABNF) is used for description of the protocol. See RFC5234 for descripton of the ABNF notation. ABNF/BNF is used to describe some procedures’ parameters and return values as well.

If you planning to develop a new proxy for the lazycat, commentaries in common/proxy.scm should be useful. This file contains the class <proxy> that must be the accessor for all proxies (although, of course, theoreticaly you can implement your own proxy from scratch).

To implement a new UI for the lazycat, you should use the protocol and <message> class described in common/message.scm file.

lazycat-daemon can be run in the debug mode by passing -d as a command line argument. -D can be used to run the program in “no-detach” mode – that is, the daemon won’t close standard ports and detach from the console. This mode is useful for debugging.

The daemon also uses syslog interface. Check the log for records tagged with ‘lazycatd’. You can control verbosity of the log by setting log-verbosity parameter (see lc l options).

About

LazyCat is a configuration management system written in C and Scheme.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published