diff --git a/docs/concepts.rst b/docs/concepts.rst index a4fd13a0a..60ef0c3ed 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -399,3 +399,10 @@ This property is generally used dynamically to remove access to the variable dep - Read only - - disabled - mandatory + +The lifespan of the variables +------------------------------ + +A picture is worth a thousand words: + +.. image:: images/dessin.png diff --git a/docs/images/dessin.png b/docs/images/dessin.png new file mode 100644 index 000000000..03f58659e Binary files /dev/null and b/docs/images/dessin.png differ diff --git a/docs/images/dessin.svg b/docs/images/dessin.svg new file mode 100644 index 000000000..393c86364 --- /dev/null +++ b/docs/images/dessin.svg @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Read Write + Structure + hidden + disabled + Read Only + + + + + + \ No newline at end of file diff --git a/docs/vac.rst b/docs/vac.rst index 64e920008..69dc29b5b 100644 --- a/docs/vac.rst +++ b/docs/vac.rst @@ -1,22 +1,15 @@ Variables as Code ================== -.. - - To do this, we need a typed variable definitions with defaults and validation. - - Once defined, variables must be able to: - - - provide useful information to the operator to make their choices - - load user values from differents sources - - validate the context - - display and archive the final values in a readable format - - allow other applications to use these variables Definition -------------- -**Variables as Code** is the practice of managing configuration variables the same way you treat source code. +.. glossary:: + + VaC + + VaC stands for **Variables as Code**, it is the practice of managing configuration variables the same way you treat source code. It is a concept that extends the Infrastructure as Code (IaC) philosophy to the management of configuration variables, secrets, and environment-specific settings. More precisely, this extends Configuration as Code (CaC) principles. @@ -24,24 +17,38 @@ More precisely, this extends Configuration as Code (CaC) principles. The idea is to treat variables β€” not just infrastructure or configuration β€” as version-controlled, declarative, and automated code rather than manual, static, or hardcoded values. With growing complexity of the infrastructure, it is difficult to manage all the variables. +Due to more and more available variables required to set up the infrastructure, +it became quite annoying to hand the necessary variables to where they are actually used +and even more annoying to add new variables. + Variables can be redundant and sometimes are defined on several places. +Ansible collections +------------------------- + A typical example is the management of Ansible collections. Currently, when you distribute an Ansible collection, you distribute the recipes that allow you to deploy a component, the default values ​​for certain variables, and possibly variable validation. However, you don't share the variable declarations. Therefore, each user would have to rewrite the user documentation, define the global context themselves, and so on. It is therefore the user's responsibility to maintain the consistency of the variables with these given problems. -And I'm not even talking about managing variables in a multi-project context. +And we're not even talking about managing variables in a multi-project context. It is often necessary to recreate the same variables with the same constraints over and over again between different projects. +Variables as Code with Rougail +----------------------------------- + For this, we thought of a solution and came up with a concept of managing all our variables as a code called VaC (Variables as Code). -Often when we talk about VaC (or CaC) we think of the different environments (Development, Staging, Production). +Often when we talk about :term:`VaC` (or CaC) we think of the different environments (Development, Staging, Production). -With Rougail, this question does not arise. Essentially, Rougail manages this with user data. Here I'm talking about sharing variables between projects. +With Rougail, this question does not arise. Essentially, Rougail manages this with user data. +Here we're talking about sharing variables between projects. -To do this, we need a typed variable definitions with defaults and validation. +Furthermore, using a tool like Rougail allows you to use variables with different IaC deployment solutions without having to redefine those variables. +It can be said that Rougail allows you to use variables not only between projects but also between tools. + +To do this, we need typed variable definitions with defaults and validation. Once defined, variables must be able to: @@ -50,3 +57,5 @@ Once defined, variables must be able to: - validate the context - display and archive the final values in a readable format - allow other applications to use these variables + +