Merge lp:~allenap/maas/keep-rendered-man-pages into lp:maas/trunk
- keep-rendered-man-pages
- Merge into trunk
Proposed by
Gavin Panella
on 2012-11-22
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Julian Edwards on 2012-11-22 | ||||
| Approved revision: | 1367 | ||||
| Merged at revision: | 1367 | ||||
| Proposed branch: | lp:~allenap/maas/keep-rendered-man-pages | ||||
| Merge into: | lp:maas/trunk | ||||
| Diff against target: |
952 lines (+913/-2) 5 files modified
.bzrignore (+1/-1) Makefile (+1/-1) man/maas-cli.8 (+758/-0) man/maas-import-pxe-files.8 (+81/-0) man/maas.8 (+72/-0) |
||||
| To merge this branch: | bzr merge lp:~allenap/maas/keep-rendered-man-pages | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Julian Edwards (community) | 2012-11-22 | Approve on 2012-11-22 | |
|
Review via email:
|
|||
Commit Message
Store generated man pages in the tree.
Building the man pages requires a full Django+MAAS stack, and unravelling that requires time. This is a not too ugly stop-gap.
Description of the Change
To post a comment you must log in.
review:
Approve
| Julian Edwards (julian-edwards) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file '.bzrignore' |
| 2 | --- .bzrignore 2012-11-20 20:59:00 +0000 |
| 3 | +++ .bzrignore 2012-11-22 23:43:21 +0000 |
| 4 | @@ -21,7 +21,7 @@ |
| 5 | ./lib |
| 6 | ./local |
| 7 | ./logs/* |
| 8 | -./man |
| 9 | +./man/.doctrees |
| 10 | ./media/demo/* |
| 11 | ./media/development |
| 12 | ./parts |
| 13 | |
| 14 | === modified file 'Makefile' |
| 15 | --- Makefile 2012-11-21 11:19:38 +0000 |
| 16 | +++ Makefile 2012-11-22 23:43:21 +0000 |
| 17 | @@ -159,7 +159,7 @@ |
| 18 | $(RM) *.log |
| 19 | $(RM) docs/api.rst |
| 20 | $(RM) -r docs/_autosummary docs/_build |
| 21 | - $(RM) -r man |
| 22 | + $(RM) -r man/.doctrees |
| 23 | |
| 24 | distclean: clean stop |
| 25 | $(RM) -r bin include lib local |
| 26 | |
| 27 | === added directory 'man' |
| 28 | === added file 'man/maas-cli.8' |
| 29 | --- man/maas-cli.8 1970-01-01 00:00:00 +0000 |
| 30 | +++ man/maas-cli.8 2012-11-22 23:43:21 +0000 |
| 31 | @@ -0,0 +1,758 @@ |
| 32 | +.TH "MAAS-CLI" "8" "November 22, 2012" "12.10" "MAAS" |
| 33 | +.SH NAME |
| 34 | +maas-cli \- MAAS API commandline utility |
| 35 | +. |
| 36 | +.nr rst2man-indent-level 0 |
| 37 | +. |
| 38 | +.de1 rstReportMargin |
| 39 | +\\$1 \\n[an-margin] |
| 40 | +level \\n[rst2man-indent-level] |
| 41 | +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 42 | +- |
| 43 | +\\n[rst2man-indent0] |
| 44 | +\\n[rst2man-indent1] |
| 45 | +\\n[rst2man-indent2] |
| 46 | +.. |
| 47 | +.de1 INDENT |
| 48 | +.\" .rstReportMargin pre: |
| 49 | +. RS \\$1 |
| 50 | +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 51 | +. nr rst2man-indent-level +1 |
| 52 | +.\" .rstReportMargin post: |
| 53 | +.. |
| 54 | +.de UNINDENT |
| 55 | +. RE |
| 56 | +.\" indent \\n[an-margin] |
| 57 | +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 58 | +.nr rst2man-indent-level -1 |
| 59 | +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 60 | +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 61 | +.. |
| 62 | +.\" Man page generated from reStructeredText. |
| 63 | +. |
| 64 | +.SH USAGE |
| 65 | +.INDENT 0.0 |
| 66 | +.INDENT 3.5 |
| 67 | +$ maas\-cli <profile> <command> [parameters] |
| 68 | +.UNINDENT |
| 69 | +.UNINDENT |
| 70 | +.sp |
| 71 | +The available commands are dependent on the API you are connecting to and the |
| 72 | +profile you use. The currently available options are explained below. |
| 73 | +.SH DESCRIPTION |
| 74 | +.sp |
| 75 | +As well as the web interface, many tasks can be performed by accessing |
| 76 | +the MAAS API directly through the maas\-cli command. This section |
| 77 | +details how to login with this tool and perform some common |
| 78 | +operations. |
| 79 | +.sp |
| 80 | +Before the API will accept any commands from maas\-cli, you must first |
| 81 | +login. To do this, you need the API key which can be found in the user |
| 82 | +interface. |
| 83 | +.sp |
| 84 | +Login to the web interface on your MAAS. Click on the username in the |
| 85 | +top right corner and select \(aqPreferences\(aq from the menu which appears. |
| 86 | +[image] |
| 87 | +.sp |
| 88 | +A new page will load... |
| 89 | +[image] |
| 90 | +.sp |
| 91 | +The very first item is a list of MAAS keys. One will have already been |
| 92 | +generated when the system was installed. It\(aqs easiest to just select |
| 93 | +and copy the key (it\(aqs quite long!) and then paste it into the |
| 94 | +commandline. The format of the login command is: |
| 95 | +.sp |
| 96 | +.nf |
| 97 | +.ft C |
| 98 | +$ maas\-cli login <profile\-name> <hostname> <key> |
| 99 | +.ft P |
| 100 | +.fi |
| 101 | +.sp |
| 102 | +The profile created is an easy way of associating your credentials |
| 103 | +with any subsequent call to the API. So an example login might look |
| 104 | +like this: |
| 105 | +.sp |
| 106 | +.nf |
| 107 | +.ft C |
| 108 | +$ maas\-cli login maas http://10.98.0.13/MAAS/api/1.0 AWSCRMzqMNy:jjk...5e1FenoP82Qm5te2 |
| 109 | +.ft P |
| 110 | +.fi |
| 111 | +.sp |
| 112 | +which creates the profile \(aqmaas\(aq and registers it with the given key |
| 113 | +at the specified API endpoint. If you omit the credentials, they will |
| 114 | +be prompted for in the console. It is also possible to use a hyphen, |
| 115 | +\(aq\-\(aq in place of the credentials. In this case a single line will be |
| 116 | +read from stdin, stripped of any whitespace and used as the |
| 117 | +credentials, which can be useful if you are devolping scripts for |
| 118 | +specific tasks. If an empty string is passed instead of the |
| 119 | +credentials, the profile will be logged in anonymously (and |
| 120 | +consequently some of the API calls will not be available) |
| 121 | +.sp |
| 122 | +The \fBmaas\-cli\fP command exposes the whole API, so you can do anything |
| 123 | +you actually \fIcan\fP do with MAAS using this command. Unsurprisingly, |
| 124 | +this leaves us with a vast number of options, but before we delve into |
| 125 | +detail on the specifics, here is a sort of \(aqcheat\-sheet\(aq for common |
| 126 | +tasks you might want to do using \fBmaas\-cli\fP. |
| 127 | +.INDENT 0.0 |
| 128 | +.INDENT 3.5 |
| 129 | +.INDENT 0.0 |
| 130 | +.IP \(bu 2 |
| 131 | +\fI\%Configure DHCP and DNS services\fP |
| 132 | +.IP \(bu 2 |
| 133 | +\fI\%Commission all enlisted nodes\fP |
| 134 | +.IP \(bu 2 |
| 135 | +\fI\%Setting IPMI power parameters for a node\fP |
| 136 | +.UNINDENT |
| 137 | +.UNINDENT |
| 138 | +.UNINDENT |
| 139 | +.sp |
| 140 | +The main maas\-cli commands are: |
| 141 | +.sp |
| 142 | +\fBlist\fP |
| 143 | +.INDENT 0.0 |
| 144 | +.INDENT 3.5 |
| 145 | +lists the details [name url auth\-key] of all the currently logged\-in |
| 146 | +profiles. |
| 147 | +.UNINDENT |
| 148 | +.UNINDENT |
| 149 | +.sp |
| 150 | +\fBlogin <profile> <url> <key>\fP |
| 151 | +.INDENT 0.0 |
| 152 | +.INDENT 3.5 |
| 153 | +Logs in to the MAAS controller API at the given URL, using the key |
| 154 | +provided and associates this connection with the given profile name. |
| 155 | +.UNINDENT |
| 156 | +.UNINDENT |
| 157 | +.sp |
| 158 | +\fBlogout <profile>\fP |
| 159 | +.INDENT 0.0 |
| 160 | +.INDENT 3.5 |
| 161 | +Logs out from the given profile, flushing the stored credentials. |
| 162 | +.UNINDENT |
| 163 | +.UNINDENT |
| 164 | +.sp |
| 165 | +\fBrefresh\fP |
| 166 | +.INDENT 0.0 |
| 167 | +.INDENT 3.5 |
| 168 | +Refreshes the API descriptions of all the current logged in |
| 169 | +profiles. This may become necessary for example when upgrading the |
| 170 | +maas packages to ensure the command\-line options match with the API. |
| 171 | +.UNINDENT |
| 172 | +.UNINDENT |
| 173 | +.sp |
| 174 | +\fB<profile> [command] [options] ...\fP |
| 175 | +.INDENT 0.0 |
| 176 | +.INDENT 3.5 |
| 177 | +Using the given profile name instructs \fBmaas\-cli\fP to direct the |
| 178 | +subsequent commands and options to the relevant MAAS, which for the |
| 179 | +current API are detailed below... |
| 180 | +.UNINDENT |
| 181 | +.UNINDENT |
| 182 | +.SH ACCOUNT |
| 183 | +.sp |
| 184 | +This command is used for creating and destroying the |
| 185 | +MAAS authorisation tokens associated with a profile. |
| 186 | +.sp |
| 187 | +Usage: maas\-cli \fI<profile>\fP account [\-d \-\-debug] [\-h \-\-help] |
| 188 | +create\-authorisation\-token | delete\-authorisation\-token [token_key=\fI<value>\fP] |
| 189 | +.sp |
| 190 | +\fB\-d, \-\-debug\fP |
| 191 | +.INDENT 0.0 |
| 192 | +.INDENT 3.5 |
| 193 | +Displays debug information listing the API responses. |
| 194 | +.UNINDENT |
| 195 | +.UNINDENT |
| 196 | +.sp |
| 197 | +\fB\-h, \-\-help\fP |
| 198 | +.INDENT 0.0 |
| 199 | +.INDENT 3.5 |
| 200 | +Display usage information. |
| 201 | +.UNINDENT |
| 202 | +.UNINDENT |
| 203 | +.sp |
| 204 | +\fB\-k, \-\-insecure\fP |
| 205 | +.INDENT 0.0 |
| 206 | +.INDENT 3.5 |
| 207 | +Disables the SSL certificate check. |
| 208 | +.UNINDENT |
| 209 | +.UNINDENT |
| 210 | +.sp |
| 211 | +\fBcreate\-authorisation\-token\fP |
| 212 | +.INDENT 0.0 |
| 213 | +.INDENT 3.5 |
| 214 | +Creates a new MAAS authorisation token for the current profile |
| 215 | +which can be used to authenticate connections to the API. |
| 216 | +.UNINDENT |
| 217 | +.UNINDENT |
| 218 | +.sp |
| 219 | +\fBdelete\-authorisation\-token token_key=<value>\fP |
| 220 | +.INDENT 0.0 |
| 221 | +.INDENT 3.5 |
| 222 | +Removes the given key from the list of authorisation tokens. |
| 223 | +.UNINDENT |
| 224 | +.UNINDENT |
| 225 | +.SH NODE |
| 226 | +.sp |
| 227 | +API calls which operate on individual nodes. With these commands, the |
| 228 | +node is always identified by its "system_id" property \- a unique tag |
| 229 | +allocated at the time of enlistment. To discover the value of the |
| 230 | +system_id, you can use the \fBmaas\-cli <profile> nodes list\fP command. |
| 231 | +.sp |
| 232 | +USAGE: maas\-cli <profile> node [\-h] release | start | stop | delete | |
| 233 | +read | update <system_id> |
| 234 | +.sp |
| 235 | +\fB\-h, \-\-help\fP |
| 236 | +.INDENT 0.0 |
| 237 | +.INDENT 3.5 |
| 238 | +Display usage information. |
| 239 | +.UNINDENT |
| 240 | +.UNINDENT |
| 241 | +.sp |
| 242 | +\fBrelease <system_id>\fP |
| 243 | +.INDENT 0.0 |
| 244 | +.INDENT 3.5 |
| 245 | +Releases the node given by \fI<system_id>\fP |
| 246 | +.UNINDENT |
| 247 | +.UNINDENT |
| 248 | +.sp |
| 249 | +\fBstart <system_id>\fP |
| 250 | +.INDENT 0.0 |
| 251 | +.INDENT 3.5 |
| 252 | +Powers up the node identified by \fI<system_id>\fP (where MAAS has |
| 253 | +information for power management for this node). |
| 254 | +.UNINDENT |
| 255 | +.UNINDENT |
| 256 | +.sp |
| 257 | +\fBstop <system_id>\fP |
| 258 | +.INDENT 0.0 |
| 259 | +.INDENT 3.5 |
| 260 | +Powers off the node identified by \fI<system_id>\fP (where MAAS has |
| 261 | +information for power management for this node). |
| 262 | +.UNINDENT |
| 263 | +.UNINDENT |
| 264 | +.sp |
| 265 | +\fBdelete <system_id>\fP |
| 266 | +.INDENT 0.0 |
| 267 | +.INDENT 3.5 |
| 268 | +Removes the given node from the MAAS database. |
| 269 | +.UNINDENT |
| 270 | +.UNINDENT |
| 271 | +.sp |
| 272 | +\fBread <system_id>\fP |
| 273 | +.INDENT 0.0 |
| 274 | +.INDENT 3.5 |
| 275 | +Returns all the current known information about the node specified |
| 276 | +by \fI<system_id>\fP |
| 277 | +.UNINDENT |
| 278 | +.UNINDENT |
| 279 | +.sp |
| 280 | +\fBupdate <system_id> [parameters...]\fP |
| 281 | +.INDENT 0.0 |
| 282 | +.INDENT 3.5 |
| 283 | +Used to change or set specific values for the node. The valid |
| 284 | +parameters are listed below: |
| 285 | +.sp |
| 286 | +.nf |
| 287 | +.ft C |
| 288 | +hostname=<value> |
| 289 | + The new hostname for this node. |
| 290 | + |
| 291 | +architecture=<value> |
| 292 | + Sets the architecture type, where <value> |
| 293 | + is a string containing a valid architecture type, |
| 294 | + e.g. "i386/generic" |
| 295 | + |
| 296 | +power_type=<value> |
| 297 | + Apply the given dotted decimal value as the broadcast IP address |
| 298 | + for this subnet. |
| 299 | + |
| 300 | +power_parameters_{param1}... =<value> |
| 301 | + Set the given power parameters. Note that the valid options for these |
| 302 | + depend on the power type chosen. |
| 303 | + |
| 304 | +power_parameters_skip_check \(aqtrue\(aq | \(aqfalse\(aq |
| 305 | + Whether to sanity check the supplied parameters against this node\(aqs |
| 306 | + declared power type. The default is \(aqfalse\(aq. |
| 307 | +.ft P |
| 308 | +.fi |
| 309 | +.UNINDENT |
| 310 | +.UNINDENT |
| 311 | +.sp |
| 312 | +Example: Setting the power parameters for an ipmi enabled node: |
| 313 | +.sp |
| 314 | +.nf |
| 315 | +.ft C |
| 316 | +maas\-cli maas node update <system_id> \e |
| 317 | + power_type="ipmi" \e |
| 318 | + power_parameters_power_address=192.168.22.33 \e |
| 319 | + power_parameters_power_user=root \e |
| 320 | + power_parameters_power_pass=ubuntu; |
| 321 | +.ft P |
| 322 | +.fi |
| 323 | +.SH NODES |
| 324 | +.sp |
| 325 | +Usage: maas\-cli <profile> nodes [\-h] is\-registered | list\-allocated | |
| 326 | +acquire | list | accept | accept\-all | new | check\-commissioning |
| 327 | +.sp |
| 328 | +\fB\-h, \-\-help\fP |
| 329 | +.INDENT 0.0 |
| 330 | +.INDENT 3.5 |
| 331 | +Display usage information. |
| 332 | +.UNINDENT |
| 333 | +.UNINDENT |
| 334 | +.sp |
| 335 | +\fBaccept <system_id>\fP |
| 336 | +.INDENT 0.0 |
| 337 | +.INDENT 3.5 |
| 338 | +Accepts the node referenced by <system_id>. |
| 339 | +.UNINDENT |
| 340 | +.UNINDENT |
| 341 | +.sp |
| 342 | +\fBaccept\-all\fP |
| 343 | +.INDENT 0.0 |
| 344 | +.INDENT 3.5 |
| 345 | +Accepts all currently discovered but not previously accepted nodes. |
| 346 | +.UNINDENT |
| 347 | +.UNINDENT |
| 348 | +.sp |
| 349 | +\fBacquire\fP |
| 350 | +.INDENT 0.0 |
| 351 | +.INDENT 3.5 |
| 352 | +Allocates a node to the profile used to issue the command. Any |
| 353 | +ready node may be allocated. |
| 354 | +.UNINDENT |
| 355 | +.UNINDENT |
| 356 | +.sp |
| 357 | +\fBis\-registered mac_address=<address>\fP |
| 358 | +.INDENT 0.0 |
| 359 | +.INDENT 3.5 |
| 360 | +Checks to see whether the specified MAC address is registered to a |
| 361 | +node. |
| 362 | +.UNINDENT |
| 363 | +.UNINDENT |
| 364 | +.sp |
| 365 | +\fBlist\fP |
| 366 | +.INDENT 0.0 |
| 367 | +.INDENT 3.5 |
| 368 | +Returns a JSON formatted object listing all the currently known |
| 369 | +nodes, their system_id, status and other details. |
| 370 | +.UNINDENT |
| 371 | +.UNINDENT |
| 372 | +.sp |
| 373 | +\fBlist\-allocated\fP |
| 374 | +.INDENT 0.0 |
| 375 | +.INDENT 3.5 |
| 376 | +Returns a JSON formatted object listing all the currently allocated |
| 377 | +nodes, their system_id, status and other details. |
| 378 | +.UNINDENT |
| 379 | +.UNINDENT |
| 380 | +.sp |
| 381 | +\fBnew architecture=<value> mac_addresses=<value> [parameters]\fP |
| 382 | +.INDENT 0.0 |
| 383 | +.INDENT 3.5 |
| 384 | +Creates a new node entry given the provided key=value information |
| 385 | +for the node. A minimum of the MAC address and architecture must be |
| 386 | +provided. Other parameters may also be supplied: |
| 387 | +.sp |
| 388 | +.nf |
| 389 | +.ft C |
| 390 | +architecture="<value>" \- The architecture of the node, must be |
| 391 | +one of the recognised architecture strings (e.g. "i386/generic") |
| 392 | +hostname="<value>" \- a name for this node. If not supplied a name |
| 393 | +will be generated. |
| 394 | +mac_addresses="<value>" \- The mac address(es) |
| 395 | +allocated to this node. |
| 396 | +powertype="<value>" \- the power type of |
| 397 | +the node (e.g. virsh, ipmi) |
| 398 | +.ft P |
| 399 | +.fi |
| 400 | +.UNINDENT |
| 401 | +.UNINDENT |
| 402 | +.sp |
| 403 | +\fBcheck\-commissioning\fP |
| 404 | +.INDENT 0.0 |
| 405 | +.INDENT 3.5 |
| 406 | +Displays current status of nodes in the commissioning phase. Any |
| 407 | +that have not returned before the system timeout value are listed |
| 408 | +as "failed". |
| 409 | +.UNINDENT |
| 410 | +.UNINDENT |
| 411 | +.sp |
| 412 | +Examples: |
| 413 | +Accept and commission all discovered nodes: |
| 414 | +.sp |
| 415 | +.nf |
| 416 | +.ft C |
| 417 | +$ maas\-cli maas nodes accept\-all |
| 418 | +.ft P |
| 419 | +.fi |
| 420 | +.sp |
| 421 | +List all known nodes: |
| 422 | +.sp |
| 423 | +.nf |
| 424 | +.ft C |
| 425 | +$ maas\-cli maas nodes list |
| 426 | +.ft P |
| 427 | +.fi |
| 428 | +.sp |
| 429 | +Filter the list using specific key/value pairs: |
| 430 | +.sp |
| 431 | +.nf |
| 432 | +.ft C |
| 433 | +$ maas\-cli maas nodes list architecture="i386/generic" |
| 434 | +.ft P |
| 435 | +.fi |
| 436 | +.SH NODE-GROUPS |
| 437 | +.sp |
| 438 | +Usage: maas\-cli <profile> node\-groups [\-d \-\-debug] [\-h \-\-help] [\-k |
| 439 | +\-\-insecure] register | list | refresh\-workers | accept | reject |
| 440 | +.sp |
| 441 | +\fB\-d, \-\-debug\fP |
| 442 | +.INDENT 0.0 |
| 443 | +.INDENT 3.5 |
| 444 | +Displays debug information listing the API responses. |
| 445 | +.UNINDENT |
| 446 | +.UNINDENT |
| 447 | +.sp |
| 448 | +\fB\-h, \-\-help\fP |
| 449 | +.INDENT 0.0 |
| 450 | +.INDENT 3.5 |
| 451 | +Display usage information. |
| 452 | +.UNINDENT |
| 453 | +.UNINDENT |
| 454 | +.sp |
| 455 | +\fB\-k, \-\-insecure\fP |
| 456 | +.INDENT 0.0 |
| 457 | +.INDENT 3.5 |
| 458 | +Disables the SSL certificate check. |
| 459 | +.UNINDENT |
| 460 | +.UNINDENT |
| 461 | +.sp |
| 462 | +\fBregister uuid=<value> name=<value> interfaces=<json_string>\fP |
| 463 | +.INDENT 0.0 |
| 464 | +.INDENT 3.5 |
| 465 | +Registers a new node group with the given name and uuid. The |
| 466 | +interfaces parameter must be supplied in the form of a JSON string |
| 467 | +comprising the key/value data for the interface to be used, for |
| 468 | +example: interface=\(aq["ip":"192.168.21.5","interface":"eth1", "subnet_mask":"255.255.255.0","broadcast_ip":"192.168.21.255", "router_ip":"192.168.21.1", "ip_range_low":"192.168.21.10", "ip_range_high":"192.168.21.50"}]\(aq |
| 469 | +.UNINDENT |
| 470 | +.UNINDENT |
| 471 | +.sp |
| 472 | +\fBlist\fP |
| 473 | +.INDENT 0.0 |
| 474 | +.INDENT 3.5 |
| 475 | +Returns a JSON list of all currently defined node groups. |
| 476 | +.UNINDENT |
| 477 | +.UNINDENT |
| 478 | +.sp |
| 479 | +\fBrefresh_workers\fP |
| 480 | +.INDENT 0.0 |
| 481 | +.INDENT 3.5 |
| 482 | +It sounds a bit like they will get a cup of tea and a |
| 483 | +biscuit. Actually this just sends each node\-group worker an update |
| 484 | +of its credentials (API key, node\-group name). This command is |
| 485 | +usually not needed at a user level, but is often used by worker |
| 486 | +nodes. |
| 487 | +.UNINDENT |
| 488 | +.UNINDENT |
| 489 | +.sp |
| 490 | +\fBaccept <uuid>\fP |
| 491 | +.INDENT 0.0 |
| 492 | +.INDENT 3.5 |
| 493 | +Accepts a node\-group or number of nodegroups indicated by the |
| 494 | +supplied UUID |
| 495 | +.UNINDENT |
| 496 | +.UNINDENT |
| 497 | +.sp |
| 498 | +\fBreject <uuid>\fP |
| 499 | +.INDENT 0.0 |
| 500 | +.INDENT 3.5 |
| 501 | +Rejects a node\-group or number of nodegroups indicated by the |
| 502 | +supplied UUID |
| 503 | +.UNINDENT |
| 504 | +.UNINDENT |
| 505 | +.SH NODE-GROUP-INTERFACE |
| 506 | +.sp |
| 507 | +For managing the interfaces. See also \fI\%node-group-interfaces\fP |
| 508 | +.sp |
| 509 | +Usage: maas\-cli \fI<profile>\fP node\-group\-interfaces [\-d \-\-debug] [\-h |
| 510 | +\-\-help] [\-k \-\-insecure] read | update | delete [parameters...] |
| 511 | +.sp |
| 512 | +..program:: maas\-cli node\-group\-interface |
| 513 | +.sp |
| 514 | +\fBread <uuid> <interface>\fP |
| 515 | +.INDENT 0.0 |
| 516 | +.INDENT 3.5 |
| 517 | +Returns the current settings for the given UUID and interface |
| 518 | +.UNINDENT |
| 519 | +.UNINDENT |
| 520 | +.sp |
| 521 | +\fBupdate [parameters]\fP |
| 522 | +.INDENT 0.0 |
| 523 | +.INDENT 3.5 |
| 524 | +Changes the settings for the interface according to the given |
| 525 | +parameters: |
| 526 | +.sp |
| 527 | +.nf |
| 528 | +.ft C |
| 529 | +management= 0 | 1 | 2 |
| 530 | + The service to be managed on the interface ( 0= none, 1=DHCP, 2=DHCP |
| 531 | + and DNS). |
| 532 | + |
| 533 | +subnet_mask=<value> |
| 534 | + Apply the given dotted decimal value as the subnet mask. |
| 535 | + |
| 536 | +broadcast_ip=<value> |
| 537 | + Apply the given dotted decimal value as the broadcast IP address for |
| 538 | + this subnet. |
| 539 | + |
| 540 | +router_ip=<value> |
| 541 | + Apply the given dotted decimal value as the default router address |
| 542 | + for this subnet. |
| 543 | + |
| 544 | +ip_range_low=<value> |
| 545 | + The lowest value of IP address to allocate via DHCP |
| 546 | + |
| 547 | +ip_range_high=<value> |
| 548 | + The highest value of IP address to allocate via DHCP |
| 549 | +.ft P |
| 550 | +.fi |
| 551 | +.UNINDENT |
| 552 | +.UNINDENT |
| 553 | +.sp |
| 554 | +\fBdelete <uuid> <interface>\fP |
| 555 | +.INDENT 0.0 |
| 556 | +.INDENT 3.5 |
| 557 | +Removes the entry for the given UUID and interface. |
| 558 | +.UNINDENT |
| 559 | +.UNINDENT |
| 560 | +.sp |
| 561 | +Example: |
| 562 | +Configuring DHCP and DNS. |
| 563 | +.sp |
| 564 | +To enable MAAS to manage DHCP and DNS, it needs to be supplied with the relevant |
| 565 | +interface information. To do this we need to first determine the UUID of the |
| 566 | +node group affected: |
| 567 | +.sp |
| 568 | +.nf |
| 569 | +.ft C |
| 570 | +$ uuid=$(maas\-cli <profile> node\-groups list | grep uuid | cut \-d\e" \-f4) |
| 571 | +.ft P |
| 572 | +.fi |
| 573 | +.sp |
| 574 | +Once we have the UUID we can use this to update the node\-group\-interface for |
| 575 | +that nodegroup, and pass it the relevant interface details: |
| 576 | +.sp |
| 577 | +.nf |
| 578 | +.ft C |
| 579 | +$ maas\-cli <profile> node\-group\-interface update $uuid eth0 \e |
| 580 | + ip_range_high=192.168.123.200 \e |
| 581 | + ip_range_low=192.168.123.100 \e |
| 582 | + management=2 \e |
| 583 | + broadcast_ip=192.168.123.255 \e |
| 584 | + router_ip=192.168.123.1 \e |
| 585 | +.ft P |
| 586 | +.fi |
| 587 | +.sp |
| 588 | +Replacing the example values with those required for this network. The |
| 589 | +only non\-obvious parameter is \(aqmanagement\(aq which takes the values 0 |
| 590 | +(no management), 1 (manage DHCP) and 2 (manage DHCP and DNS). |
| 591 | +.SH NODE-GROUP-INTERFACES |
| 592 | +.sp |
| 593 | +The node\-group\-interfaces commands are used for configuring the |
| 594 | +management of DHCP and DNS services where these are managed by MAAS. |
| 595 | +.sp |
| 596 | +Usage: maas\-cli \fI<profile>\fP node\-group\-interfaces [\-d \-\-debug] [\-h |
| 597 | +\-\-help] [\-k \-\-insecure] list | new [parameters...] |
| 598 | +.sp |
| 599 | +\fB\-d, \-\-debug\fP |
| 600 | +.INDENT 0.0 |
| 601 | +.INDENT 3.5 |
| 602 | +Displays debug information listing the API responses. |
| 603 | +.UNINDENT |
| 604 | +.UNINDENT |
| 605 | +.sp |
| 606 | +\fB\-h, \-\-help\fP |
| 607 | +.INDENT 0.0 |
| 608 | +.INDENT 3.5 |
| 609 | +Display usage information. |
| 610 | +.UNINDENT |
| 611 | +.UNINDENT |
| 612 | +.sp |
| 613 | +\fB\-k, \-\-insecure\fP |
| 614 | +.INDENT 0.0 |
| 615 | +.INDENT 3.5 |
| 616 | +Disables the SSL certificate check. |
| 617 | +.UNINDENT |
| 618 | +.UNINDENT |
| 619 | +.sp |
| 620 | +\fBlist <label>\fP |
| 621 | +.INDENT 0.0 |
| 622 | +.INDENT 3.5 |
| 623 | +Lists the current stored configurations for the given identifier |
| 624 | +<label> in a key:value format which should be easy to decipher. |
| 625 | +.UNINDENT |
| 626 | +.UNINDENT |
| 627 | +.sp |
| 628 | +\fBnew <label> ip=<value> interface=<if_device> [parameters...]\fP |
| 629 | +.INDENT 0.0 |
| 630 | +.INDENT 3.5 |
| 631 | +Creates a new interface group. The required parameters are the IP |
| 632 | +address and the network interface this appies to (e.g. eth0). In |
| 633 | +order to do anything useful, further parameters are required: |
| 634 | +.sp |
| 635 | +.nf |
| 636 | +.ft C |
| 637 | +management= 0 | 1 | 2 |
| 638 | + The service to be managed on the interface |
| 639 | + ( 0= none, 1=DHCP, 2=DHCP and DNS). |
| 640 | + |
| 641 | +subnet_mask=<value> |
| 642 | + Apply the given dotted decimal value as the subnet mask. |
| 643 | + |
| 644 | +broadcast_ip=<value> |
| 645 | + Apply the given dotted decimal value as the |
| 646 | + broadcast IP address for this subnet. |
| 647 | + |
| 648 | +router_ip=<value> |
| 649 | + Apply the given dotted decimal value as the |
| 650 | + default router address for this subnet. |
| 651 | + |
| 652 | +ip_range_low=<value> |
| 653 | + The lowest value of IP address to allocate via DHCP |
| 654 | + |
| 655 | +ip_range_high=<value> |
| 656 | + The highest value of IP address to allocate via DHCP |
| 657 | +.ft P |
| 658 | +.fi |
| 659 | +.UNINDENT |
| 660 | +.UNINDENT |
| 661 | +.SH TAG |
| 662 | +.INDENT 0.0 |
| 663 | +.TP |
| 664 | +.B Usage: maas\-cli <profile> tag read | update\-nodes | rebuild | update | |
| 665 | +nodes | delete |
| 666 | +.UNINDENT |
| 667 | +.sp |
| 668 | +\fBread <tag_name>\fP |
| 669 | +.INDENT 0.0 |
| 670 | +.INDENT 3.5 |
| 671 | +Returns information on the tag specified by <name> |
| 672 | +.UNINDENT |
| 673 | +.UNINDENT |
| 674 | +.sp |
| 675 | +\fBupdate\-nodes <tag_name> [add=<system_id>] [remove=<system_id>] [nodegroup=<system_id>]\fP |
| 676 | +.INDENT 0.0 |
| 677 | +.INDENT 3.5 |
| 678 | +Applies or removes the given tag from a list of nodes specified by |
| 679 | +either or both of add="<system_id>" and remove="<system_id>". The |
| 680 | +nodegroup parameter, which restricts the operations to a particular |
| 681 | +nodegroup, is optional, but only the superuser can execute this |
| 682 | +command without it. |
| 683 | +.UNINDENT |
| 684 | +.UNINDENT |
| 685 | +.sp |
| 686 | +\fBrebuild\fP |
| 687 | +.INDENT 0.0 |
| 688 | +.INDENT 3.5 |
| 689 | +Triggers a rebuild of the tag to node mapping. |
| 690 | +.UNINDENT |
| 691 | +.UNINDENT |
| 692 | +.sp |
| 693 | +\fBupdate <tag_name> [name=<value>] | [comment=<value>]|[definition=<value>]\fP |
| 694 | +.INDENT 0.0 |
| 695 | +.INDENT 3.5 |
| 696 | +Updates the tag identified by tag_name. Any or all of name,comment |
| 697 | +and definition may be supplied as parameters. If no parameters are |
| 698 | +supplied, this command returns the current values. |
| 699 | +.UNINDENT |
| 700 | +.UNINDENT |
| 701 | +.sp |
| 702 | +\fBnodes <tag_name>\fP |
| 703 | +.INDENT 0.0 |
| 704 | +.INDENT 3.5 |
| 705 | +Returns a list of nodes which are associated with the given tag. |
| 706 | +.UNINDENT |
| 707 | +.UNINDENT |
| 708 | +.sp |
| 709 | +\fBdelete <tag_name>\fP |
| 710 | +.INDENT 0.0 |
| 711 | +.INDENT 3.5 |
| 712 | +Deletes the given tag. |
| 713 | +.UNINDENT |
| 714 | +.UNINDENT |
| 715 | +.SH TAGS |
| 716 | +.sp |
| 717 | +Tags are a really useful way of identifying nodes with particular |
| 718 | +characteristics. |
| 719 | +.sp |
| 720 | +Usage: maas\-cli <profile> tag [\-d \-\-debug] [\-h \-\-help] [\-k |
| 721 | +\-\-insecure] list | new |
| 722 | +.sp |
| 723 | +\fB\-d, \-\-debug\fP |
| 724 | +.INDENT 0.0 |
| 725 | +.INDENT 3.5 |
| 726 | +Displays debug information listing the API responses. |
| 727 | +.UNINDENT |
| 728 | +.UNINDENT |
| 729 | +.sp |
| 730 | +\fB\-h, \-\-help\fP |
| 731 | +.INDENT 0.0 |
| 732 | +.INDENT 3.5 |
| 733 | +Display usage information. |
| 734 | +.UNINDENT |
| 735 | +.UNINDENT |
| 736 | +.sp |
| 737 | +\fB\-k, \-\-insecure\fP |
| 738 | +.INDENT 0.0 |
| 739 | +.INDENT 3.5 |
| 740 | +Disables the SSL certificate check. |
| 741 | +.UNINDENT |
| 742 | +.UNINDENT |
| 743 | +.sp |
| 744 | +\fBlist\fP |
| 745 | +.INDENT 0.0 |
| 746 | +.INDENT 3.5 |
| 747 | +Returns a JSON object listing all the current tags known by the MAAS server |
| 748 | +.UNINDENT |
| 749 | +.UNINDENT |
| 750 | +.sp |
| 751 | +\fBcreate name=<value> definition=<value> [comment=<value>]\fP |
| 752 | +.INDENT 0.0 |
| 753 | +.INDENT 3.5 |
| 754 | +Creates a new tag with the given name and definition. A comment is |
| 755 | +optional. Names must be unique, obviously \- an error will be |
| 756 | +returned if the given name already exists. The definition is in the |
| 757 | +form of an XPath expression which parses the XML returned by |
| 758 | +running \fBlshw\fP on the node. |
| 759 | +.UNINDENT |
| 760 | +.UNINDENT |
| 761 | +.sp |
| 762 | +Example: |
| 763 | +Adding a tag to all nodes which have an Intel GPU: |
| 764 | +.sp |
| 765 | +.nf |
| 766 | +.ft C |
| 767 | +$ maas\-cli maas tags new name=\(aqintel\-gpu\(aq \e |
| 768 | + comment=\(aqMachines which have an Intel display driver\(aq \e |
| 769 | + definition=\(aqcontains(//node[@id="display"]/vendor, "Intel") |
| 770 | +.ft P |
| 771 | +.fi |
| 772 | +.SH UNUSED COMMANDS |
| 773 | +.sp |
| 774 | +Because the \fBmaas\-cli\fP command exposes all of the API, it also lists |
| 775 | +some command options which are not really intended for end users, such |
| 776 | +as the "file" and "boot\-images" options. |
| 777 | +.SH FURTHER DOCUMENTATION |
| 778 | +.sp |
| 779 | +For more documentation of MAAS, please see \fI\%https://maas.ubuntu.com/docs\fP |
| 780 | +.SH SEE ALSO |
| 781 | +.sp |
| 782 | +\fImaas\fP |
| 783 | +.SH AUTHOR |
| 784 | +Canonical 2012 |
| 785 | +.SH COPYRIGHT |
| 786 | +2012, MAAS Developers |
| 787 | +.\" Generated by docutils manpage writer. |
| 788 | +.\" |
| 789 | +. |
| 790 | |
| 791 | === added file 'man/maas-import-pxe-files.8' |
| 792 | --- man/maas-import-pxe-files.8 1970-01-01 00:00:00 +0000 |
| 793 | +++ man/maas-import-pxe-files.8 2012-11-22 23:43:21 +0000 |
| 794 | @@ -0,0 +1,81 @@ |
| 795 | +.TH "MAAS-IMPORT-PXE-FILES" "8" "November 22, 2012" "12.10" "MAAS" |
| 796 | +.SH NAME |
| 797 | +maas-import-pxe-files \- MAAS helper script |
| 798 | +. |
| 799 | +.nr rst2man-indent-level 0 |
| 800 | +. |
| 801 | +.de1 rstReportMargin |
| 802 | +\\$1 \\n[an-margin] |
| 803 | +level \\n[rst2man-indent-level] |
| 804 | +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 805 | +- |
| 806 | +\\n[rst2man-indent0] |
| 807 | +\\n[rst2man-indent1] |
| 808 | +\\n[rst2man-indent2] |
| 809 | +.. |
| 810 | +.de1 INDENT |
| 811 | +.\" .rstReportMargin pre: |
| 812 | +. RS \\$1 |
| 813 | +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 814 | +. nr rst2man-indent-level +1 |
| 815 | +.\" .rstReportMargin post: |
| 816 | +.. |
| 817 | +.de UNINDENT |
| 818 | +. RE |
| 819 | +.\" indent \\n[an-margin] |
| 820 | +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 821 | +.nr rst2man-indent-level -1 |
| 822 | +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 823 | +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 824 | +.. |
| 825 | +.\" Man page generated from reStructeredText. |
| 826 | +. |
| 827 | +.SH USAGE |
| 828 | +.sp |
| 829 | +maas\-import\-pxe\-files [\-h, \-\-help] |
| 830 | +.SH DESCRIPTION |
| 831 | +.sp |
| 832 | +This is a helper script for the MAAS software. It downloads Ubuntu |
| 833 | +images and organises them for use by MAAS in commissioning nodes. |
| 834 | +The script is usually run regularly by a cron task, though it |
| 835 | +needs to be run manually the first time a MAAS system is installed. |
| 836 | +Images that are already in place are kept unchanged, unless the |
| 837 | +version in the archive has since been updated. |
| 838 | +.sp |
| 839 | +The script reads a configuration file /etc/maas/import_pxe_files in |
| 840 | +order to determine: |
| 841 | +.sp |
| 842 | +\fBARCHIVE:\fP |
| 843 | +Location of the Ubuntu download archive |
| 844 | +.sp |
| 845 | +\fBRELEASES:\fP |
| 846 | +Ubuntu releases to download |
| 847 | +.sp |
| 848 | +\fBARCHES:\fP |
| 849 | +Architectures for which images should be downloaded |
| 850 | +.sp |
| 851 | +To support development setups that run directly from a code branch, |
| 852 | +it will also look for /etc/maas/import_pxe_files relative to the |
| 853 | +current directory. |
| 854 | +.sp |
| 855 | +The script uses \fIwget\fP to download the kernel and initrd image for |
| 856 | +each architecture in ARCHES and each release in RELEASES. In addition |
| 857 | +it copies the Intel\-architecture pre\-boot loader \fIpxelinux.0\fP (plus |
| 858 | +some of its modules such as \fIchain.c32\fP) from its installed location in |
| 859 | +/usr/lib/syslinux/. |
| 860 | +.sp |
| 861 | +These images are the minimum that\(aqs required to start installing a node. |
| 862 | +During installation, a node may download its packages over the network. |
| 863 | +.SH FURTHER DOCUMENTATION |
| 864 | +.sp |
| 865 | +For more documentation of MAAS, please see \fI\%https://maas.ubuntu.com/docs\fP |
| 866 | +.SH SEE ALSO |
| 867 | +.sp |
| 868 | +\fImaas\fP, \fImaas\-cli\fP |
| 869 | +.SH AUTHOR |
| 870 | +Canonical 2012 |
| 871 | +.SH COPYRIGHT |
| 872 | +2012, MAAS Developers |
| 873 | +.\" Generated by docutils manpage writer. |
| 874 | +.\" |
| 875 | +. |
| 876 | |
| 877 | === added file 'man/maas.8' |
| 878 | --- man/maas.8 1970-01-01 00:00:00 +0000 |
| 879 | +++ man/maas.8 2012-11-22 23:43:21 +0000 |
| 880 | @@ -0,0 +1,72 @@ |
| 881 | +.TH "MAAS" "8" "November 22, 2012" "12.10" "MAAS" |
| 882 | +.SH NAME |
| 883 | +maas \- MAAS administration tool |
| 884 | +. |
| 885 | +.nr rst2man-indent-level 0 |
| 886 | +. |
| 887 | +.de1 rstReportMargin |
| 888 | +\\$1 \\n[an-margin] |
| 889 | +level \\n[rst2man-indent-level] |
| 890 | +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 891 | +- |
| 892 | +\\n[rst2man-indent0] |
| 893 | +\\n[rst2man-indent1] |
| 894 | +\\n[rst2man-indent2] |
| 895 | +.. |
| 896 | +.de1 INDENT |
| 897 | +.\" .rstReportMargin pre: |
| 898 | +. RS \\$1 |
| 899 | +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 900 | +. nr rst2man-indent-level +1 |
| 901 | +.\" .rstReportMargin post: |
| 902 | +.. |
| 903 | +.de UNINDENT |
| 904 | +. RE |
| 905 | +.\" indent \\n[an-margin] |
| 906 | +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 907 | +.nr rst2man-indent-level -1 |
| 908 | +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 909 | +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 910 | +.. |
| 911 | +.\" Man page generated from reStructeredText. |
| 912 | +. |
| 913 | +.SH USAGE |
| 914 | +.sp |
| 915 | +maas [\-h, \-\-help] createsuperuser | changepassword | shell |
| 916 | +.SH DESCRIPTION |
| 917 | +.sp |
| 918 | +The \fImaas\fP command is part of Canonical\(aqs Metal As A Service software. It is |
| 919 | +derived from and can be used similarly to the \fIdjango\-admin\fP command, and must |
| 920 | +be run with root privileges. |
| 921 | +.sp |
| 922 | +For the end user, there are only three subcommands of interest. |
| 923 | +.INDENT 0.0 |
| 924 | +.TP |
| 925 | +.B \fBcreatesuperuser\fP |
| 926 | +This subcommand is used to create a superuser for the |
| 927 | +MAAS install. The suggested username is "root". This command usually only |
| 928 | +needs to be run when installing MAAS for the first time. |
| 929 | +.TP |
| 930 | +.B \fBchangepassword\fP |
| 931 | +This subcommand is used to change the superuser password |
| 932 | +for the MAAS install. You will be prompted to enter a new password, and then |
| 933 | +enter it once again to verify. |
| 934 | +.TP |
| 935 | +.B \fBshell\fP |
| 936 | +This subcommand may be useful for debugging installed systems. It |
| 937 | +will open a new python shell environment with the correct django environment |
| 938 | +for working with the installed MAAS software. |
| 939 | +.UNINDENT |
| 940 | +.SH FURTHER DOCUMENTATION |
| 941 | +.sp |
| 942 | +For more documentation of MAAS, please see \fI\%https://maas.ubuntu.com/docs\fP |
| 943 | +.SH SEE ALSO |
| 944 | +.sp |
| 945 | +\fImaas\-cli\fP |
| 946 | +.SH AUTHOR |
| 947 | +Canonical 2012 |
| 948 | +.SH COPYRIGHT |
| 949 | +2012, MAAS Developers |
| 950 | +.\" Generated by docutils manpage writer. |
| 951 | +.\" |
| 952 | +. |


FWIW I'd be happy with a test that checks consistency between source and generated page so it forces users to regenerate them before landing. This is probably much simpler than worrying about building them automatically.