Skip to content

Commit

Permalink
Add omv-salt documentation.
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Theile <votdev@gmx.de>
  • Loading branch information
votdev committed Jul 8, 2021
1 parent c35de0e commit 154fcc7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
2 changes: 1 addition & 1 deletion development/howitworks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Essential elements:

**config.xml** Database file in XML format, located in :file:`/etc/openmediavault` We will refer in this explanation just as config.xml

**omv-salt** Shell script that accepts arguments. The name of the argument is related to the service it configures. ie: `omv-salt deploy run samba`.
**omv-salt** Tool to :doc:`deploy </development/internaltools/omv-salt>` the configuration and services.

**omv-engined** RPC daemon that runs all the PHP backend code. The nginx web server connects to this daemon through the FastCGI PHP socket. If an error appears in the |webui| that indicates no connection to the PHP socket means the daemon is not running.

Expand Down
42 changes: 41 additions & 1 deletion development/internaltools.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
Internal Tools
##############

|omv| software comes with several terminal command line tools that can be used by developers and/or advanced users. Also it can be used to gather support information.
|omv| software comes with several command line tools that can be used by
developers and/or advanced users. Also it can be used to gather support
information.

omv-salt
^^^^^^^^

This tool is used to deploy the configuration of services and to start or
stop them.

To get a list of all available deployment states::

# omv-salt deploy list

To deploy one or more states run the following command::

# omv-salt deploy run <NAMES>...
# omv-salt deploy run avahi monit systemd

The tool also supports stages that bundle various tasks. To get a list
of them, run the command::

# omv-salt stage list

The following stages are available:

- setup
This stage is being run only once after the |omv| Debian package has
been installed on the system. It is used to set up the system to the
desired requirements.
- prepare
This stage takes care that the pillar and grains are up to date and
all modules/states are being synced to the minions.
- deploy
Deploy the configuration of various services like SMB, FTP, ...
- all
This stage contains the stages prepare and deploy.

If you want to deploy all states in one bunch, then you need to execute
the following command::

# omv-salt stage run deploy

omv-confdbadm (Database)
^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
8 changes: 4 additions & 4 deletions various/advset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To get a list of all configured environment variables use the following command:

To get the value of a specific environment variable use::

# omv-env get <OMV_NAME_OF_VARIABLE>
# omv-env get <VARIABLE_NAME>

The list of environmental variables used for :file:`/etc/fstab` filesystem with the
defaults options and how to use them is described :doc:`here </various/fs_env_vars>`.
Expand All @@ -45,7 +45,7 @@ Modify environment variables

To set or change these variables, run the following command::

# omv-env set <OMV_NAME_OF_VARIABLE> <VALUE>
# omv-env set <VARIABLE_NAME> <VALUE>
# omv-env set OMV_SSHD_SUBSYSTEM_SFTP "/usr/lib/openssh/sftp-server"

The configured environment variables are located in the file :file:`/etc/default/openmediavault`.
Expand All @@ -66,7 +66,7 @@ If you want to deploy custom configuration settings, then you could
add additional Salt states. Please check out the `SaltStack documentation <https://docs.saltproject.io/en/latest/>`_
for more information about how it works and how to use it.

The |omv| SLS files are located at :code:`/srv/salt/omv/`.
The |omv| SLS files are located at :file:`/srv/salt/omv/`.

Add custom states
^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -103,6 +103,6 @@ Example::

For more file modifications please have a look into the `file module <https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.file.html>`_.

Finally you need to deploy your changes by running::
Finally you need to :doc:`deploy </development/internaltools/omv-salt>` your changes by running::

# omv-salt deploy run <SERVICE_NAME>

0 comments on commit 154fcc7

Please sign in to comment.