diff --git a/docs/projects/django-template/config_management/index.md b/docs/projects/django-template/config_management/index.md new file mode 100644 index 000000000..641f58d4b --- /dev/null +++ b/docs/projects/django-template/config_management/index.md @@ -0,0 +1,31 @@ +--- +title: Config Management +description: No Fuss Computings Django ITSM Config Management Module +date: 2024-06-03 +template: project.html +about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/django_app +--- + +Config Management is an ITSM process that deals with the management and storing of device/host configuration. This module aims to bridge the gap between manual entry of config data via JSON/YAML to entry via a UI. For items that are yet to be integrated into the UI, if at all possible, that config is still manually entered as JSON. The rendered configuration is intended to be consumed by Ansible. For all intents and purposes, consider this module to be the equivalent of Ansible's host groups. + + +## Features + +This module contains the following features: + +- Config Groups + +- Assign host to multiple groups + +- History + + +## Config Groups + +Considerable thought was placed into as wide a scope as possible, how the host config groups would function. This includes how the end product (the config) would be rendered. To aid in conveying how the config is rendered, consider the following image, which is a basic tree from a single root at the top, with three branches. + +![config-merging](../images/config-groups-merging.png) + +A host can be assigned to multiple groups as long as the host is not part of the same branch. This image has had each node coloured to denote different groups of the same branch. Note: the red node is a common node for the three branches. for example a host can be placed in each of the three coloured branches. the root node however, if the host is placed in this group then the host can not be placed in any other node. this is because the red node is the root for all three coloured branches. + +When it comes time to merge the configuration, if a parent group has the same config as it's childs config. The childs config will take precedence. For a host that is placed in all three branches (orange, green and blue), based of of the group name, sorted alphanumerically, the last group that has conflicting config will be the one that is used. A groups config will always be rendered with it's parents config included all the way up the branch to the root node. diff --git a/docs/projects/django-template/images/config-groups-merging.png b/docs/projects/django-template/images/config-groups-merging.png new file mode 100644 index 000000000..51f21bfda Binary files /dev/null and b/docs/projects/django-template/images/config-groups-merging.png differ diff --git a/docs/projects/django-template/images/config-groups.drawio b/docs/projects/django-template/images/config-groups.drawio new file mode 100644 index 000000000..133e13ed5 --- /dev/null +++ b/docs/projects/django-template/images/config-groups.drawio @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/projects/django-template/index.md b/docs/projects/django-template/index.md index cc1c50968..f6e27611e 100644 --- a/docs/projects/django-template/index.md +++ b/docs/projects/django-template/index.md @@ -17,13 +17,13 @@ This application contains the following module: - [Application wide settings](settings.md) -- [Multi-Tenant](permissions.md) +- [Configuration Management](config_management/index.md) -- [IT Asset Management (ITAM)](itam/index.md) +- History -- [Configuration ready for ansible](itam/device.md#configuration) +- [IT Asset Management (ITAM)](itam/index.md) -- History +- [Multi-Tenant](permissions.md) Specific features for a module can be found on the module's documentation un the features heading diff --git a/docs/projects/django-template/itam/device.md b/docs/projects/django-template/itam/device.md index 6b50213df..2fc9e24f8 100644 --- a/docs/projects/django-template/itam/device.md +++ b/docs/projects/django-template/itam/device.md @@ -34,6 +34,7 @@ This tab display the details of the device. To add a new model navigate to `settings -> ITAM -> Device Models` + ### Operating System This tab shows the operating system selected as installed on the device. the version `name` is intended to be full [semver](https://semver.org/). @@ -49,17 +50,17 @@ This tab shows the operating system selected as installed on the device. the ver This tab displays both software actions and installed software. Software install details are added/updated by uploading an [inventory report](../api.md#inventory-reports). -You can specify a software action for any piece of software within the ITAM database. You can do this by pressing the `dd software action` button or if the software is installed clicking on the `+ Add` button on the row of the software to add the action to. An action can be set to either `Install` or `Remove` and you can also select a software version from the database if you choose to do so. Software actions are added to config management and can be pulled from the API for use within an Ansible playbook. +You can specify a software action for any piece of software within the ITAM database. You can do this by pressing the `Add Software Action` button or if the software is installed clicking on the `+ Add` button on the row of the software to add the action to. An action can be set to either `Install` or `Remove` and you can also select a software version from the database if you choose to do so. Software actions are added to config management and can be pulled from the API for use within an Ansible playbook. Display of both installed software and software actions is within a single row, if it's for the same software. Any software that you add an action to, will be displayed at the top of the list of software tab. !!! info - If you add a software action for software that is already installed using the `add software action` button, an additional row will not be added as the applications logic is smart enough to check if the software is already installed. + If you add a software action for software that is already installed using the `Add Software Action` button, an additional row will not be added as the applications logic is smart enough to check if the software is already installed. ### Configuration -Although, configuration is generally part of config management. This tab displays in `JSON` format configuration that is ready for use. The intended audience is Ansible users with the fields provided matching established Ansible modules, if they exist. +This tab displays in `JSON` format configuration that is ready for use. Config from the [Config Management](../config_management/index.md) module is also included and rendered as part of this config. The intended audience is Ansible users with the fields provided matching established Ansible modules, if they exist. This configuration can also be obtained from API endpoint `/api/config/` where `` would match the Ansible `inventory_hostname`. diff --git a/mkdocs.yml b/mkdocs.yml index b09f5e691..7a83600bb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,6 +23,8 @@ nav: - projects/django-template/api.md + - projects/django-template/config_management/index.md + - projects/django-template/permissions.md - Core: