Changes between Version 1 and Version 2 of Pantasks_server_mode
- Timestamp:
- Jun 19, 2009, 4:47:02 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Pantasks_server_mode
v1 v2 6 6 === Configuration === 7 7 8 Ensure the following is in your <code>~/.ptolemyrc</code>file:9 <pre> 8 Ensure the following is in your {{{~/.ptolemyrc}}} file: 9 {{{ 10 10 PANTASKS_SERVER XXXXX.ifa.hawaii.edu 11 11 PASSWORD XXXXX 12 12 #PANTASKS_SERVER_STDOUT pantasks.stdout.log 13 13 #PANTASKS_SERVER_STDERR pantasks.stderr.log 14 </pre> 15 16 * <code>PANTASKS_SERVER</code> defines the name of the server for the client to connect to. There's no real need to update this, since we'll use a script to set this on the fly, allowing multiple pantasks servers to be used simultaneously. 17 * <code>PASSWORD</code> provides minimal access control for the pantasks server. Set this to a unique word. 18 * <code>PANTASKS_SERVER_STDOUT</code> and <code>PANTASKS_SERVER_STDERR</code> define where the output goes that is usually displayed in the pantasks session. Since setting these also affects the standalone version of pantasks, I recommend leaving them commented out; we'll use a script to set them on the fly. 14 }}} 15 16 17 * {{{PANTASKS_SERVER}}} defines the name of the server for the client to connect to. There's no real need to update this, since we'll use a script to set this on the fly, allowing multiple pantasks servers to be used simultaneously. 18 * {{{PASSWORD}}} provides minimal access control for the pantasks server. Set this to a unique word. 19 * {{{PANTASKS_SERVER_STDOUT}}} and {{{PANTASKS_SERVER_STDERR}}} define where the output goes that is usually displayed in the pantasks session. Since setting these also affects the standalone version of pantasks, I recommend leaving them commented out; we'll use a script to set them on the fly. 19 20 20 21 21 22 If you are using Nebulous, you will also need to set up an ipphosts.config file. This config file has METADATA cards that assign a particular host to each chip on the camera, so that nebulous can distribute every exposure consistently, without piling too many chips onto the same machine. There is also a metadata card for indicating which hosts are to be used for skycell processing. Here is an example of how this config file should look: 22 23 23 <pre> 24 {{{ 24 25 ipphosts MULTI 25 26 … … 58 59 XY76 STR ipp015 59 60 END 60 </pre> 61 }}} 61 62 62 63 … … 67 68 68 69 * Save the following script as '''start_pantasks_server''' in some directory on your path 69 <pre> 70 {{{ 70 71 #!/bin/bash 71 72 # Start up a pantasks server … … 76 77 echo pantasks_server $server_redirect 77 78 pantasks_server $server_redirect 78 </pre> 79 }}} 79 80 80 81 * Save this one as '''start_pantasks_client''' on your path 81 82 82 <pre> 83 {{{ 83 84 #!/bin/bash 84 85 # start up pantasks_client … … 95 96 echo "Please provide the hostname of the pantasks server." 96 97 fi 97 </pre> 98 }}} 98 99 99 100 … … 101 102 102 103 Starting the server is as easy as: 103 <pre> 104 {{{ 104 105 % start_pantasks_server 105 106 bound to port: 2000 106 </pre> 107 }}} 107 108 You can start it in the background if you want: it's not going to print anything more to the terminal. 108 109 109 110 In a different window (or machine or user), start the client: 110 <pre> 111 {{{ 111 112 % start_pantasks_client mymachine 112 </pre> 113 where <code>mymachine</code>is the name of the machine on which the server is running.113 }}} 114 where {{{mymachine}}} is the name of the machine on which the server is running. 114 115 115 116 You should be presented with the usual pantasks environment. However, some things are subtly different: the environment you see before you is particular to the client, not the server, and it's the server that runs everything. This is important to keep in mind, and it means that you should bury within macros some commands that you would ordinarily just type on the pantasks command-line. … … 120 121 * Save this as server.pro in your pantasks modules directory 121 122 122 <pre> 123 {{{ 123 124 macro setup 124 125 $LABEL = "my_label" … … 152 153 controller host add machine4 -threads $1 153 154 end 154 </pre> 155 }}} 155 156 156 157 * If you're not using Nebulous, you can remove the lines that are specific to Nebulous use (these send jobs to particular machines). 157 * Ensure the <code>my_label</code>is changed to the label of the data you're processing (or <code>"NONE"</code> including quotes if none).158 * Ensure the <code>my_database</code>is changed to the database you're using.159 * Ensure the <code>machineN</code>are changed according to your system.158 * Ensure the {{{my_label}}} is changed to the label of the data you're processing (or <code>"NONE"</code> including quotes if none). 159 * Ensure the {{{my_database}}} is changed to the database you're using. 160 * Ensure the {{{machineN}}} are changed according to your system. 160 161 161 162 So, now in the pantasks client, you can say: 162 <pre> 163 {{{ 163 164 pantasks: server input server.pro 164 </pre> 165 }}} 165 166 to load the macro file. Note that the server has to do this command, hence the prefix <code>server</code>. 166 167 167 168 Here is how you would set up for processing, and add hosts with a maximum of 4 threads each: 168 <pre> 169 {{{ 169 170 pantasks: setup 170 171 pantasks: machines 4 171 </pre> 172 }}} 172 173 173 174 Now you should be able to simply say: 174 <pre> 175 {{{ 175 176 pantasks: run 176 </pre> 177 and pantasks will run as usual. The <code>status</code>, <code>stop</code> and <code>halt</code> commands are also available as usual (no need to prepend <code>server</code>or anything like that). But if you want to change the label, then you should do:178 <pre> 177 }}} 178 and pantasks will run as usual. The {{{status}}}, {{{stop}}} and {{{halt}}} commands are also available as usual (no need to prepend {{server}}} or anything like that). But if you want to change the label, then you should do: 179 {{{ 179 180 pantasks: change_label "new_label" 180 </pre> 181 }}} 181 182 whereas in the standalone pantasks, you could have done: 182 <pre> 183 {{{ 183 184 pantasks: $LABEL = "new_label" 184 </pre> 185 }}} 185 186 Such commands now have to be buried within macros. 186 187 … … 188 189 189 190 You can quit out of the client at any time by saying: 190 <pre> 191 {{{ 191 192 pantasks: quit 192 </pre> 193 }}} 193 194 194 195 This does not stop the server from continuing to process. You can reconnect to the server as you please. 195 196 196 197 When you're all done, you can force the server to quit by issuing the following command from the client: 197 <pre> 198 {{{ 198 199 pantasks: shutdown now 199 </pre> 200 }}}
