简体   繁体   English

从 terraform + gitlab-ci 系统创建基础架构文档

[英]Create Infrastructure Documentation from terraform + gitlab-ci system

Our infra pipeline is setup using terraform + gitlab-ci.我们的基础设施管道是使用 terraform + gitlab-ci 设置的。 I am given with task to provide documentation on setup with what's implemented and what's left.我的任务是提供有关设置的文档,其中包含已实施的内容和剩下的内容。 I am new to infra world and finding it hard to come up template to start documentation.我是基础设施领域的新手,发现很难找到模板来启动文档。

So far I thought of having a table with resources needed with details on dependencies, source of the module, additional notes, etc到目前为止,我想有一个包含所需资源的表,其中包含有关依赖项、模块来源、附加说明等的详细信息

If you have a template, can you share OR any other suggestions?如果您有模板,您可以分享或任何其他建议吗?

For starters, you could try one or both of the below approaches:对于初学者,您可以尝试以下一种或两种方法:

a) create a graph of the Terraform resources using its graph command a)使用其graph 命令创建 Terraform 资源图

b) group and then list all of your resources for a specific tag using AWS Resource Groups , specifically its Create Resource Group functionality b)使用AWS Resource Groups 分组,然后列出特定标签的所有资源,特别是它的Create Resource Group功能

The way I do documentation is to keep it as simple as possible, explain how it works, how to use it and also provide instructions on how it was setup from scratch for reference and as an insurance policy.我做文档的方式是让它尽可能简单,解释它是如何工作的,如何使用它,并提供如何从头开始设置的说明,以供参考和作为保险单。 So that if it's destroyed, someone other than the person that set it all up could recreate it.因此,如果它被破坏,除了设置它的人之外的其他人可以重新创建它。

Since this is just a pipeline there is probably not much to diagram.由于这只是一个管道,因此可能没有太多要绘制的图表。 The structure of documentation I would provide would be something like this and I would add this either as part of the README.md, in Confluence or however your team does documentation.我将提供的文档结构类似于这样,我会将其添加为 README.md 的一部分,在 Confluence 中,或者您的团队编写文档。

Summary概括

1-2 Sentences about the work and why it was created. 1-2 关于作品及其创作原因的句子。

How the Repo is Structured回购的结构如何

An explanation on how the repo is structured and decisions behind why it was structured the way it was.对回购结构的解释以及为什么它的结构背后的决定。

How To Use如何使用

Provide steps on how a user can use the pipeline提供有关用户如何使用管道的步骤

How It Was Created它是如何创建的

Provide steps on how it was setup so anybody can manage it and work on it going forward.提供有关如何设置的步骤,以便任何人都可以管理它并继续工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM