* Default configuration file of "Node" commands (slapos node, slapos supervisor) if not explicitly defined as first argument is:
* Default SlapOS Master is http://www.vifib.net. It can be changed by altering configuration files or with the `--master-url`
/etc/opt/slapos/slapos.cfg or value of SLAPOS_CONFIGURATION environment variable if exists.
argument for commands that support it.
* Most commands (except node register) take a configuration file parameter, provided as ``--cfg /path/to/file.cfg``.
If no such argument is provided:
* "node" commands read configuration from :file:`/etc/opt/slapos/slapos.cfg`, or the path referenced by the
``SLAPOS_CONFIGURATION`` environment variable.
* likewise, "client" commands (request, supply...) use :file:`~/.slapos/slapos.cfg`, or the ``SLAPOS_CLIENT_CONFIGURATION`` variable.
* Default configuration file of "Client" commands (slapos request, slapos supply, ...) if not explicitly defined as first argument is:
~/.slapos/slapos.cfg or value of SLAPOS_CLIENT_CONFIGURATION environment variable if exists.
* Default log file for Node commands is /var/log/[slapos-node-software.log | slapos-node-instance.log | slapos-node-report.log]. This one requires working log in slapgrid, currently log/console is a total mess.
* Default pid file for Node commands is: /var/run/[slapos-node-software.pid | slapos-node-instance.pid | slapos-node-report.pid].
XXX the SLAPOS_CONFIGURATION thing is repeated below for each command
we can remove it with :ellipsis:
XXX TODO document 'alias' for software_url, software_group?, computer_group?
* Default SlapOS Master is http://www.vifib.net. It can be changed by altering configuration files.
Common options
--------------
General commands
By itself, the ``slapos`` command lists all the available sub-commands and common options.
----------------
.. program-output:: python slapos
slapos
~~~~~~
Display help/usage.
SlapOS Client commands
SlapOS Client commands
----------------------
----------------------
Those commands are used by clients (as human beings or programs) to manage their own instances.
These commands are used by clients (as human beings or programs) to manage their own instances.
XXX Change in slaplib: allow to fetch instance params without changing anything. i.e we should do "slapos request myalreadyrequestedinstance" to fetch connection parameters without erasing previously defined instance parameters.
XXX Change in slaplib: allow to fetch instance params without changing anything. i.e we should do "slapos request myalreadyrequestedinstance" to fetch connection parameters without erasing previously defined instance parameters.
.. program-output:: python slapos help node register
If login is not provided, asks for user's vifib account then password.
If login is not provided, asks for user's vifib account then password.
...
@@ -142,6 +168,7 @@ If Node is already registered (slapos.cfg and certificate already present), issu
...
@@ -142,6 +168,7 @@ If Node is already registered (slapos.cfg and certificate already present), issu
XXX-Cedric should check for IPv6 in selected interface
XXX-Cedric should check for IPv6 in selected interface
Parameters:
Parameters:
***********
***********
--login LOGIN Your SlapOS Master login. If not provided, asks it interactively.
--login LOGIN Your SlapOS Master login. If not provided, asks it interactively.
...
@@ -154,37 +181,41 @@ Parameters:
...
@@ -154,37 +181,41 @@ Parameters:
-t, --create-tap Will trigger creation of one virtual "tap" interface per Partition and attach it to primary interface. Requires primary interface to be a bridge. defaults to false. Needed to host virtual machines.
-t, --create-tap Will trigger creation of one virtual "tap" interface per Partition and attach it to primary interface. Requires primary interface to be a bridge. defaults to false. Needed to host virtual machines.
-n, --dry-run Don't touch to anything in the filesystem. Used to debug.
-n, --dry-run Don't touch to anything in the filesystem. Used to debug.
Notes:
Notes:
******
******
* "IPv6 interface" and "create tap" won't be put at all in the SlapOS Node configuration file if not explicitly written.
* "IPv6 interface" and "create tap" won't be put at all in the SlapOS Node configuration file if not explicitly written.
Examples:
Examples:
*********
*********
* Register computer named "mycomputer" to vifib::
* Register computer named "mycomputer" to vifib::
slapos node register mycomputer
$ slapos node register mycomputer
* Register computer named "mycomputer" to vifib using br0 as primary interface, tap0 as IPv6 interface and different local ipv4 subnet::
* Register computer named "mycomputer" to vifib using br0 as primary interface, tap0 as IPv6 interface and different local ipv4 subnet::
* Register computer named "mycomputer" to another SlapOS master accessible via https://www.myownslaposmaster.com, and SLAP webservice accessible via https://slap.myownslaposmaster.com (Note that this address should be the "slap" webservice URL, not web URL)::
* Register computer named "mycomputer" to another SlapOS master accessible via https://www.myownslaposmaster.com, and SLAP webservice accessible via https://slap.myownslaposmaster.com (Note that this address should be the "slap" webservice URL, not web URL)::