Skip to content

Commit

Permalink
Fix READ.ME & update architecture description
Browse files Browse the repository at this point in the history
Signed-off-by: Nindemic <[email protected]>
  • Loading branch information
Nindemic committed Dec 13, 2021
1 parent 731e1e6 commit cb2182d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 29 deletions.
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,47 @@ Architectural description of the codebase can be found at [ARCHITECTURE.md](./do
## Usage

1. Create Terraform State storage group and account to Azure

```bash
$ cd 00_tfstate_storage
$ terraform init
$ cd ../
$ terraform apply ./00_tfstate_storage
```
### No separate storage resource group (default)

2. Remember to edit `main.tf` email variable to a real one for TLS certificate
2. Deploy main service stack
2. Create separate resource group for persistent data

```bash
$ terraform apply ./
$ cd 01_storage_rg
$ terraform init
```

### OPTIONAL: Separate resource group
Create a Terraform workspace

2. Create separate resource group for databases
```bash
$ terraform workspace new [WORKSPACE NAME]
```
Deploy persistent data file shares

```bash
$ cd ../
$ terraform apply ./01_storage_rg
```

3. Deploy main service stack

Remember to edit `main.tf` email variable to a real one for TLS certificate

```bash
$ cd 02_deployHono
$ terraform init
```
$ terraform apply ./02_deployHono

Create a Terraform workspace. Important: Use same workspace name as before in 01_storage_rg!

```bash
$ terraform workspace new [WORKSPACE NAME]
$ terraform apply
```

## After deployment
Expand Down
45 changes: 23 additions & 22 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ This is a architectural description of the smad-deploy-azure
|------|----------|-------|
|[./00_tfstate_storage](#Terraform-state-module)|Creates resource group for terraform state file|
|[./01_storage_rg](#Storage-resource-group)|Creates separate resource group for persistent data needs|
|[./02_container_registry](#Contrainer-registry-module)| Creates ACR for k8s cluster. **Currently not used**|
|[./02_deployHono](#Hono-service-stack-module)| Creates Hono k8s cluster and services
|.02_deployHono/modules|Modules used by the script. |
|[.../k8s](#Kubernetes-deployment-module)|Module for creating kubernetes cluster to Azure (AKS)
|[.../ambassador](#Ambassador-deployment-module)|Handles deployment of Ambassador via Helm to k8s cluster | k8s
|[.../hono](#Hono-deployment-module)|Handles deployment of Hono via Helm to k8s cluster | k8s
|[../influxdb](#Influxdb-module)|Module that handles deployment of Influxdb to k8s cluster. Holds all the information to set up database for prometheus metrics | k8s
|[.../jaeger](#Jaeger-deployment-module)|Handles deployment of Jaeger via Helm to k8s cluster | k8s
|[.../kafka](#Kafka-deployment-module)|Handles deployment of Kafka cluster via Helm to k8s cluster | k8s
|[.../kube_prometheus_stack](#kube-prometheus-stack-deployment-module)|Handles deployment of kube-prometheus-stack via Helm to k8s cluster. | k8s
|[.../mongodb](#Mongo-deployment-module)|Handles deployment of MongoDB via Helm to k8s cluster. | k8s


Every module follows the conventional Terraform naming scheme, and therefore has `main.tf`, `variables.tf` and `outputs.tf` files.
|[.../persistent_storage](#Data-persistency-module)|Deploys persistent volumes and persistent volume claims. | k8s
|[./03_container_registry](#Contrainer-registry-module)| Creates ACR for k8s cluster. **Currently not used**|

## Description

Expand All @@ -37,7 +36,7 @@ Hold variables for naming resources created by this module.

Output values four resource group, storage account and storate container.

## Storage resource group module
## Storage resource group

This modules creates separate resource group for persistent volume claim.

Expand All @@ -51,23 +50,6 @@ Establish azurerm backend with previously set naming for tfstate files, and crea

Output value of created resource group's id.

## Contrainer registry module

**NOT USED**

### `main.tf`

Creates Azure Container registry in the same resource group as k8s modules.

Assigns acrpull role for k8s cluster
### `variables.tf`

Variables for naming resources.

### `outputs.tf`

Output values for ACR. Containing id, login url, username and password.


## Hono service stack module

Expand Down Expand Up @@ -109,6 +91,8 @@ Adds helm charts that bootstrap an Ambassador deployment on the k8s cluster usin
#### `module "jaeger"`
Adds helm charts that bootstrap a Jaeger deployment on the k8s cluster using the Helm package manager.

#### `module "kafka"`
Adds helm charts that bootstrap a Kafka cluster on the k8s cluster using the Helm package manager.

### `variables.tf`

Expand Down Expand Up @@ -297,3 +281,20 @@ Deploys jaeger-operator, and is configured with values from `jaeger_values.yaml`
### `values.yaml`

Jaeger is enabled with simple metadata.

## Contrainer registry module

**NOT USED**

### `main.tf`

Creates Azure Container registry in the same resource group as k8s modules.

Assigns acrpull role for k8s cluster
### `variables.tf`

Variables for naming resources.

### `outputs.tf`

Output values for ACR. Containing id, login url, username and password.

0 comments on commit cb2182d

Please sign in to comment.