@grissess batch scripts for the ITL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jared Dunbar e55692f52d
Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/.
1 year ago
subcommand Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago
ziltoid-scripts Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago
README.md Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago
all_addrs Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago
all_addrs_no_presenter Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago
run.sh Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago
runkill.sh Scripts from Ziltoid and some other modifications, since the ITL now uses static addresses. Addressing the server network was /stupid/. 1 year ago

README.md

itl_batch

a silly script for doing batch work across machines

Requirements:

  • sshpass
  • ssh

Operation:

  1. Edit batch.sh to reflect what you want to run.
  2. Ensure all_addrs has all potential addresses of all machines (144.40 - 144.65 for ITL, 144.21 - 144.28 for COSI)
  3. Run ./run.sh with two arguments: the username, and the password.
  4. 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.