2 # this file defines a few convenience bash shorthands for managing myplc nodes
3 # it is installed in /usr/share/myplc/aliases
4 # you might wish to use it in your own bash startup files (.profile/.bashrc)
6 ssh_options="-o BatchMode=yes -o StrictHostKeyChecking=no"
11 echo Running "$@" on root@"$hostname"
12 ssh $ssh_options -i "$key" "root@$hostname" "$@"
15 function nodes_key () {
18 for hostname in $(grep -v '#' $filename); do
19 node_boot "$hostname" "$key" "$@"
23 function node_dbg () {
24 [[ -z "$@" ]] && { echo "Usage: $0 hostname [command]" ; return 1; }
25 node_key /etc/planetlab/debug_ssh_key.rsa "$@"
27 function nodes_dbg () {
28 [[ -z "$@" ]] && { echo "Usage: $0 hosts_file [command]" ; return 1; }
29 node_keys /etc/planetlab/debug_ssh_key.rsa "$@"
31 function clear_known_hosts () {
32 for hostname in "$@"; do
33 sed -i "/$hostname/d" ~/.ssh/known_hosts
40 # navigators - alphabetical
41 alias gobmsource="cd /usr/share/bootmanager"
42 alias goboot="cd /var/www/html/boot"
43 alias godrupal="cd /var/www/html/planetlab"
44 alias gohttplog="cd /var/log/httpd"
45 alias goinit="cd /etc/plc.d"
46 alias golog="cd /var/log/"
47 alias goplcapi="cd /usr/share/plc_api"
48 alias gosqllog="cd /var/lib/pgsql/data/pg_log"
49 alias goyum="cd /var/www/html/install-rpms"