man push




NAME

  push - push commands, files, configuration files to systems


SYNOPSIS

  push [-s|-root|-sysmon|-usermon] [-Features] type [-Options] arguments

  push [-Features] all [-options] command|file(s)

  push [-Features] all.but host1[,host2...] [-options] command

  push [-Features] cmd [-options] command

  push [-Features] config [-options] target(s)

  push [-Features] config.but host1[,host2...] [-options] target(s)

  push [-Features] file [-options] source[target]

  push [-Features] one host1[,host2...] [-options] target(s)

  push [-Features] one.cmd host1[,host2...] [-options] command

  push [-Features] one.rcp host1[,host2...] [-options] file1 [file2...]

  push [-Features] rcp [-options] whatever

  push [-Features] rsh [-options] whatever


DESCRIPTION

  The  push  script  suite  is  distributed with uaxtools and uses the etc/machines.*
  file(s) to push commands, files, configuration files, or backcopy files  from  sys-
  tems. The push command was developed in the mid-1990s when configuration management
  tools were sparse, especially for multi-Unix platforms.  It has long used  ssh|scp,
  but  still  references rsh|rcp.  The scripts can be customized to specify alternate
  mechanisms (and have been for Cray XT systems).  The push suite has been used to to
  manage IRIX workstations, Solaris management farms, IBM/AIX clusters, Scyld/Beowulf
  clusters, Cray XT systems, Linux workstations, IBM xCat clusters, and hybrid archi-
  tectures.  For very large configurations, push should be complemented with [x|p]dsh
  since push operates in a serial mode.

  When commands are pushed, a small script is actually used so errors can be  trapped
  (or  optionally  not  trapped) and the status of the command is returned instead of
  just the ssh status.  When configuration files or 'safe' copy is used, the file  is
  copied with a stamp, the original moved to /backout.push directory then the stamped
  file is moved into place. For files residing on same  filesystem  as  /backout.push
  (may  be  a  symlink), this preserves the inode in case the file is open for execu-
  tion.

  The etc/machines.*  file consists of the following  columns  to  identify  targeted
  systems:

  machine
         machine (host) name.

  type   machine type, can be anything but often hardware type is used.

  status machine status, such as 'Linux' or 'offline'.  As distributed for 'Linux' is
         used for active/online nodes.

  usage|class
         use or class, such as 'login' or 'staff'.

  Maj    software major version, such as 'rh6'.

  Min    software minor version, such as '7.

  Alias|Other
         use a=alias for an alternate host name or 'other'  identifying  information,
         such as frame or rack, for push.

  documentation
         any  number  of additional columns can be used for documentation and are not
         parsed as push fields.


FEATURE OPTIONS

  -s|-root
         reinvoke with sudo, must be first option specified.

  +s|+root
         reinvoke with sudo using StrictHostKeyChecking=no.

  -sysmon
         reinvoke with 'sudo -u sysmon'. UA/ARSC used a less privileged  cron  userid
         for most monitoring.

  -usermon
         reinvoke with 'sudo -u usermon. Another less privileged cron userid for user
         support scripts.

  -S uses:
           -o StrictHostKeyChecking=no
           -o UserKnownHostsFile=/dev/null
           -o GlobalKnownHostsFile=/dev/null

  -sun   override for SunFiles.

  -lnx   override for LinuxFiles.

  -xts   override for CrayFiles.

  -aca   override for AcademicFiles.

  -m[achines]|-nodes|-w
           Specify nodes, e.g.: '-nodes burbot,gold'.
           For an exclude list use '!", e.g. '-m !b1n5,b1n6' or '!m b1n5,b1n6'.

  -t[ype]
           Specify type, e.g.: '-type O2'.
           For an exclude list use '!'.

  -g[roup]|-usage|-class
           Specify group, e.g.: '-usage staff'.
           For an exclude list use '!'.

  -v[ersion]|-os
           Specify version, e.g.: '-os rh6.7'.
           The specification can be either major 'rh6' or major.minor 'rh6.7'.
           For an exclude list use '!'.

  -a[vail]|-status
           Specify status,  e.g.: '-status offline'.
           For an exclude list use '!'.

  -o[ther]|-frame|-rack
           Specify 'other' field check.
           For an exclude list use '!'.

  -?|-htype
         Brief usage information on a push type.

  --type-options
         Type options are generally specfied after the push type, but can  be  speci-
         fied after feature options with a '--'.


TYPE OPTIONS

  Scripts  in sbin/Push-* where the '*' is the 'type' of push.  The pre-defined types
  are identified below, additional can be easily added and some sites prefer  a  sym-
  link Push-command -> Push-cmd.

  all    Push to all online (default status 'Linux') in machines file.

         push [-Features] all [-options] command|file(s)

  all.but
         Push to all online except specified hosts

         push [-Features] all.but host1[,host2...] [-options] command

  cmd    Push command.

         push [-Features] cmd [-options] command

  config Push configuration file.

         This  exercises a safe preserving the inode of the target file as long as it
         resides in the filesystem containing the /backout.push directory.

         push [-Features] config [-options] target(s)

  config.but
         Push configuration file to all except named hosts.

         push [-Features] config.but host1[,host2...] [-options] target(s)

  file   Push a regular file.

         push [-Features] file [-options] source[target]

  one    Push configuration to named host(s).

         push [-Features] one host1[,host2...] [-options] target(s)

  one.cmd
         Push command to named host(s).

         push [-Features] one.cmd host1[,host2...] [-options] command

  one.rcp
         Push regular file to named host(s).

         push [-Features] one.rcp host1[,host2...] [-options] file1 [file2...]

  rcp    Push regular file.

         push [-Features] rcp [-options] whatever

         Exports: PUSH_machine, PUSH_type, PUSH_group, PUSH_ver, ...

  rsh    Push command.

         push [-Features] rsh [-options] whatever

         Exports: PUSH_machine, PUSH_type, PUSH_group, PUSH_ver, ...


TYPE OPTIONS

  Appropriate options are pre-set by the type wrapper in some cases but may be speci-
  fied to over-ride certain behaviours.  These may be specified as either:
    push type -options

  or:
    push --options type

  Note, default type settings take precedence.


TYPE OPTIONS - GENERAL

  -q     quiet, do not echo hostname or display Summary.

  -Q     Quiet, echo hostname:result (and no Summary).

  -S     Summary, display Summary.

  -V     Verbose, display 'Push using' messages and Summary.

  -v     verbose, show skipped hosts.

  -l     local, local host exclusion from command.

  -f     first, do NOT stop if first push fails.

  -d     debug, show command but don't execute it.


TYPE OPTIONS - RSH

  -t     trap, do NOT trap errors, implies '-f'.

  -T     trap, do NOT trap, but require normal exit.

  -p     path, do NOT use PUSH_PATH.

  -e     echo, echo host with command output.


TYPE OPTIONS - RCP

  -t,    target, target==source[s].

  -p     path, do NOT imply current directory if no leading /.

  -P     poff, do NOT use -p option for [r]cp.

  -s     safe, do NOT clobber original with copy, see PUSH_BACKOUTS .

  -c     config, use config file list, see PUSH_CONFIG, implies '-ts'

  -C     config, use config file list, override NOPUSH files.

  -r     reverse, reverse rcp (pull file vs. push file).  This option is invalid with
         -s|-c|-t and appends .hostname to target.

  -x     xfer, imply rcp if function not defined.


ACKNOWLEDGEMENTS

  Written at the University of Alaska.  Ongoing maintenance via SourceForge by Denali
  Sun Consulting.

  Suggestions or bug reports can be directed to denalisun907@gmail.com.


RELATED INFORMATION

  See: uals(1), uaxtools(8).