Skip to content

Commit

Permalink
Add stump guides
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteOtter committed Jun 11, 2024
1 parent 1ae75d0 commit 91c4fe3
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 2 deletions.
75 changes: 75 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
************************
Configuring Cobbler-TFTP
************************

Cobbler-TFTP can be configured in several different ways.

Configuration via a config-File
===============================

Configuring Cobbler-TFTP by using a configuration .yaml-File is the recommended way.
Using a ``settings.yaml`` allows you to set up a persistent configuration of the Cobbler-TFTP server.

An example file looks like this:

.. code-block:: yaml
schema: 1.0 # The version of the configuration schema to use
auto_migrate_settings: false # Automatically migrate to the newest configuration schema
is_daemon: true # Run Cobbler-TFTP as a daemon
cobbler:
uri: "http://localhost/cobbler_api" # uri of your Cobbler API
username: "cobbler" # Username for Cobbler
password: "cobbler"
password_file: "/etc/cobbler-tftp/cobbler_password" # File containing your Cobbler password.
This configuration is also the *default* configuration of Cobbler-TFTP, which is used if no other
configuration parameters can be found from other sources.

To pass the file to Cobbler-TFTP, you can pass the file location as a CLI argument using the ``-c`` or
``--config`` flag.

.. code-block:: bash
cobbler-tftp -c path/to/your/settings.yml
Configuration via environment variables
=======================================

You can set certain parameters of Cobbler-TFTP's behaviour by using environment variables.
These **will override the configuration from your configuration file**.

Cobbler-TFTP will automatically search for environment variables in this format:

.. code-block:: bash
COBBLER_TFTP__<PARENT_KEY>__<CHILD_KEY>__<...>__<KEY>=<VALUE>
For example your variables might look like this:

.. code-block:: bash
COBBLER_TFTP__IS_DAEMON=true
or, in case of your Cobbler settings:

.. code-block:: bash
COBBLER_TFTP__COBBLER__URI=http//your.domain.com/cobbler_api
Configuration via CLI parameters
================================

Youc an also provide Cobbler-TFTP with CLI arguments to **override some or all** of the above
parameters.

These must be given in the format:

.. code-block:: bash
<PARENT_KEY>.<CHILD_KEY>.<..>.<KEY>=<VALUE>
These arguments will override values from **all other sources** and will be lost
when the service is stopped and restarted.

We advise you to use this option for testing purposes only.
29 changes: 29 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
******************
Contributing Guide
******************

Thank you for your interest in contributing to Cobbler-TFTP.
This guide aims to show you how to set up your development environment
and what to look out for when working on your contribution.

Getting started
===============

The first step is to fork Cobbler-TFTP's repository and clone the source code
to your local machine.

Once done, you will need to set up a virtual environment using either
`<a href="https://virtualenv.pypa.io/en/latest">virtualenv</a>` or
`<a href="https://github.com/pyenv/pyenv">pyenv</a>` to make sure your system
does not affect the integrity of your changes.

When this is completed, you then need to install all requirements.
You can do so by installing the application using ``pip``.

.. code-block:: bash
pip install -e .[tests_require,lint_requires,doc]
Pip will then install Cobbler-TFTP alongside all of the additional dependencies
required for contributing.

11 changes: 9 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
****************************************
Welcome to Cobbler-TFTP's documentation!
========================================
****************************************

Cobbler-TFTP is a stateless TFTP server for the dynamic creation of configuration files to machines managed by Cobbler.

.. toctree::
:maxdepth: 2
:caption: Contents:


Quickstart Guide <quickstart-guide>
Installation <installation>
Configuration <configuration>
Contributing Guide <contributing>
Code Documentation<code-autodoc/modules.rst>


Expand Down
3 changes: 3 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
***********************
Installing Cobbler-TFTP
***********************
3 changes: 3 additions & 0 deletions docs/quickstart-guide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
****************************
Quickstart with Cobbler-TFTP
****************************

0 comments on commit 91c4fe3

Please sign in to comment.