| 144 | == How to configure a TORQUE/PBS resource == |
| 145 | |
| 146 | In order to configure a TORQUE/PBS cluster accessed through ssh protocol, you should follow the next steps: |
| 147 | |
| 148 | 1. Configure the `meteo` resource. If you do not have a [wiki:DRM4G#Resourcesection private_key] file, you can generate one by executing [http://www.openbsd.org/openssh/manual.html ssh-keygen]. This command will generate a public key (`~/.ssh/id_rsa.pub`) that will be necessary later on. |
| 149 | {{{ |
| 150 | #!sh |
| 151 | [user@mycomputer~]$ drm4g resource edit |
| 152 | [meteo] |
| 153 | enable = true |
| 154 | communicator = ssh |
| 155 | username = user |
| 156 | frontend = mar.meteo.unican.es |
| 157 | private_key = ~/.ssh/id_rsa |
| 158 | lrms = pbs |
| 159 | queue = short |
| 160 | max_jobs_running = 2 |
| 161 | max_jobs_in_queue = 6 |
| 162 | }}} |
| 163 | 1. List and check if resource has been created successfully : |
| 164 | {{{ |
| 165 | #!sh |
| 166 | [user@mycomputer~]$ drm4g resource list |
| 167 | RESOURCE STATE |
| 168 | meteo enabled |
| 169 | |
| 170 | }}} |
| 171 | 1. Copy the public key (`~/.ssh/id_rsa.pub`) to `authorized_keys` file on the remote frond-end, and adds the private key to the agent for the ssh authorization: |
| 172 | {{{ |
| 173 | #!sh |
| 174 | |
| 175 | [user@mycomputer~]$ drm4g id meteo init |
| 176 | Starting ssh-agent ... |
| 177 | WARNING: ssh-agent is already running |
| 178 | --> Add '/home/user/.ssh/id_rsa' into ssh-agent for 168 hours |
| 179 | Lifetime set to 7 days, 0:00:00 |
| 180 | --> Copy '/home/user/.ssh/id_rsa' to ~/.ssh/authorized_keys file on 'ui.macc.unican.es' |
| 181 | |
| 182 | }}} |
| 183 | 1. Show information about the identity: |
| 184 | {{{ |
| 185 | #!sh |
| 186 | [user@mycomputer~]$ drm4g id meteo info |
| 187 | --> Display '/home/user/.ssh/id_rsa' key |
| 188 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQAABAQDcUYc9tDOYptqAWf7YzgN2NY9F+AtObtVvgh0PsIWZvDx1ml6j9n7zihiHFwnNIQh1q1EpIku/Jg8kyKOnbpm+2prnIhURoAWxO+rlzCF0Q4hHHW5svNNR6doCZ9mNNswi1uHaVpwhu8EKgfPyH+oNI/inSnJ/QQRHILyjUvaNbQPuXwVBpYjpvOAFOYA2VZqi+IfTq13lks7DCBfv3DK1w38aDQ9xFP/hYlQKwC/DwJo1q2CWxg5WZhgHFRG/1nyVH/nTbjOMTRZS61Gre58UUab/wSZQc6rTkrTitnCdAujIUx5eiOhM90JfDj+VUriLTnXCkwUC4+h |
| 189 | }}} |
| 190 | |
| 191 | That's it! Now, you can summit jobs to `meteo`. |
| 192 | |