You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/contributing/documentation.adoc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,17 @@
8
8
9
9
These documentation pages are written in https://asciidoc.org/[AsciiDoc] format and this website you are is generated using https://antora.org/[Antora].
10
10
11
-
== How Does Antora Work?
11
+
== How does Antora work?
12
12
13
13
Antora builds this documentation website from the configurations in an https://docs.antora.org/antora/latest/playbook/[Antora Playbook], which is a YAML file that describes the documentation sources and the output of the build.
14
14
15
-
=== Content Sources
15
+
=== Content sources
16
16
17
17
*Our playbook is stored on the root of the {url-main-repo}[main repository] of the DevOps Stack project, in the {url-main-repo}/blob/main/antora-playbook.yml[`antora-playbook.yml` file].* It is this file that defines the content sources (in our case each module of the DevOps Stack project) as well as the tags to take into account when building the documentation.
18
18
19
19
In this file you'll see a source for the main documentation (that is, the more generic pages stored in the {url-main-repo}[main repository]) and sources for each module on a list under `content.sources`. Each source is defined by a `url` to its repo and a `start_path` that tells Antora where the respective documentation is stored.
20
20
21
-
=== File Structure
21
+
=== File structure
22
22
23
23
Each documentation source is expected to have a precise file structure, as documented in extensive detail in the https://docs.antora.org/antora/latest/standard-directories/[Antora documentation].
24
24
@@ -57,7 +57,7 @@ nav:
57
57
58
58
In our case, note that we chose to use the tags instead of the branches for versioning the document pages. This is because we release each new version on a single branch but through multiple tags. More explanations about the different versioning methods are available https://docs.antora.org/antora/latest/content-source-versioning-methods/[here].
59
59
60
-
=== Building The Documentation
60
+
=== Building the documentation
61
61
62
62
Our documentation is built using a GitHub Action on the main repository, available {url-main-repo}/blob/main/.github/workflows/publish-antora-docs.yaml[here].
63
63
@@ -69,7 +69,7 @@ TIP: The `README.adoc` of the {url-docker-antora-repo}[customized Docker image]
69
69
70
70
After generating the documentation, it is then published to the {url-main-repo}/tree/gh-pages[`gh-pages`] branch of the main repository. This branch is then used by GitHub Pages to serve the documentation website.
71
71
72
-
== Module Documentation
72
+
== Module documentation
73
73
74
74
The documentation in each module is quite particular in the sense that we have not put the documentation pages on the `docs` folder. Instead we have symbolic links to the `README.adoc` on the root of the repository and to the `README.adoc` inside each variant. Consequently, a typical module as a structure like this:
75
75
@@ -115,7 +115,7 @@ A module that has variants will be a bit different. The main `README.adoc` shoul
115
115
116
116
TIP: Check the existing module's documentation pages for examples (the xref:thanos:ROOT:README.adoc[Thanos module] is a good example of a module with variants and the xref:keycloak:ROOT:README.adoc[Keycloak module] is an example without).
117
117
118
-
=== Terraform Docs Documentation
118
+
=== Terraform Docs documentation
119
119
120
120
You'll notice that the last sections of the `README.adoc` that are automatically generated by Terraform Docs.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/contributing/general_guidelines.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The DevOps Stack is a collection of modules, each of them having its own release
9
9
10
10
TIP: A private GitHub project owned by the https://github.com/orgs/camptocamp/teams/is-devops-stack/[`@camptocamp/is-devops-stack` team] is available https://github.com/orgs/camptocamp/projects/3/[here]. It is a useful way to follow the progress of the PRs and Issues of all the repositories. For more information on how it is implemented, check the xref:ROOT:contributing/project_board.adoc[Project Board] page.
11
11
12
-
== Development Workflow
12
+
== Development workflow
13
13
14
14
When a new feature or fix is required, the typical workflow is the following:
15
15
@@ -24,7 +24,7 @@ The following subsections describe some of the best practices to follow when wor
24
24
* Keep the `main` branch clean, and only merge Pull Requests into it.
25
25
* Create a new branch for each Pull Request. *The name of the branch should be the Jira ticket number, followed by a short description of the work done in the branch*, for example `ISDEVOPS-185-v1-docs`. This will allow the Jira ticket to be automatically linked to the branch and the Pull Request.
26
26
27
-
=== Commit Messages
27
+
=== Commit messages
28
28
29
29
* When committing to your branch, you should follow the https://www.conventionalcommits.org/[Conventional Commits] specification. *This will also allow the automated changelog generation to work properly.*
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/contributing/modules.adoc
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The DevOps Stack is separated into multiple Terraform modules, each of them cont
9
9
10
10
In order to improve the readability and maintenance of the code, this page contains some guidelines and explanations behind the creation and development of DevOps Stack modules. There is also a {url-template-repo}[repository template on GitHub] that can be used as a starting point for new modules and you can refer to it while reading this page.
11
11
12
-
== Basic Modules
12
+
== Basic modules
13
13
14
14
These kinds of modules are typically the ones that provision clusters and related resources. Good examples of this are the xref:eks:ROOT:README.adoc[Amazon EKS module] and xref:kind:ROOT:README.adoc[KinD module].
15
15
@@ -56,9 +56,9 @@ IMPORTANT: The `terraform.tf` file should only contain the *minimum required ver
56
56
57
57
NOTE: Take care to properly describe each entry on the `variables.tf` and `outputs.tf` files. These descriptions are taken into account by Terraform Docs for the automatic documentation of the module.
58
58
59
-
== Modules With Embedded Helm Charts
59
+
== Modules with embedded Helm charts
60
60
61
-
These are the more typical modules of the DevOps Stack and are used to deploy the remaining components of the stack. Good examples of this are the xref:argocd:ROOT:README.adoc[Argo CD module] and xref:cert-manager:ROOT:README.adoc[Cert-manager module].
61
+
These are the more typical modules of the DevOps Stack and are used to deploy the remaining components of the stack. Good examples of this are the xref:argocd:ROOT:README.adoc[Argo CD module] and xref:cert-manager:ROOT:README.adoc[cert-manager module].
62
62
63
63
NOTE: The Argo CD module is a special case, as it is used to deploy the other modules. A bootstrap Argo CD is deployed using resources of the type `helm_release`. This Argo CD is then responsible to deploy the remaining modules, which use resources of the type `argocd_project` and `argocd_application`.
64
64
@@ -109,6 +109,7 @@ A typical file/folder structure for a module with variants is the following:
IMPORTANT: Note how the `variables.tf` and `terraform.tf` files are symbolic links to the root module. This is to avoid having to maintain the same variables and providers in multiple places.
155
+
IMPORTANT: Note how the `variables.tf` and `terraform.tf` files are symbolic links to the root module. This is to avoid having to maintain the same variables and providers in multiple places. In case there are specific variables and/or providers you need to set, you can simply create new files like `extra-variables.tf` and `extra-terraform.tf` and add them to the variant.
153
156
154
157
Comparatively to a more basic module, note the following files inside the variants (all the other files are the same and are described above):
155
158
156
159
. *`extra-variables.tf`* - Contains the definition of the extra input variables of the variant. These are the variables that are specific to the variant and are not present in the root module.
160
+
. *`extra-terraform.tf`* - Contains the versions of the required providers of the variant. These are the providers that are specific to the variant and are not present in the root module.
157
161
. *`locals.tf`* - Contains the definition of the local variables used in the variant. It is here that we define the `helm_values` local that contains only the values specific to the variant. These should be written in HCL and not in YAML. They will be merged with the ones coming from the `helm_values` variable and then passed on to the root module. Afterwards, they will be merged once again, translated to YAML and then passed to the `argocd_application` resource.
158
162
. *`main.tf`* - Usually, this file only contains the call to the root module and passes along all the variables received as well as the modified entries. In specific cases it could also contain other resources specific to the variant. Take a look at this example from the Loki module:
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/contributing/project_board.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ After the app creation, an administrator was needed to install it on the organiz
29
29
30
30
IMPORTANT: The reason to not install the app on all the repositories by default was to further limit the scope of the app, although *this adds the burden of installing it on each repository manually every time a new repository of the DevOps Stack is created*.
31
31
32
-
=== Centralized Workflow
32
+
=== Centralized workflow
33
33
34
34
The workflow definition is available in the {url-main-repo}/blob/main/.github/workflows/pr-issues-project.yaml[main repository].
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/contributing/release.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ Each module is released and versioned independently. The release process is auto
8
8
9
9
In the subsections below we will go through the release process in more detail and then explain some steps when manually setting a version.
10
10
11
-
== Release Please Configuration
11
+
== Release Please configuration
12
12
13
13
The Release Please tool can be found on https://github.com/googleapis/release-please[this repository] and the GitHub Action we use is available on a https://github.com/google-github-actions/release-please-action[another repository]. Both are maintained by Google.
14
14
15
15
Every DevOps Stack module contains a GitHub workflow that simply calls a centralized workflow.
16
16
17
-
=== Centralized Workflow
17
+
=== Centralized workflow
18
18
19
19
The workflow definition available in the {url-main-repo}/blob/main/.github/workflows/modules-release-please.yaml[main repository].
20
20
@@ -31,7 +31,7 @@ Note following lines:
31
31
32
32
. The `extra-files` setting is used to specify additional files that need to be updated when bumping the version. In our case, we also need to update the `variables.tf` file. *This is because we need to statically define the variable `target_revision`, which is used to pin the module version in `argocd_application` resources.*
33
33
34
-
=== Caller Workflow
34
+
=== Caller workflow
35
35
36
36
The caller workflow on every module simply points to this workflow and is set to run on every push to the `main` branch. This is the workflow definition:
37
37
@@ -52,7 +52,7 @@ jobs:
52
52
53
53
NOTE: Our {url-template-repo}/blob/main/.github/workflows/release-please.yaml[module template] already contains this workflow definition, but with a caveat. To avoid creating releases on the template itself, it was deactivated and you need to re-activate it when creating a new module. The comments on the file are self-explanatory.
54
54
55
-
== Automatic Versioning
55
+
== Automatic versioning
56
56
57
57
The commit messages are used to determine the type of release that needs to be created.
0 commit comments