Merge lp:~evilnick/maas/docs-preeseed+man-page-fixes into lp:~maas-committers/maas/trunk

Proposed by Nick Veitch
Status: Rejected
Rejected by: Nick Veitch
Proposed branch: lp:~evilnick/maas/docs-preeseed+man-page-fixes
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 1559 lines (+876/-220)
4 files modified
INSTALL.txt (+104/-121)
docs/configure.rst (+137/-8)
docs/maascli.rst (+92/-83)
docs/man/maas-cli.8.rst (+543/-8)
To merge this branch: bzr merge lp:~evilnick/maas/docs-preeseed+man-page-fixes
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+135891@code.launchpad.net

Commit message

added preseed docs and fixed man page links

Description of the change

added section on editing preseed
fixed man page/html clash for now

To post a comment you must log in.

Unmerged revisions

1369. By Nick Veitch

new preseed, man page fixes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'INSTALL.txt'
2--- INSTALL.txt 2012-11-20 21:46:37 +0000
3+++ INSTALL.txt 2012-11-23 13:00:36 +0000
4@@ -1,18 +1,17 @@
5 .. -*- mode: rst -*-
6
7-
8+
9 Installing MAAS
10 ===============
11
12 There are two main ways to install MAAS
13
14- * :ref:`From Ubuntu's package archive on an existing Ubuntu
15- install. <pkg-install>`
16- * :ref:`As a fresh install from Ubuntu Server install
17- media. <disc-install>`
18+ * :ref:`From Ubuntu's package archive on an existing Ubuntu install. <pkg-install>`
19+ * :ref:`As a fresh install from Ubuntu Server install media. <disc-install>`
20+
21
22-If you are interested in testing the latest development version you
23-can also check out the very latest source and build MAAS yourself.
24+If you are interested in testing the latest development version you can
25+also check out the very latest source and build MAAS yourself.
26
27
28 .. _pkg-install:
29@@ -21,33 +20,29 @@
30 --------------------------------
31
32 Installing MAAS from packages is thankfully straightforward. There are
33-actually several packages that go into making up a working MAAS
34-install, but for convenience, many of these have been gathered into a
35-virtual package called 'maas' which will install the necessary
36-components for a 'seed cloud', that is a single server that will
37-directly control a group of nodes. The main packages are:
38+actually several packages that go into making up a working MAAS install,
39+but for convenience, many of these have been gathered into a virtual package
40+called 'maas' which will install the necessary components for a 'seed cloud',
41+that is a single server that will directly control a group of nodes. The main packages are:
42
43- * ``maas`` - seed cloud setup, which includes both the region
44- controller and the cluster controller below.
45+ * ``maas`` - seed cloud setup, which includes both the region controller and
46+the cluster controller below.
47 * ``maas-region-controller`` - includes the web UI, API and database.
48- * ``maas-cluster-controller`` - controls a group ("cluster") of nodes
49- including DHCP management.
50+ * ``maas-cluster-controller`` - controls a group ("cluster") of nodes including DHCP management.
51 * ``maas-dhcp``/``maas-dns`` - required when managing dhcp/dns.
52
53-If you need to separate these services or want to deploy an additional
54-cluster controller, you should install the corresponding packages
55-individually (see :ref:`the description of a typical setup <setup>`
56-for more background on how a typical hardware setup might be
57-arranged).
58-
59-There are two suggested additional packages 'maas-dhcp' and
60-'maas-dns'. These set up MAAS-controlled DHCP and DNS services which
61-greatly simplify deployment if you are running a typical setup where
62-the MAAS controller can run the network (Note: These **must** be
63-installed if you later set the options in the web interface to have
64-MAAS manage DHCP/DNS). If you need to integrate your MAAS setup under
65-an existing DHCP setup, see :ref:`manual-dhcp`
66-
67+If you need to separate these services or want to deploy an additional cluster
68+controller, you should install the corresponding packages individually
69+(see :ref:`the description of a typical setup <setup>` for more background
70+on how a typical hardware setup might be arranged).
71+
72+There are two suggested additional packages 'maas-dhcp' and 'maas-dns'. These
73+set up MAAS-controlled DHCP and DNS services which greatly simplify deployment
74+if you are running a typical setup where the MAAS controller can run the
75+network (Note: These **must** be installed if you later set the options in
76+the web interface to have MAAS manage DHCP/DNS). If you need to integrate your
77+MAAS setup under an existing DHCP setup, see :ref:`manual-dhcp`
78+
79
80 Install packages
81 ^^^^^^^^^^^^^^^^
82@@ -56,118 +51,110 @@
83
84 $ sudo apt-get install maas maas-dhcp maas-dns
85
86-You will see a list of packages and a confirmation message to
87-proceed. The exact list will obviously depend on what you already have
88-installed on your server, but expect to add about 200MB of files.
89+You will see a list of packages and a confirmation message to proceed. The
90+exact list will obviously depend on what you already have installed on your
91+server, but expect to add about 200MB of files.
92
93-The configuration for the MAAS controller will automatically run and
94-pop up this config screen:
95+The configuration for the MAAS controller will automatically run and pop up
96+this config screen:
97
98 .. image:: media/install_cluster-config.*
99
100-Here you will need to enter the hostname for where the region
101-controller can be contacted. In many scenarios, you may be running the
102-region controller (i.e. the web and API interface) from a different
103-network address, for example where a server has several network
104-interfaces.
105+Here you will need to enter the hostname for where the region controller can
106+be contacted. In many scenarios, you may be running the region controller
107+(i.e. the web and API interface) from a different network address, for example
108+where a server has several network interfaces.
109
110-Once the configuration scripts have run you should see this message
111-telling you that the system is ready to use:
112+Once the configuration scripts have run you should see this message telling
113+you that the system is ready to use:
114
115 .. image:: media/install_controller-config.*
116
117-The web server is started last, so you have to accept this message
118-before the service is run and you can access the Web interface. Then
119-there are just a few more setup steps :ref:`post_install`
120-
121+The web server is started last, so you have to accept this message before the service is run and you can access the Web interface. Then there are just a few
122+more setup steps :ref:`post_install`
123
124 .. _disc-install:
125
126 Installing MAAS from Ubuntu Server boot media
127 ---------------------------------------------
128
129-If you are installing MAAS as part of a fresh install it is easiest to
130-choose the "Multiple Server install with MAAS" option from the
131-installer and have pretty much everything set up for you. Boot from
132-the Ubuntu Server media and you will be greeted with the usual
133+If you are installing MAAS as part of a fresh install it is easiest to choose
134+the "Multiple Server install with MAAS" option from the installer and have
135+pretty much everything set up for you.
136+Boot from the Ubuntu Server media and you will be greeted with the usual
137 language selection screen:
138
139 .. image:: media/install_01.*
140
141-On the next screen, you will see there is an entry in the menu called
142-"Multiple server install with MAAS". Use the cursor keys to select
143-this and then press Enter.
144+On the next screen, you will see there is an entry in the menu called "Multiple
145+server install with MAAS". Use the cursor keys to select this and then press
146+Enter.
147
148 .. image:: media/install_02.*
149
150-The installer then runs through the usual language and keyboard
151-options. Make your selections using Tab/Cursor keys/Enter to proceed
152-through the install. The installer will then load various drivers,
153-which may take a moment or two.
154+The installer then runs through the usual language and keyboard options. Make
155+your selections using Tab/Cursor keys/Enter to proceed through the install.
156+The installer will then load various drivers, which may take a moment or two.
157
158 .. image:: media/install_03.*
159
160-The next screen asks for the hostname for this server. Choose
161-something appropriate for your network.
162+The next screen asks for the hostname for this server. Choose something
163+appropriate for your network.
164+
165
166 .. image:: media/install_04.*
167
168-Finally we get to the MAAS part! Here there are just two options. We
169-want to "Create a new MAAS on this server" so go ahead and choose that
170-one.
171+Finally we get to the MAAS part! Here there are just two options. We want to
172+"Create a new MAAS on this server" so go ahead and choose that one.
173
174 .. image:: media/install_05.*
175
176-The install now continues as usual. Next you will be prompted to enter
177-a username. This will be the admin user for the actual server that
178-MAAS will be running on (not the same as the MAAS admin user!)
179+The install now continues as usual. Next you will be prompted to enter a
180+username. This will be the admin user for the actual server that MAAS will
181+be running on (not the same as the MAAS admin user!)
182
183 .. image:: media/install_06.*
184
185-As usual you will have the chance to encrypt your home
186-directory. Continue to make selections based on whatever settings suit
187-your usage.
188+As usual you will have the chance to encrypt your home directory. Continue
189+to make selections based on whatever settings suit your usage.
190
191 .. image:: media/install_07.*
192
193-After making selections and partitioning storage, the system software
194-will start to be installed. This part should only take a few minutes.
195+After making selections and partitioning storage, the system software will
196+start to be installed. This part should only take a few minutes.
197
198 .. image:: media/install_09.*
199
200-Various packages will now be configured, including the package manager
201-and update manager. It is important to set these up appropriately so
202-you will receive timely updates of the MAAS server software, as well
203-as other essential services that may run on this server.
204+Various packages will now be configured, including the package manager and
205+update manager. It is important to set these up appropriately so you will
206+receive timely updates of the MAAS server software, as well as other essential services that may run on this server.
207
208 .. image:: media/install_10.*
209
210-The configuration for MAAS will ask you to configure the host address
211-of the server. This should be the IP address you will use to connect
212-to the server (you may have additional interfaces e.g. to run node
213-subnets)
214+The configuration for MAAS will ask you to configure the host address of the
215+server. This should be the IP address you will use to connect to the server
216+(you may have additional interfaces e.g. to run node subnets)
217
218 .. image:: media/install_cluster-config.*
219
220-The next screen will confirm the web address that will be used to the
221-web interface.
222+The next screen will confirm the web address that will be used to the web
223+interface.
224
225 .. image:: media/install_controller-config.*
226
227-After configuring any other packages the installer will finally come
228-to and end. At this point you should eject the boot media.
229+After configuring any other packages the installer will finally come to and
230+end. At this point you should eject the boot media.
231
232 .. image:: media/install_14.*
233
234-After restarting, you should be able to login to the new server with
235-the information you supplied during the install. The MAAS software
236-will run automatically.
237+After restarting, you should be able to login to the new server with the
238+information you supplied during the install. The MAAS software will run automatically.
239+
240
241 .. image:: media/install_15.*
242
243-**NOTE:** The maas-dhcp and maas-dns packages are not installed by
244-default. If you want to have MAAS run DHCP and DNS services, you
245-should install these packages::
246+
247+**NOTE:** The maas-dhcp and maas-dns packages are not installed by default. If you want to have MAAS run DHCP and DNS services, you should install these packages::
248
249 $ sudo apt-get install maas-dhcp maas-dns
250
251@@ -175,19 +162,15 @@
252
253 .. _post_install:
254
255-
256 Post-Install tasks
257 ==================
258-
259-If you now use a web browser to connect to the region controller, you
260-should see that MAAS is running, but there will also be some errors on
261-the screen:
262+If you now use a web browser to connect to the region controller, you should
263+see that MAAS is running, but there will also be some errors on the screen:
264
265 .. image:: media/install_web-init.*
266
267-The on screen messages will tell you that there are no boot images
268-present, and that you can't login because there is no admin user.
269-
270+The on screen messages will tell you that there are no boot images present,
271+and that you can't login because there is no admin user.
272
273 Create a superuser account
274 --------------------------
275@@ -197,37 +180,35 @@
276
277 $ sudo maas createsuperuser
278
279-Follow the prompts to create the account which you will need to login
280-to the web interface. Unless you have a special need, it is best to
281-accept the default login name of `root`, as it is rather annoying if
282-you forget the username (although you can simply run this command
283-again to create a new superuser).
284+Follow the prompts to create the account which you will need to
285+login to the web interface. Unless you have a special need, it is best to
286+accept the default login name of `root`, as it is rather annoying if you
287+forget the username (although you can simply run this command again to create
288+a new superuser).
289
290
291 Import the boot images
292 ----------------------
293
294 MAAS will check for and download new Ubuntu images once a week.
295-However, you'll need to download them manually the first time. To do
296-this you will need to connect to the MAAS API using the maas-cli
297-tool. (see :ref:`Logging in <api-key>` for details). Then you need to
298-run the command::
299-
300- $ maas-cli maas node-groups import-boot-images
301-
302-(substitute in a different profile name for 'maas' if you have called
303-yours something else) This will initiate downloading the required
304-image files. Note that this may take some time depending on your
305-network connection.
306+However, you'll need to download them manually the first time::
307+
308+ $ sudo maas-import-pxe-files
309+
310+If you are using an HTTP proxy, bear in mind that the "sudo" will not
311+pass your http_proxy environment variable on to the script. If that is
312+a problem, pass it on explicitly::
313+
314+ $ sudo http_proxy=$http_proxy maas-import-pxe-files
315
316
317 Login to the server
318 -------------------
319
320-To check that everything is working properly, you should try and login
321-to the server now. Both the error messages should have gone (it can
322-take a few minutes for the boot image files to register) and you can
323-see that there are currently 0 nodes attached to this controller.
324+To check that everything is working properly, you should try and login to
325+the server now. Both the error messages should have gone (it can take a
326+few minutes for the boot image files to register) and you can see that
327+there are currently 0 nodes attached to this controller.
328
329 .. image:: media/install-login.*
330
331@@ -235,9 +216,11 @@
332 Configure DHCP
333 --------------
334
335-If you are using MAAS to control DHCP, you need to set this via the
336-web interface. However, if you are manually configuring a DHCP
337-server, you should take a look at :ref:`manual-dhcp`
338+If you are using MAAS to control DHCP, you need to configure this using the
339+commandline interface, first by :ref:`logging on to the server API <api-key>`
340+and then :ref:`setting up the interface <cli-dhcp>`
341+However, if you are manually configuring a DHCP server, you should take a
342+look at :ref:`manual-dhcp`
343
344-Once everything is set up and running, you are ready to :doc:`start
345-enlisting nodes <nodes>`
346+Once everything is set up and running, you are ready to :doc:`start enlisting
347+nodes <nodes>`
348
349=== modified file 'docs/configure.rst'
350--- docs/configure.rst 2012-11-22 03:18:35 +0000
351+++ docs/configure.rst 2012-11-23 13:00:36 +0000
352@@ -1,22 +1,23 @@
353 Additional Configuration
354 ========================
355
356-
357 .. _manual-dhcp:
358
359 Manual DHCP configuration
360 -------------------------
361
362-There are some circumstances under which you may not wish the master
363-MAAS worker to handle DHCP for the network. In these instances, the
364-existing DHCP server for the network will need its configuration
365-altered to allow MAAS to enlist and control nodes automatically.
366+There are some circumstances under which you may not wish the master MAAS
367+worker to handle DHCP for the network. In these instances, the existing DHCP
368+server for the network will need its configuration altered to allow MAAS to
369+enlist and control nodes automatically.
370
371-At the very least the filename should be set to pxelinux.0.
372+At the very least the next-server should point to the MAAS controller host
373+address and the filename should be set to pxelinux.0
374
375 The configuration entry may look something like this::
376
377 subnet 192.168.122.0 netmask 255.255.255.0 {
378+ next-server 192.168.122.136;
379 filename "pxelinux.0";
380 option subnet-mask 255.255.255.0;
381 option broadcast-address 192.168.122.255;
382@@ -24,12 +25,10 @@
383 range dynamic-bootp 192.168.122.5 192.168.122.135;
384 }
385
386-
387 .. _ssl:
388
389 SSL Support
390 -----------
391-
392 If you want secure access to your MAAS web UI/API, you need to do a few
393 things. First, turn on SSL support in Apache::
394
395@@ -48,3 +47,133 @@
396 the default SSL certificate is insecure. Please generate your own and then
397 edit ``/etc/apache2/conf.d/maas-http.conf`` to set the location of the
398 certificate.
399+
400+
401+Choosing a series to install
402+----------------------------
403+
404+You may have some specific reason to choose a particular version of Ubuntu
405+to install on your nodes, perhaps based around package avaiability,
406+hardware support or some other reason.
407+It is possible to choose a specific series from those available in a
408+number of ways.
409+
410+From the user interface
411+^^^^^^^^^^^^^^^^^^^^^^^
412+
413+For individual nodes it is a straightforward task to select the Ubuntu
414+series to install from the user interface. When either adding a node
415+manually, or on the node page when the node has been automatically
416+discovered but before it is accepted, there is a drop down menu to select
417+the version of Ubuntu you wish to install.
418+
419+.. image:: media/series.*
420+
421+The menu will always list all the currently available series according
422+to which images are available.
423+
424+Using the maas-cli command
425+^^^^^^^^^^^^^^^^^^^^^^^^^^
426+
427+It is also possible to select a series using the maas-cli command. This
428+can be done on a per node basis with::
429+
430+ $ maas-cli <profile> node update <system_id> distro_series="<value>"
431+
432+Where the string contains one of the valid, available distro series, or
433+is empty for the default value.
434+
435+
436+.. _preseed:
437+
438+Altering the Preseed file
439+-------------------------
440+
441+.. warning::
442+ Do not try to alter the preseed files if you don't have a good
443+ understanding of what you are doing. Altering the installed version
444+ of Ubuntu can prevent MAAS from working as intended, and may have
445+ security and stability consequences.
446+
447+When MAAS commissions a node it installs a version of Ubuntu. The
448+installation is performed using a 'preseed' file, which is
449+effectively a list of answers to the questions you would get were
450+you to run the installer manually.
451+The preseed file used by MAAS is carefully made so that the
452+target node can be brought up and do all the jobs expected of it.
453+However, in exceptional circumstances, you may wish to alter the
454+pressed file to work around some issue.
455+There are actually two preseed files, stored here::
456+
457+ /usr/share/maas/preseeds/generic
458+ /usr/share/maas/preseeds/preseed-master
459+
460+The generic file actually references the preseed-master file, and is
461+used to set conditional parameters based on the type of series and
462+architecture to install as well as to define the minimum set of install
463+packages and to tidy up the PXE boot process if that has been used for
464+the node. Unless you have a specific need to change where install
465+packages come from, you should not need to edit this file.
466+
467+For the more usual sorts of things you may wish to change, you should
468+edit the preseed-master file. For example, depending on your network
469+you may wish to change the clock settings::
470+
471+ # Local clock (set to UTC and use ntp)
472+ d-i clock-setup/utc boolean true
473+ d-i clock-setup/ntp boolean true
474+ d-i clock-setup/ntp-server string ntp.ubuntu.com
475+
476+Having consistent clocks is very important to the working of your MAAS
477+system overall. If your nodes however cannot freely access the internet,
478+the supplied ntp server is not going to be very useful, and you may
479+find it better to run an ntp service on the MAAS controller and substitute
480+`ntp.ubuntu.com` in the last line for something else.
481+
482+One thing you may wish to alter in the preseed file is the disk
483+partitioning. This is a simple recipe that creates a swap partition and
484+uses the rest of the disk for one large root filesystem::
485+
486+ partman-auto/text/atomic_scheme ::
487+
488+ 500 10000 1000000 ext3
489+ $primary{ }
490+ $bootable{ }
491+ method{ format }
492+ format{ }
493+ use_filesystem{ }
494+ filesystem{ ext3 }
495+ mountpoint{ / } .
496+
497+ 64 512 300% linux-swap
498+ method{ swap }
499+ format{ } .
500+
501+
502+Here the root partition must be at least 500 mb, and has effectively no
503+maximum size. The swap partition ranges from 64 mb to 3 times the system's
504+ram.
505+Adding `$bootable{ }` to make the partition bootable, and $primary{ }
506+marks it as the primary partition. The other specifiers used are:
507+
508+*method{ format }*
509+ Used to make the partition be formatted. For swap partitions,
510+ change it to "swap". To create a new partition but do not
511+ format it, change "format" to "keep" (such a partition can be
512+ used to reserve for future use some disk space).
513+*format{ }*
514+ Also needed to make the partition be formatted.
515+*use_filesystem{ }*
516+ Specifies that the partition has a filesystem on it.
517+*filesystem{ ext3 }*
518+ Specifies the filesystem to put on the partition.
519+*mountpoint{ / }*
520+ Where to mount the partition.
521+
522+For more information on preseed option, you should refer to
523+`the official Ubuntu documentation <https://help.ubuntu.com/12.04/installation-guide/i386/preseed-contents.html>`_
524+
525+.. note::
526+ Future versions of MAAS are likely to replace this type of automatic
527+ installation with a different installer.
528+
529
530=== modified file 'docs/maascli.rst'
531--- docs/maascli.rst 2012-11-20 21:46:37 +0000
532+++ docs/maascli.rst 2012-11-23 13:00:36 +0000
533@@ -1,9 +1,9 @@
534+
535 As well as the web interface, many tasks can be performed by accessing
536 the MAAS API directly through the maas-cli command. This section
537 details how to login with this tool and perform some common
538 operations.
539
540-
541 .. _api-key:
542
543 Logging in
544@@ -19,7 +19,7 @@
545 .. only:: html
546 .. image:: media/maascli-prefs.*
547
548-A new page will load...
549+A new page will load...
550
551 .. only:: html
552 .. image:: media/maascli-key.*
553@@ -31,21 +31,21 @@
554
555 $ maas-cli login <profile-name> <hostname> <key>
556
557-The profile created is an easy way of associating your credentials
558-with any subsequent call to the API. So an example login might look
559-like this::
560+The profile created is an easy way of associating your credentials with any
561+subsequent call to the API. So an example login might look like this::
562
563 $ maas-cli login maas http://10.98.0.13/MAAS/api/1.0 AWSCRMzqMNy:jjk...5e1FenoP82Qm5te2
564
565-which creates the profile 'maas' and registers it with the given key
566-at the specified API endpoint. If you omit the credentials, they will
567-be prompted for in the console. It is also possible to use a hyphen,
568-'-' in place of the credentials. In this case a single line will be
569-read from stdin, stripped of any whitespace and used as the
570-credentials, which can be useful if you are devolping scripts for
571-specific tasks. If an empty string is passed instead of the
572-credentials, the profile will be logged in anonymously (and
573-consequently some of the API calls will not be available)
574+which creates the profile 'maas' and registers it with the given key at the
575+specified API endpoint.
576+If you omit the credentials, they will be prompted for in the console. It is
577+also possible to use a hyphen, '-' in place of the credentials. In this case a
578+single line will be read from stdin, stripped of any whitespace and used as the
579+credentials, which can be useful if you are devolping scripts for specific
580+tasks.
581+If an empty string is passed instead of the credentials, the profile will be
582+logged in anonymously (and consequently some of the API calls will not be
583+available)
584
585
586 maas-cli commands
587@@ -77,7 +77,7 @@
588 Logs in to the MAAS controller API at the given URL, using the key
589 provided and associates this connection with the given profile name.
590
591-:samp:`logout <profile>`
592+:samp:`logout <profile>`
593
594 Logs out from the given profile, flushing the stored credentials.
595
596@@ -108,12 +108,12 @@
597 :samp:`-d, --debug`
598
599 Displays debug information listing the API responses.
600-
601+
602 :samp:`-h, --help`
603
604 Display usage information.
605
606-:samp:`-k, --insecure`
607+:samp:`-k, --insecure`
608
609 Disables the SSL certificate check.
610
611@@ -127,6 +127,8 @@
612 Removes the given key from the list of authorisation tokens.
613
614
615+
616+
617 .. boot-images - not useful in user context
618 .. ^^^^^^^^^^^
619
620@@ -157,50 +159,54 @@
621 Releases the node given by *<system_id>*
622
623 :samp:`start <system_id>`
624-
625+
626 Powers up the node identified by *<system_id>* (where MAAS has
627 information for power management for this node).
628
629 :samp:`stop <system_id>`
630-
631+
632 Powers off the node identified by *<system_id>* (where MAAS has
633 information for power management for this node).
634
635 :samp:`delete <system_id>`
636-
637+
638 Removes the given node from the MAAS database.
639
640 :samp:`read <system_id>`
641-
642+
643 Returns all the current known information about the node specified
644 by *<system_id>*
645
646 :samp:`update <system_id> [parameters...]`
647-
648+
649 Used to change or set specific values for the node. The valid
650 parameters are listed below::
651
652 hostname=<value>
653 The new hostname for this node.
654
655- architecture=<value>
656+ architecture=<value>
657 Sets the architecture type, where <value>
658 is a string containing a valid architecture type,
659 e.g. "i386/generic"
660
661- power_type=<value>
662- Apply the given dotted decimal value as the broadcast IP address
663- for this subnet.
664-
665- power_parameters_{param1}... =<value>
666- Set the given power parameters. Note that the valid options for these
667+ distro_series=<value>
668+ Sets the series of Ubuntu to use.
669+
670+ power_type=<value>
671+ Sets the type of power management used on the node, e.g. "ipmi" or
672+ "virsh".
673+
674+ power_parameters_{param1}... =<value>
675+ Set the given power parameters. Note that the valid options for these
676 depend on the power type chosen.
677
678- power_parameters_skip_check 'true' | 'false'
679- Whether to sanity check the supplied parameters against this node's
680+ power_parameters_skip_check 'true' | 'false'
681+ Whether to sanity check the supplied parameters against this node's
682 declared power type. The default is 'false'.
683
684
685+
686 .. _cli-power:
687
688 Example: Setting the power parameters for an ipmi enabled node::
689@@ -212,6 +218,8 @@
690 power_parameters_power_pass=ubuntu;
691
692
693+
694+
695 nodes
696 ^^^^^
697
698@@ -291,6 +299,7 @@
699 $ maas-cli maas nodes list architecture="i386/generic"
700
701
702+
703 node-groups
704 ^^^^^^^^^^^
705 Usage: maas-cli <profile> node-groups [-d --debug] [-h --help] [-k
706@@ -301,7 +310,7 @@
707 :samp:`-d, --debug`
708
709 Displays debug information listing the API responses.
710-
711+
712 :samp:`-h, --help`
713
714 Display usage information.
715@@ -311,7 +320,7 @@
716 Disables the SSL certificate check.
717
718 :samp:`register uuid=<value> name=<value> interfaces=<json_string>`
719-
720+
721 Registers a new node group with the given name and uuid. The
722 interfaces parameter must be supplied in the form of a JSON string
723 comprising the key/value data for the interface to be used, for
724@@ -322,7 +331,7 @@
725
726 :samp:`list`
727
728- Returns a JSON list of all currently defined node groups.
729+ Returns a JSON list of all currently defined node groups.
730
731 :samp:`refresh_workers`
732
733@@ -333,7 +342,7 @@
734 nodes.
735
736 :samp:`accept <uuid>`
737-
738+
739 Accepts a node-group or number of nodegroups indicated by the
740 supplied UUID
741
742@@ -343,60 +352,62 @@
743 supplied UUID
744
745
746+
747 node-group-interface
748 ^^^^^^^^^^^^^^^^^^^^
749-For managing the interfaces. See also :ref:`node-group-interfaces`
750+For managing the interfaces. See also
751+:ref:`node_group_interfaces <node_group_interfaces>`
752
753-Usage: maas-cli *<profile>* node-group-interfaces [-d --debug] [-h
754+Usage: maas-cli *<profile>* node-group-interface [-d --debug] [-h
755 --help] [-k --insecure] read | update | delete [parameters...]
756
757 ..program:: maas-cli node-group-interface
758
759 :samp:`read <uuid> <interface>`
760-
761+
762 Returns the current settings for the given UUID and interface
763
764 :samp:`update [parameters]`
765-
766+
767 Changes the settings for the interface according to the given
768 parameters::
769
770 management= 0 | 1 | 2
771- The service to be managed on the interface ( 0= none, 1=DHCP, 2=DHCP
772+ The service to be managed on the interface ( 0= none, 1=DHCP, 2=DHCP
773 and DNS).
774
775 subnet_mask=<value>
776 Apply the given dotted decimal value as the subnet mask.
777
778 broadcast_ip=<value>
779- Apply the given dotted decimal value as the broadcast IP address for
780+ Apply the given dotted decimal value as the broadcast IP address for
781 this subnet.
782
783 router_ip=<value>
784- Apply the given dotted decimal value as the default router address
785+ Apply the given dotted decimal value as the default router address
786 for this subnet.
787
788 ip_range_low=<value>
789 The lowest value of IP address to allocate via DHCP
790
791 ip_range_high=<value>
792- The highest value of IP address to allocate via DHCP
793+ The highest value of IP address to allocate via DHCP
794
795 :samp:`delete <uuid> <interface>`
796
797 Removes the entry for the given UUID and interface.
798-
799+
800 .. _cli-dhcp:
801
802 Example:
803 Configuring DHCP and DNS.
804
805-To enable MAAS to manage DHCP and DNS, it needs to be supplied with the relevant
806+To enable MAAS to manage DHCP and DNS, it needs to be supplied with the relevant
807 interface information. To do this we need to first determine the UUID of the
808 node group affected::
809
810 $ uuid=$(maas-cli <profile> node-groups list | grep uuid | cut -d\" -f4)
811-
812+
813 Once we have the UUID we can use this to update the node-group-interface for
814 that nodegroup, and pass it the relevant interface details::
815
816@@ -407,13 +418,12 @@
817 broadcast_ip=192.168.123.255 \
818 router_ip=192.168.123.1 \
819
820-Replacing the example values with those required for this network. The
821-only non-obvious parameter is 'management' which takes the values 0
822-(no management), 1 (manage DHCP) and 2 (manage DHCP and DNS).
823+Replacing the example values with those required for this network. The only
824+non-obvious parameter is 'management' which takes the values 0 (no management), 1
825+(manage DHCP) and 2 (manage DHCP and DNS).
826
827
828 .. _node-group-interfaces:
829-
830 node-group-interfaces
831 ^^^^^^^^^^^^^^^^^^^^^
832
833@@ -428,7 +438,7 @@
834 :samp:`-d, --debug`
835
836 Displays debug information listing the API responses.
837-
838+
839 :samp:`-h, --help`
840
841 Display usage information.
842@@ -442,24 +452,25 @@
843 Lists the current stored configurations for the given identifier
844 <label> in a key:value format which should be easy to decipher.
845
846+
847 :samp:`new <label> ip=<value> interface=<if_device> [parameters...]`
848-
849+
850 Creates a new interface group. The required parameters are the IP
851 address and the network interface this appies to (e.g. eth0). In
852 order to do anything useful, further parameters are required::
853
854- management= 0 | 1 | 2
855+ management= 0 | 1 | 2
856 The service to be managed on the interface
857 ( 0= none, 1=DHCP, 2=DHCP and DNS).
858
859 subnet_mask=<value>
860 Apply the given dotted decimal value as the subnet mask.
861
862- broadcast_ip=<value>
863+ broadcast_ip=<value>
864 Apply the given dotted decimal value as the
865 broadcast IP address for this subnet.
866
867- router_ip=<value>
868+ router_ip=<value>
869 Apply the given dotted decimal value as the
870 default router address for this subnet.
871
872@@ -470,16 +481,18 @@
873 The highest value of IP address to allocate via DHCP
874
875
876-tag
877+
878+
879+tag
880 ^^^
881
882 Usage: maas-cli <profile> tag read | update-nodes | rebuild | update |
883- nodes | delete
884+ nodes | delete
885
886 .. program:: maas-cli tag
887
888 :samp:`read <tag_name>`
889-
890+
891 Returns information on the tag specified by <name>
892
893 :samp:`update-nodes <tag_name> [add=<system_id>] [remove=<system_id>] [nodegroup=<system_id>]`
894@@ -492,10 +505,10 @@
895
896 :samp:`rebuild`
897
898- Triggers a rebuild of the tag to node mapping.
899+ Triggers a rebuild of the tag to node mapping.
900
901 :samp:`update <tag_name> [name=<value>] | [comment=<value>]|[definition=<value>]`
902-
903+
904 Updates the tag identified by tag_name. Any or all of name,comment
905 and definition may be supplied as parameters. If no parameters are
906 supplied, this command returns the current values.
907@@ -508,17 +521,12 @@
908
909 Deletes the given tag.
910
911-
912-tags
913-^^^^
914-
915-Tags are a really useful way of identifying nodes with particular
916-characteristics.
917-
918-.. only:: html
919-
920- For more information on how to use them effectively, please see
921- :ref:`deploy-tags`
922+tags
923+^^^^
924+Tags are a really useful way of identifying nodes with particular
925+characteristics.
926+
927+.. only:: html For more information on how to use them effectively, please see :ref:`deploy-tags`
928
929 Usage: maas-cli <profile> tag [-d --debug] [-h --help] [-k
930 --insecure] list | new
931@@ -528,38 +536,39 @@
932 :samp:`-d, --debug`
933
934 Displays debug information listing the API responses.
935-
936+
937 :samp:`-h, --help`
938
939 Display usage information.
940
941-:samp:`-k, --insecure`
942+:samp:`-k, --insecure`
943
944 Disables the SSL certificate check.
945
946 :samp:`list`
947-
948+
949 Returns a JSON object listing all the current tags known by the MAAS server
950
951 :samp:`create name=<value> definition=<value> [comment=<value>]`
952
953 Creates a new tag with the given name and definition. A comment is
954 optional. Names must be unique, obviously - an error will be
955- returned if the given name already exists. The definition is in the
956- form of an XPath expression which parses the XML returned by
957- running ``lshw`` on the node.
958-
959+ returned if the given name already exists. The definition is in the form of
960+ an XPath expression which parses the XML returned by running ``lshw`` on the
961+ node.
962+
963 Example:
964 Adding a tag to all nodes which have an Intel GPU::
965
966 $ maas-cli maas tags new name='intel-gpu' \
967 comment='Machines which have an Intel display driver' \
968 definition='contains(//node[@id="display"]/vendor, "Intel")
969-
970-
971-unused commands
972-^^^^^^^^^^^^^^^
973-
974+
975+
976+unused commands
977+^^^^^^^^^^^^^^^
978 Because the ``maas-cli`` command exposes all of the API, it also lists
979 some command options which are not really intended for end users, such
980 as the "file" and "boot-images" options.
981+
982+
983
984=== modified file 'docs/man/maas-cli.8.rst'
985--- docs/man/maas-cli.8.rst 2012-11-20 21:46:37 +0000
986+++ docs/man/maas-cli.8.rst 2012-11-23 13:00:36 +0000
987@@ -1,29 +1,564 @@
988+
989 maas-cli
990 --------
991
992-
993 Usage
994 ^^^^^
995
996 $ maas-cli <profile> <command> [parameters]
997-
998+
999 The available commands are dependent on the API you are connecting to and the
1000-profile you use. The currently available options are explained below.
1001+profile you use. The currently available options are explained below.
1002
1003
1004 Description
1005 ^^^^^^^^^^^
1006
1007-.. include:: ../maascli.rst
1008-
1009+As well as the web interface, many tasks can be performed by accessing
1010+the MAAS API directly through the maas-cli command. This section
1011+details how to login with this tool and perform some common
1012+operations.
1013+
1014+
1015+Logging in
1016+----------
1017+
1018+Before the API will accept any commands from maas-cli, you must first
1019+login. To do this, you need the API key which can be found in the user
1020+interface.
1021+
1022+Login to the web interface on your MAAS. Click on the username in the
1023+top right corner and select 'Preferences' from the menu which appears.
1024+
1025+The very first item is a list of MAAS keys. One will have already been
1026+generated when the system was installed. It's easiest to just select
1027+and copy the key (it's quite long!) and then paste it into the
1028+commandline. The format of the login command is::
1029+
1030+ $ maas-cli login <profile-name> <hostname> <key>
1031+
1032+The profile created is an easy way of associating your credentials with any
1033+subsequent call to the API. So an example login might look like this::
1034+
1035+$ maas-cli login maas http://10.98.0.13/MAAS/api/1.0 AWSCRMzqMNy:jjk...5e1FenoP82Qm5te2
1036+
1037+which creates the profile 'maas' and registers it with the given key at the
1038+specified API endpoint.
1039+If you omit the credentials, they will be prompted for in the console. It is
1040+also possible to use a hyphen, '-' in place of the credentials. In this case a
1041+single line will be read from stdin, stripped of any whitespace and used as the
1042+credentials, which can be useful if you are devolping scripts for specific
1043+tasks.
1044+If an empty string is passed instead of the credentials, the profile will be
1045+logged in anonymously (and consequently some of the API calls will not be
1046+available)
1047+
1048+
1049+maas-cli commands
1050+-----------------
1051+
1052+The ``maas-cli`` command exposes the whole API, so you can do anything
1053+you actually *can* do with MAAS using this command. Unsurprisingly,
1054+this leaves us with a vast number of options.
1055+
1056+The main maas-cli commands are:
1057+
1058+.. program:: maas-cli
1059+
1060+:samp:`list`
1061+
1062+ lists the details [name url auth-key] of all the currently logged-in
1063+ profiles.
1064+
1065+:samp:`login <profile> <url> <key>`
1066+
1067+ Logs in to the MAAS controller API at the given URL, using the key
1068+ provided and associates this connection with the given profile name.
1069+
1070+:samp:`logout <profile>`
1071+
1072+ Logs out from the given profile, flushing the stored credentials.
1073+
1074+:samp:`refresh`
1075+
1076+ Refreshes the API descriptions of all the current logged in
1077+ profiles. This may become necessary for example when upgrading the
1078+ maas packages to ensure the command-line options match with the API.
1079+
1080+:samp:`<profile> [command] [options] ...`
1081+
1082+ Using the given profile name instructs ``maas-cli`` to direct the
1083+ subsequent commands and options to the relevant MAAS, which for the
1084+ current API are detailed below...
1085+
1086+
1087+account
1088+^^^^^^^
1089+This command is used for creating and destroying the
1090+MAAS authorisation tokens associated with a profile.
1091+
1092+Usage: maas-cli *<profile>* account [-d --debug] [-h --help]
1093+create-authorisation-token | delete-authorisation-token [token_key=\
1094+*<value>*]
1095+
1096+.. program:: maas-cli account
1097+
1098+:samp:`-d, --debug`
1099+
1100+ Displays debug information listing the API responses.
1101+
1102+:samp:`-h, --help`
1103+
1104+ Display usage information.
1105+
1106+:samp:`-k, --insecure`
1107+
1108+ Disables the SSL certificate check.
1109+
1110+:samp:`create-authorisation-token`
1111+
1112+ Creates a new MAAS authorisation token for the current profile
1113+ which can be used to authenticate connections to the API.
1114+
1115+:samp:`delete-authorisation-token token_key=<value>`
1116+
1117+ Removes the given key from the list of authorisation tokens.
1118+
1119+
1120+node
1121+^^^^
1122+
1123+API calls which operate on individual nodes. With these commands, the
1124+node is always identified by its "system_id" property - a unique tag
1125+allocated at the time of enlistment. To discover the value of the
1126+system_id, you can use the ``maas-cli <profile> nodes list`` command.
1127+
1128+USAGE: maas-cli <profile> node [-h] release | start | stop | delete |
1129+read | update <system_id>
1130+
1131+.. program:: maas-cli node
1132+
1133+:samp:`-h, --help`
1134+
1135+ Display usage information.
1136+
1137+:samp:`release <system_id>`
1138+
1139+ Releases the node given by *<system_id>*
1140+
1141+:samp:`start <system_id>`
1142+
1143+ Powers up the node identified by *<system_id>* (where MAAS has
1144+ information for power management for this node).
1145+
1146+:samp:`stop <system_id>`
1147+
1148+ Powers off the node identified by *<system_id>* (where MAAS has
1149+ information for power management for this node).
1150+
1151+:samp:`delete <system_id>`
1152+
1153+ Removes the given node from the MAAS database.
1154+
1155+:samp:`read <system_id>`
1156+
1157+ Returns all the current known information about the node specified
1158+ by *<system_id>*
1159+
1160+:samp:`update <system_id> [parameters...]`
1161+
1162+ Used to change or set specific values for the node. The valid
1163+ parameters are listed below::
1164+
1165+ hostname=<value>
1166+ The new hostname for this node.
1167+
1168+ architecture=<value>
1169+ Sets the architecture type, where <value>
1170+ is a string containing a valid architecture type,
1171+ e.g. "i386/generic"
1172+
1173+ distro_series=<value>
1174+ Sets the series of Ubuntu to use.
1175+
1176+ power_type=<value>
1177+ Sets the type of power management used on the node, e.g. "ipmi" or
1178+ "virsh".
1179+
1180+ power_parameters_{param1}... =<value>
1181+ Set the given power parameters. Note that the valid options for these
1182+ depend on the power type chosen.
1183+
1184+ power_parameters_skip_check 'true' | 'false'
1185+ Whether to sanity check the supplied parameters against this node's
1186+ declared power type. The default is 'false'.
1187+
1188+
1189+
1190+.. _cli-power:
1191+
1192+Example: Setting the power parameters for an ipmi enabled node::
1193+
1194+ maas-cli maas node update <system_id> \
1195+ power_type="ipmi" \
1196+ power_parameters_power_address=192.168.22.33 \
1197+ power_parameters_power_user=root \
1198+ power_parameters_power_pass=ubuntu;
1199+
1200+
1201+
1202+
1203+nodes
1204+^^^^^
1205+
1206+Usage: maas-cli <profile> nodes [-h] is-registered | list-allocated |
1207+acquire | list | accept | accept-all | new | check-commissioning
1208+
1209+.. program:: maas-cli nodes
1210+
1211+:samp:`-h, --help`
1212+
1213+ Display usage information.
1214+
1215+
1216+:samp:`accept <system_id>`
1217+
1218+ Accepts the node referenced by <system_id>.
1219+
1220+:samp:`accept-all`
1221+
1222+ Accepts all currently discovered but not previously accepted nodes.
1223+
1224+:samp:`acquire`
1225+
1226+ Allocates a node to the profile used to issue the command. Any
1227+ ready node may be allocated.
1228+
1229+:samp:`is-registered mac_address=<address>`
1230+
1231+ Checks to see whether the specified MAC address is registered to a
1232+ node.
1233+
1234+:samp:`list`
1235+
1236+ Returns a JSON formatted object listing all the currently known
1237+ nodes, their system_id, status and other details.
1238+
1239+:samp:`list-allocated`
1240+
1241+ Returns a JSON formatted object listing all the currently allocated
1242+ nodes, their system_id, status and other details.
1243+
1244+:samp:`new architecture=<value> mac_addresses=<value> [parameters]`
1245+
1246+ Creates a new node entry given the provided key=value information
1247+ for the node. A minimum of the MAC address and architecture must be
1248+ provided. Other parameters may also be supplied::
1249+
1250+ architecture="<value>" - The architecture of the node, must be
1251+ one of the recognised architecture strings (e.g. "i386/generic")
1252+ hostname="<value>" - a name for this node. If not supplied a name
1253+ will be generated.
1254+ mac_addresses="<value>" - The mac address(es)
1255+ allocated to this node.
1256+ powertype="<value>" - the power type of
1257+ the node (e.g. virsh, ipmi)
1258+
1259+
1260+:samp:`check-commissioning`
1261+
1262+ Displays current status of nodes in the commissioning phase. Any
1263+ that have not returned before the system timeout value are listed
1264+ as "failed".
1265+
1266+Examples:
1267+Accept and commission all discovered nodes::
1268+
1269+ $ maas-cli maas nodes accept-all
1270+
1271+List all known nodes::
1272+
1273+ $ maas-cli maas nodes list
1274+
1275+Filter the list using specific key/value pairs::
1276+
1277+ $ maas-cli maas nodes list architecture="i386/generic"
1278+
1279+
1280+
1281+node-groups
1282+^^^^^^^^^^^
1283+Usage: maas-cli <profile> node-groups [-d --debug] [-h --help] [-k
1284+--insecure] register | list | refresh-workers | accept | reject
1285+
1286+.. program:: maas-cli node-groups
1287+
1288+:samp:`-d, --debug`
1289+
1290+ Displays debug information listing the API responses.
1291+
1292+:samp:`-h, --help`
1293+
1294+ Display usage information.
1295+
1296+:samp:`-k, --insecure`
1297+
1298+ Disables the SSL certificate check.
1299+
1300+:samp:`register uuid=<value> name=<value> interfaces=<json_string>`
1301+
1302+ Registers a new node group with the given name and uuid. The
1303+ interfaces parameter must be supplied in the form of a JSON string
1304+ comprising the key/value data for the interface to be used, for
1305+ example: interface='["ip":"192.168.21.5","interface":"eth1", \
1306+ "subnet_mask":"255.255.255.0","broadcast_ip":"192.168.21.255", \
1307+ "router_ip":"192.168.21.1", "ip_range_low":"192.168.21.10", \
1308+ "ip_range_high":"192.168.21.50"}]'
1309+
1310+:samp:`list`
1311+
1312+ Returns a JSON list of all currently defined node groups.
1313+
1314+:samp:`refresh_workers`
1315+
1316+ It sounds a bit like they will get a cup of tea and a
1317+ biscuit. Actually this just sends each node-group worker an update
1318+ of its credentials (API key, node-group name). This command is
1319+ usually not needed at a user level, but is often used by worker
1320+ nodes.
1321+
1322+:samp:`accept <uuid>`
1323+
1324+ Accepts a node-group or number of nodegroups indicated by the
1325+ supplied UUID
1326+
1327+:samp:`reject <uuid>`
1328+
1329+ Rejects a node-group or number of nodegroups indicated by the
1330+ supplied UUID
1331+
1332+
1333+
1334+node-group-interface
1335+^^^^^^^^^^^^^^^^^^^^
1336+For managing the interfaces. See also
1337+"node_group_interfaces"
1338+
1339+Usage: maas-cli *<profile>* node-group-interface [-d --debug] [-h
1340+--help] [-k --insecure] read | update | delete [parameters...]
1341+
1342+..program:: maas-cli node-group-interface
1343+
1344+:samp:`read <uuid> <interface>`
1345+
1346+ Returns the current settings for the given UUID and interface
1347+
1348+:samp:`update [parameters]`
1349+
1350+ Changes the settings for the interface according to the given
1351+ parameters::
1352+
1353+ management= 0 | 1 | 2
1354+ The service to be managed on the interface ( 0= none, 1=DHCP, 2=DHCP
1355+ and DNS).
1356+
1357+ subnet_mask=<value>
1358+ Apply the given dotted decimal value as the subnet mask.
1359+
1360+ broadcast_ip=<value>
1361+ Apply the given dotted decimal value as the broadcast IP address for
1362+ this subnet.
1363+
1364+ router_ip=<value>
1365+ Apply the given dotted decimal value as the default router address
1366+ for this subnet.
1367+
1368+ ip_range_low=<value>
1369+ The lowest value of IP address to allocate via DHCP
1370+
1371+ ip_range_high=<value>
1372+ The highest value of IP address to allocate via DHCP
1373+
1374+:samp:`delete <uuid> <interface>`
1375+
1376+ Removes the entry for the given UUID and interface.
1377+
1378+
1379+Example:
1380+Configuring DHCP and DNS.
1381+
1382+To enable MAAS to manage DHCP and DNS, it needs to be supplied with the relevant
1383+interface information. To do this we need to first determine the UUID of the
1384+node group affected::
1385+
1386+ $ uuid=$(maas-cli <profile> node-groups list | grep uuid | cut -d\" -f4)
1387+
1388+Once we have the UUID we can use this to update the node-group-interface for
1389+that nodegroup, and pass it the relevant interface details::
1390+
1391+ $ maas-cli <profile> node-group-interface update $uuid eth0 \
1392+ ip_range_high=192.168.123.200 \
1393+ ip_range_low=192.168.123.100 \
1394+ management=2 \
1395+ broadcast_ip=192.168.123.255 \
1396+ router_ip=192.168.123.1 \
1397+
1398+Replacing the example values with those required for this network. The only
1399+non-obvious parameter is 'management' which takes the values 0 (no management), 1
1400+(manage DHCP) and 2 (manage DHCP and DNS).
1401+
1402+
1403+node-group-interfaces
1404+^^^^^^^^^^^^^^^^^^^^^
1405+
1406+The node-group-interfaces commands are used for configuring the
1407+management of DHCP and DNS services where these are managed by MAAS.
1408+
1409+Usage: maas-cli *<profile>* node-group-interfaces [-d --debug] [-h
1410+--help] [-k --insecure] list | new [parameters...]
1411+
1412+.. program:: maas-cli node-group-interfaces
1413+
1414+:samp:`-d, --debug`
1415+
1416+ Displays debug information listing the API responses.
1417+
1418+:samp:`-h, --help`
1419+
1420+ Display usage information.
1421+
1422+:samp:`-k, --insecure`
1423+
1424+ Disables the SSL certificate check.
1425+
1426+:samp:`list <label>`
1427+
1428+ Lists the current stored configurations for the given identifier
1429+ <label> in a key:value format which should be easy to decipher.
1430+
1431+
1432+:samp:`new <label> ip=<value> interface=<if_device> [parameters...]`
1433+
1434+ Creates a new interface group. The required parameters are the IP
1435+ address and the network interface this appies to (e.g. eth0). In
1436+ order to do anything useful, further parameters are required::
1437+
1438+ management= 0 | 1 | 2
1439+ The service to be managed on the interface
1440+ ( 0= none, 1=DHCP, 2=DHCP and DNS).
1441+
1442+ subnet_mask=<value>
1443+ Apply the given dotted decimal value as the subnet mask.
1444+
1445+ broadcast_ip=<value>
1446+ Apply the given dotted decimal value as the
1447+ broadcast IP address for this subnet.
1448+
1449+ router_ip=<value>
1450+ Apply the given dotted decimal value as the
1451+ default router address for this subnet.
1452+
1453+ ip_range_low=<value>
1454+ The lowest value of IP address to allocate via DHCP
1455+
1456+ ip_range_high=<value>
1457+ The highest value of IP address to allocate via DHCP
1458+
1459+
1460+
1461+
1462+tag
1463+^^^
1464+
1465+Usage: maas-cli <profile> tag read | update-nodes | rebuild | update |
1466+ nodes | delete
1467+
1468+.. program:: maas-cli tag
1469+
1470+:samp:`read <tag_name>`
1471+
1472+ Returns information on the tag specified by <name>
1473+
1474+:samp:`update-nodes <tag_name> [add=<system_id>] [remove=<system_id>] [nodegroup=<system_id>]`
1475+
1476+ Applies or removes the given tag from a list of nodes specified by
1477+ either or both of add="<system_id>" and remove="<system_id>". The
1478+ nodegroup parameter, which restricts the operations to a particular
1479+ nodegroup, is optional, but only the superuser can execute this
1480+ command without it.
1481+
1482+:samp:`rebuild`
1483+
1484+ Triggers a rebuild of the tag to node mapping.
1485+
1486+:samp:`update <tag_name> [name=<value>] | [comment=<value>]|[definition=<value>]`
1487+
1488+ Updates the tag identified by tag_name. Any or all of name,comment
1489+ and definition may be supplied as parameters. If no parameters are
1490+ supplied, this command returns the current values.
1491+
1492+:samp:`nodes <tag_name>`
1493+
1494+ Returns a list of nodes which are associated with the given tag.
1495+
1496+:samp:`delete <tag_name>`
1497+
1498+ Deletes the given tag.
1499+
1500+tags
1501+^^^^
1502+Tags are a really useful way of identifying nodes with particular
1503+characteristics.
1504+
1505+Usage: maas-cli <profile> tag [-d --debug] [-h --help] [-k
1506+--insecure] list | new
1507+
1508+.. program:: maas-cli tag
1509+
1510+:samp:`-d, --debug`
1511+
1512+ Displays debug information listing the API responses.
1513+
1514+:samp:`-h, --help`
1515+
1516+ Display usage information.
1517+
1518+:samp:`-k, --insecure`
1519+
1520+ Disables the SSL certificate check.
1521+
1522+:samp:`list`
1523+
1524+ Returns a JSON object listing all the current tags known by the MAAS server
1525+
1526+:samp:`create name=<value> definition=<value> [comment=<value>]`
1527+
1528+ Creates a new tag with the given name and definition. A comment is
1529+ optional. Names must be unique, obviously - an error will be
1530+ returned if the given name already exists. The definition is in the form of
1531+ an XPath expression which parses the XML returned by running ``lshw`` on the
1532+ node.
1533+
1534+Example:
1535+Adding a tag to all nodes which have an Intel GPU::
1536+
1537+ $ maas-cli maas tags new name='intel-gpu' \
1538+ comment='Machines which have an Intel display driver' \
1539+ definition='contains(//node[@id="display"]/vendor, "Intel")
1540+
1541+
1542+unused commands
1543+^^^^^^^^^^^^^^^
1544+Because the ``maas-cli`` command exposes all of the API, it also lists
1545+some command options which are not really intended for end users, such
1546+as the "file" and "boot-images" options.
1547
1548 Further Documentation
1549 ^^^^^^^^^^^^^^^^^^^^^
1550-
1551 For more documentation of MAAS, please see https://maas.ubuntu.com/docs
1552
1553-
1554 See Also
1555 ^^^^^^^^
1556-
1557 `maas`
1558+
1559+