|
3 years ago | |
---|---|---|
subcommand | 3 years ago | |
ziltoid-scripts | 3 years ago | |
README.md | 3 years ago | |
all_addrs | 3 years ago | |
all_addrs_no_presenter | 3 years ago | |
run.sh | 3 years ago | |
runkill.sh | 3 years ago |
README.md
itl_batch
a silly script for doing batch work across machines
Requirements:
sshpass
ssh
Operation:
- Edit
batch.sh
to reflect what you want to run. - Ensure
all_addrs
has all potential addresses of all machines (144.40 - 144.65 for ITL, 144.21 - 144.28 for COSI) - Run
./run.sh
with two arguments: the username, and the password. - Profit!
Output to stdout is sent to your terminal, but output to stderr (containing a majority of connection refused messages) is instead appended to the file /tmp/batch_errors
. If you're looking for other things routed to stderr (like legitimate errors from commands), tail that file in another terminal.
This distribution's all_addrs
is meant to be used within the labs, and so includes our entire 128.153.144/23. It does not yet support 128.153.146/24. Similarly, the port is forced to 13699 in run.sh
, which may need to be configured for general use.
Note that run.sh
invokes ssh
via sshpass
, and so respects your local configuration, including SSH keys. Note that it writes to known_hosts as per defaults, so if machines change around, there may be some rejections on host identity changes. You will see these in the regular error stream, /tmp/batch_errors
; if it happens, edit your known_hosts
file as usual (might I recommend shift+V, d?).
all_addrs
usually contains IP addresses, but may also contain hostnames, or, really, anything acceptable past '@' in your version of ssh.
As of this version, passwords are passed in the environment, so take care as to who can debug your programs; it should be more resistant to casual snooping, however.
Sub-directories
- subcommand: Complete shell scripts ready to be run
- ziltoid-scripts: Complete set of shell scripts designed for ITL administration by xperia64. By design, they use SSH keys.
Other notes
all_addrs
has been reduced to contain all of the ITL addresses.
all_addrs_no_presenter
is the same as the above one, except it excludes 144.40 which is the front projector presenter machine.
TODO: In the future, it would make sense to make a little script to select some hosts from a list of [itl, itl_wo_presenter, cosi, all] and dump it into use_addr or something.