Skip to content

Commit

Permalink
feat: add infrastructure and orchestrator diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjenek committed Mar 18, 2024
1 parent d4610d9 commit 81b31e2
Show file tree
Hide file tree
Showing 19 changed files with 212 additions and 98 deletions.
29 changes: 26 additions & 3 deletions examples/dns/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Example: dns resource based on AWS Route 53

This example configures a [dns](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#dns) Resource Definition using AWS Route 53.

The created Resource Definition can be used in your Score file using:
## Configuration
This example configures a [dns](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#dns) Resource Definition using AWS Route 53. Workloads use the `dns` resource to dynamically create dns record would look like:

```yaml
resources:
Expand All @@ -11,6 +10,30 @@ resources:
type: dns
```
## Infrastructure setup
```mermaid
graph TD;
subgraph AWS Hosted zone
record["record"]
end

subgraph AKS Cluster
pod[workload pod]
end
record --> pod
```

## Orchestrator setup

```mermaid
graph LR;
workload_1 --> dns_1["dns_1, resource_type: dns"]
workload_2 --> dns_2["dns_2, resource_type: dns"]
workload_2 --> shared.dns_1["shared.dns_1, resource_type: dns"]
workload_3 --> shared.dns_1["shared.dns_1, resource_type: dns"]
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down
3 changes: 2 additions & 1 deletion examples/dns/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ terraform {
required_version = ">= 1.3.0"
}

provider "humanitec" {}
provider "humanitec" {
}
29 changes: 26 additions & 3 deletions examples/mysql/aurora/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Example: mysql resource based on AWS RDS Aurora

This example configures a [mysql](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#mysql) Resource Definition using AWS RDS Aurora.

The created definition can be used in your Score file using:
## Configuration
This example configures a [mysql](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#mysql) Resource Definition using AWS RDS Aurora. Workloads use the `mysql` resource to dynamically create databases would look like:

```yaml
resources:
Expand All @@ -11,6 +10,30 @@ resources:
type: mysql
```
## Infrastructure setup
```mermaid
graph TD;
subgraph VPC
database["MySQl AWS RDS Aurora instance"]
sg["MySQL security group"]
subgraph AKS Cluster
pod[workload pod]
end
database --> sg --> pod
end
```

## Orchestrator setup

```mermaid
graph LR;
workload_1 --> db_1["db_1, resource_type: mysql"]
workload_2 --> db_2["db_2, resource_type: mysql"]
workload_2 --> shared.db_1["shared.db_1, resource_type: mysql"]
workload_3 --> shared.db_1["shared.db_1, resource_type: mysql"]
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down
3 changes: 0 additions & 3 deletions examples/mysql/aurora/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ provider "aws" {
}

provider "humanitec" {
host = var.humanitec_host
org_id = var.humanitec_org_id
token = var.humanitec_token
}
16 changes: 0 additions & 16 deletions examples/mysql/aurora/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ variable "region" {
description = "AWS Region to create resources"
}

variable "humanitec_org_id" {
type = string
description = "Humanitec organization where resource definitions will be applied"
}

variable "humanitec_token" {
type = string
description = "Humanitec API token"
}

variable "humanitec_host" {
type = string
default = "https://api.humanitec.io"
description = "Humanitec API host url"
}

variable "resource_packs_aws_url" {
description = "AWS Resource Pack git url"
type = string
Expand Down
28 changes: 26 additions & 2 deletions examples/mysql/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Example: mysql resource based on AWS RDS

This example configures a [mysql](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#mysql) Resource Definition using AWS RDS.

The created Resource Definition can be used in your Score file using:
## Configuration
This example configures a [mysql](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#mysql) Resource Definition using AWS RDS. Workloads use the `mysql` resource to dynamically create databases would look like:

```yaml
resources:
Expand All @@ -11,6 +11,30 @@ resources:
type: mysql
```
## Infrastructure setup
```mermaid
graph TD;
subgraph VPC
database["MySQl AWS RDS instance"]
sg["MySQL security group"]
subgraph AKS Cluster
pod[workload pod]
end
database --> sg --> pod
end
```

## Orchestrator setup

```mermaid
graph LR;
workload_1 --> db_1["db_1, resource_type: mysql"]
workload_2 --> db_2["db_2, resource_type: mysql"]
workload_2 --> shared.db_1["shared.db_1, resource_type: mysql"]
workload_3 --> shared.db_1["shared.db_1, resource_type: mysql"]
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down
3 changes: 0 additions & 3 deletions examples/mysql/basic/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ provider "aws" {
}

provider "humanitec" {
host = var.humanitec_host
org_id = var.humanitec_org_id
token = var.humanitec_token
}
16 changes: 0 additions & 16 deletions examples/mysql/basic/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ variable "region" {
description = "AWS Region to create resources"
}

variable "humanitec_org_id" {
type = string
description = "Humanitec organization where resource definitions will be applied"
}

variable "humanitec_token" {
type = string
description = "Humanitec API token"
}

variable "humanitec_host" {
type = string
default = "https://api.humanitec.io"
description = "Humanitec API host url"
}

variable "resource_packs_aws_url" {
description = "AWS Resource Pack git url"
type = string
Expand Down
29 changes: 26 additions & 3 deletions examples/postgres/aurora/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Example: postgres resource based on AWS RDS Aurora

This example configures a [postgres](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#postgres) Resource Definition using AWS RDS Aurora.

The created Resource Definition can be used in your Score file using:
## Configuration
This example configures a [postgres](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#postgres) Resource Definition using AWS RDS Aurora. Workloads use the `postgres` resource to dynamically create databases would look like:

```yaml
resources:
Expand All @@ -11,6 +10,30 @@ resources:
type: postgres
```
## Infrastructure setup
```mermaid
graph TD;
subgraph VPC
database["Postgres AWS RDS Aurora instance"]
sg["Postgres security group"]
subgraph AKS Cluster
pod[workload pod]
end
database --> sg --> pod
end
```

## Orchestrator setup

```mermaid
graph LR;
workload_1 --> db_1["db_1, resource_type: postgres"]
workload_2 --> db_2["db_2, resource_type: postgres"]
workload_2 --> shared.db_1["shared.db_1, resource_type: postgres"]
workload_3 --> shared.db_1["shared.db_1, resource_type: postgres"]
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down
3 changes: 0 additions & 3 deletions examples/postgres/aurora/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ provider "aws" {
}

provider "humanitec" {
host = var.humanitec_host
org_id = var.humanitec_org_id
token = var.humanitec_token
}
16 changes: 0 additions & 16 deletions examples/postgres/aurora/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ variable "region" {
description = "AWS Region to create resources"
}

variable "humanitec_org_id" {
type = string
description = "Humanitec organization where resource definitions will be applied"
}

variable "humanitec_token" {
type = string
description = "Humanitec API token"
}

variable "humanitec_host" {
type = string
default = "https://api.humanitec.io"
description = "Humanitec API host url"
}

variable "resource_packs_aws_url" {
description = "AWS Resource Pack git url"
type = string
Expand Down
29 changes: 26 additions & 3 deletions examples/postgres/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Example: postgres resource based on AWS RDS

This example configures a [postgres](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#postgres) Resource Definition using AWS RDS.

The created Resource Definition can be used in your Score file using:
## Configuration
This example configures a [postgres](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#postgres) Resource Definition using AWS RDS. Workloads use the `postgres` resource to dynamically create databases would look like:

```yaml
resources:
Expand All @@ -11,6 +10,30 @@ resources:
type: postgres
```
## Infrastructure setup
```mermaid
graph TD;
subgraph VPC
database["Postgres AWS RDS instance"]
sg["Postgres security group"]
subgraph AKS Cluster
pod[workload pod]
end
database --> sg --> pod
end
```

## Orchestrator setup

```mermaid
graph LR;
workload_1 --> db_1["db_1, resource_type: postgres"]
workload_2 --> db_2["db_2, resource_type: postgres"]
workload_2 --> shared.db_1["shared.db_1, resource_type: postgres"]
workload_3 --> shared.db_1["shared.db_1, resource_type: postgres"]
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down
3 changes: 0 additions & 3 deletions examples/postgres/basic/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ provider "aws" {
}

provider "humanitec" {
host = var.humanitec_host
org_id = var.humanitec_org_id
token = var.humanitec_token
}
16 changes: 0 additions & 16 deletions examples/postgres/basic/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ variable "region" {
description = "AWS Region to create resources"
}

variable "humanitec_org_id" {
type = string
description = "Humanitec organization where resource definitions will be applied"
}

variable "humanitec_token" {
type = string
description = "Humanitec API token"
}

variable "humanitec_host" {
type = string
default = "https://api.humanitec.io"
description = "Humanitec API host url"
}

variable "resource_packs_aws_url" {
description = "AWS Resource Pack git url"
type = string
Expand Down
29 changes: 26 additions & 3 deletions examples/redis/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Example: redis resource based on AWS ElastiCache

This example configures a [redis](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#redis) Resource Definition using AWS ElastiCache.

The created Resource Definition can be used in your Score file using:
## Configuration
This example configures a [redis](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#redis) Resource Definition using AWS ElastiCache. Workloads use the `redis` resource to dynamically create redis instance would look like:

```yaml
resources:
Expand All @@ -11,6 +10,30 @@ resources:
type: redis
```
## Infrastructure setup
```mermaid
graph TD;
subgraph VPC
cache["AWS Elasticache"]

subgraph AKS Cluster
pod[workload pod]
end
end
cache --> pod
```

## Orchestrator setup

```mermaid
graph LR;
workload_1 --> cache_1["cache_1, resource_type: redis"]
workload_2 --> cache_2["cache_2, resource_type: redis"]
workload_2 --> shared.cache_1["shared.cache_1, resource_type: redis"]
workload_3 --> shared.cache_1["shared.cache_1, resource_type: redis"]
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down
Loading

0 comments on commit 81b31e2

Please sign in to comment.