drist.1 (2980B)
1 .Dd $Mdocdate: April 27 2020 $ 2 .Dt DRIST 1 3 .Os 4 .Sh NAME 5 .Nm drist 6 .Nd dumb remote installer shell tool, a remote deployment tool 7 .Sh SYNOPSIS 8 .Op Fl p 9 .Op Fl d 10 .Op Fl s Op Fl e Ar sudo|doas 11 .Op Fl P Ar tag 12 .Ar destination 13 .Sh OPTIONS 14 .Bl -tag -width Ds 15 .It Op Fl p 16 to use persistent ssh connection, allowing to ssh only once 17 for the differents steps. 18 This uses ControlMaster feature from 19 .Xr ssh 1 . 20 .It Op Fl d 21 to truncate reported hostname. 22 Tells 23 .Nm 24 to truncate the reported remote hostname to the left-most component. 25 .It Op Fl s 26 use a program to execute a command as root on the remote server. 27 Default is sudo. 28 .It Op Fl e Ar binary 29 binary to use for executing the commands as root. 30 This flag is only useful when used with 31 .Fl s . 32 .It Op Fl P Ar tag 33 specify a tag name that may be used to select configuration in 34 .Xr ssh_config 5 . 35 .It Ar destination 36 Specify the remote servers you want drist to work on. 37 .Ar destination 38 can be a file containing a list of hosts, one per line or 39 it can be addresses passed in the command line. 40 If you specify multiples servers, 41 .Nm 42 will loop over the list respecting the list order. 43 Note that only one file can be used in the command line. 44 .El 45 .Sh DESCRIPTION 46 .Nm 47 is a tool to configure remote servers using 48 .Xr ssh 1 49 and 50 .Xr rsync 1 . 51 .Nm 52 has been designed to be simple, so it may not offer all the features you want. 53 .Pp 54 When you run 55 .Nm 56 , it will look at a set of special directories in the current working 57 directory. 58 .Nm 59 will connect to 60 .Ar server 61 via 62 .Xr ssh 1 63 and request the remote 64 .Em HOSTNAME 65 by calling 66 .Ql uname -n . 67 .Pp 68 After that following steps will be executed: 69 .Bl -enum -offset indent -compact 70 .It 71 If directory 72 .Ar files 73 exists, its content is copied to 74 .Ar server 75 using 76 .Xr rsync 1 77 in a temporary directory in ~/.drist_files_XXXXXXXX 78 .It 79 If directory 80 .Ar files- Ns Em HOSTNAME 81 exists, its content is copied to 82 .Ar server 83 using 84 .Xr rsync 1 85 in a temporary directory in ~/.drist_files_XXXXXXXX . 86 .It 87 If file 88 .Ar script 89 exists, it is copied to 90 .Ar server 91 and executed from the temporary directory. 92 .It 93 If file 94 .Ar script- Ns Em HOSTNAME 95 exists, it is copied to 96 .Ar server 97 and executed from the temporary directory. 98 .El 99 .Pp 100 The presence of each of those files or directories is optional. 101 .Pp 102 All files in either 103 .Ar files 104 or 105 .Ar files- Ns Em HOSTNAME 106 etc. are relative to the root (/) directory. 107 The specific files for 108 .Em HOSTNAME 109 are worked on after the common files. 110 .Pp 111 I recommend to write small "modules" which would install the required 112 packages for a task and provide the files needed, rather than writing a 113 full-blown module for deploying an entire system at once. 114 .Nm 115 does not handle file permissions and ownership. 116 Those should be modified by the 117 .Ar script 118 file. 119 .Sh EXAMPLES 120 Please see the 121 .Ar examples 122 directory in the 123 .Nm 124 distribution. 125 .Sh EXIT 126 .Ex -std drist 127 .Sh SEE ALSO 128 .Xr rsync 1 , 129 .Xr ssh 1 , 130 .Xr ssh_config 5 131 .Sh Authors 132 .An -nosplit 133 The 134 .Nm 135 program was written by 136 .An Solène Rapenne Aq Mt solene@perso.pw