Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanNWatt committed Oct 24, 2024
1 parent 43f9c32 commit 73eab1d
Show file tree
Hide file tree
Showing 38 changed files with 51 additions and 105 deletions.
4 changes: 1 addition & 3 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ formatter: "markdown table"
content: |-
{{ .Header }}
## Overview
# Relativistic
Relativistic is a Terraform, Helm, and custom configuration project to be able to deploy an production grade open source data stack quickly.
For full documentation, visit [docs.relativistic.io](https://docs.relativistic.io).
{{ .Inputs }}
{{ .Outputs }}
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Readme Module



### Overview
# Relativistic

# Relativistic

Expand Down Expand Up @@ -108,7 +104,7 @@ No resources.
| <a name="module_dagster"></a> [dagster](#module\_dagster) | ./modules/dagster | n/a |
| <a name="module_kubernetes_dashboard"></a> [kubernetes\_dashboard](#module\_kubernetes\_dashboard) | ./modules/kubernetes-dashboard | n/a |
| <a name="module_lightdash"></a> [lightdash](#module\_lightdash) | ./modules/lightdash | n/a |
| <a name="module_prometheus"></a> [prometheus](#module\_prometheus) | ./modules/prometheus | n/a |
| <a name="module_prometheus"></a> [prometheus](#module\_prometheus) | ./modules/monitoring | n/a |
| <a name="module_superset"></a> [superset](#module\_superset) | ./modules/superset | n/a |
| <a name="module_ubuntu"></a> [ubuntu](#module\_ubuntu) | ./modules/ubuntu | n/a |
| <a name="module_windmill"></a> [windmill](#module\_windmill) | ./modules/windmill | n/a |
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module "kubernetes_dashboard" {

module "prometheus" {
count = var.prometheus_enabled ? 1 : 0
source = "./modules/prometheus"
source = "./modules/monitoring"
prometheus_operator_chart_version = var.prometheus_operator_chart_version
loki_chart_version = var.loki_chart_version
prometheus_override_helm_values = var.prometheus_override_helm_values
Expand Down
4 changes: 1 addition & 3 deletions modules/airbyte/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Airbyte

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/airflow/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Airflow

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/analytics_postgres/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Analytics postgres

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/argo_cd/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Argo cd

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/argo_workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Argo workflows

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/clickhouse/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Clickhouse

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/configuration_postgres/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Configuration postgres

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/dagster/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Dagster

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/kubernetes-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Kubernetes dashboard

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/lightdash/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Lightdash

### Overview

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Monitoring

### Overview

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions modules/superset/.terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ content: |-
## Example Usage
From [examples/simple/main.tf](https://github.com/kadreio/relativistic/blob/main/modules/superset/examples/simple/main.tf)
```hcl
{{ include "examples/simple/main.tf" }}
```
{{ .Inputs }}
Expand Down
7 changes: 4 additions & 3 deletions modules/superset/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Readme Module


# Superset

### Overview

This module deploys Apache Superset, a modern data exploration and visualization platform, on Kubernetes. It sets up the Superset web application, its dependencies, and the necessary database using a Helm chart. The module also configures authentication and exposes the Superset UI for easy access to data analytics and dashboard creation.

### Example Usage
From [examples/simple/main.tf](https://github.com/kadreio/relativistic/blob/main/modules/superset/examples/simple/main.tf)

```hcl
provider "kubernetes" {
config_path = "~/.kube/config"
}
Expand All @@ -27,6 +27,7 @@ resource "random_string" "cookie_key" {
length = 32
special = false
}
```

### Inputs

Expand Down
4 changes: 1 addition & 3 deletions modules/ubuntu/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Ubuntu

### Overview

Expand Down
4 changes: 1 addition & 3 deletions modules/windmill/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Readme Module


# Windmill

### Overview

Expand Down
13 changes: 8 additions & 5 deletions sp/docs/source/generate_tf_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import subprocess


def process_markdown(content, filename):
def process_markdown(content, filename, title):
# Add title header
title = os.path.splitext(os.path.basename(filename))[0].replace('_', ' ').replace('-', ' ').capitalize()
# title = os.path.splitext(os.path.basename(filename))[0].replace('_', ' ').replace('-', ' ').capitalize()

content = f"# {title} Module\n\n{content}"
content = f"# {title} {content}"

# Replace "##" headers with "###" headers
lines = content.split('\n')
Expand All @@ -23,6 +23,9 @@ def process_markdown(content, filename):

def generate_module_doc(module_path, output_file):
try:

title = os.path.splitext(os.path.basename(output_file))[0].replace('_', ' ').replace('-', ' ').capitalize()

result = subprocess.run(
['terraform-docs', 'markdown', 'table', '--config', os.path.join(module_path, '.terraform-docs.yml'), module_path],
capture_output=True,
Expand All @@ -32,12 +35,12 @@ def generate_module_doc(module_path, output_file):

# Write the output to the file
with open(output_file, 'w') as f:
f.write(process_markdown(result.stdout, output_file))
f.write(process_markdown(result.stdout, output_file, title))

# Write the output to the README.md in the module directory
readme_path = os.path.join(module_path, 'README.md')
with open(readme_path, 'w') as readme:
readme.write(process_markdown(result.stdout, readme_path))
readme.write(process_markdown(result.stdout, readme_path, title))

print(f"Generated README.md for {os.path.basename(module_path)}")

Expand Down
8 changes: 2 additions & 6 deletions sp/docs/source/terraform/relativistic.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Relativistic Module



### Overview
# Relativistic

# Relativistic

Expand Down Expand Up @@ -108,7 +104,7 @@ No resources.
| <a name="module_dagster"></a> [dagster](#module\_dagster) | ./modules/dagster | n/a |
| <a name="module_kubernetes_dashboard"></a> [kubernetes\_dashboard](#module\_kubernetes\_dashboard) | ./modules/kubernetes-dashboard | n/a |
| <a name="module_lightdash"></a> [lightdash](#module\_lightdash) | ./modules/lightdash | n/a |
| <a name="module_prometheus"></a> [prometheus](#module\_prometheus) | ./modules/prometheus | n/a |
| <a name="module_prometheus"></a> [prometheus](#module\_prometheus) | ./modules/monitoring | n/a |
| <a name="module_superset"></a> [superset](#module\_superset) | ./modules/superset | n/a |
| <a name="module_ubuntu"></a> [ubuntu](#module\_ubuntu) | ./modules/ubuntu | n/a |
| <a name="module_windmill"></a> [windmill](#module\_windmill) | ./modules/windmill | n/a |
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/airbyte.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Airbyte Module


# Airbyte

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/airflow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Airflow Module


# Airflow

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/analytics_postgres.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Analytics postgres Module


# Analytics postgres

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/argo_cd.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Argo cd Module


# Argo cd

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/argo_workflows.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Argo workflows Module


# Argo workflows

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/clickhouse.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Clickhouse Module


# Clickhouse

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/configuration_postgres.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Configuration postgres Module


# Configuration postgres

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/dagster.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Dagster Module


# Dagster

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/kubernetes-dashboard.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Kubernetes dashboard Module


# Kubernetes dashboard

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/lightdash.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Lightdash Module


# Lightdash

### Overview

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Prometheus Module


# Monitoring

### Overview

Expand Down
7 changes: 4 additions & 3 deletions sp/docs/source/terraform/submodule/superset.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Superset Module


# Superset

### Overview

This module deploys Apache Superset, a modern data exploration and visualization platform, on Kubernetes. It sets up the Superset web application, its dependencies, and the necessary database using a Helm chart. The module also configures authentication and exposes the Superset UI for easy access to data analytics and dashboard creation.

### Example Usage
From [examples/simple/main.tf](https://github.com/kadreio/relativistic/blob/main/modules/superset/examples/simple/main.tf)

```hcl
provider "kubernetes" {
config_path = "~/.kube/config"
}
Expand All @@ -27,6 +27,7 @@ resource "random_string" "cookie_key" {
length = 32
special = false
}
```

### Inputs

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/ubuntu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Ubuntu Module


# Ubuntu

### Overview

Expand Down
4 changes: 1 addition & 3 deletions sp/docs/source/terraform/submodule/windmill.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Windmill Module


# Windmill

### Overview

Expand Down

0 comments on commit 73eab1d

Please sign in to comment.