@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.

35 lines
2.2 KiB

  1. # itl_batch
  2. ## a silly script for doing batch work across machines
  3. Requirements:
  4. - `sshpass`
  5. - `ssh`
  6. Operation:
  7. 1. Edit `batch.sh` to reflect what you want to run.
  8. 2. Ensure `all_addrs` has all potential addresses of all machines (144.40 - 144.65 for ITL, 144.21 - 144.28 for COSI)
  9. 3. Run `./run.sh` with two arguments: the username, and the password.
  10. 4. Profit!
  11. 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.
  12. 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.
  13. 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?).
  14. `all_addrs` usually contains IP addresses, but may also contain hostnames, or, really, anything acceptable past '@' in your version of ssh.
  15. 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.
  16. ## Sub-directories
  17. * subcommand: Complete shell scripts ready to be run
  18. * ziltoid-scripts: Complete set of shell scripts designed for ITL administration by xperia64. By design, they use SSH keys.
  19. ## Other notes
  20. `all_addrs` has been reduced to contain all of the ITL addresses.
  21. `all_addrs_no_presenter` is the same as the above one, except it excludes 144.40 which is the front projector presenter machine.
  22. **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.