Skip to content

Commit

Permalink
revise README for all infra related
Browse files Browse the repository at this point in the history
  • Loading branch information
WeRockStar committed May 16, 2024
1 parent f5c0d78 commit 6a545e0
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 42 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ We have created the infrastructure by using Terraform. The infrastructure consis
- Waiting and enjoy your coffee
- Importantly, you need to destroy resources because it's not free 💰
- `terraform destroy`
- **Note**: You can see the [README.md](infra/iac/README.md) in the `infra` directory for more information

### Step 1: Fork the repository and setup Github Actions ✅
- Fork `workshop-summer` repository and name it as `workshop-summer-<GROUP_NO>-<BATCH_NO>` (e.g. `workshop-summer-group-1-b2`)
Expand Down
31 changes: 3 additions & 28 deletions infra/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
# GitOps and Infrastructure as Code
- [GitOps](gitops) - `ArgoCD` will sync the configuration from here
- [dev](gitops/dev) - Dev environment
- [prod](gitops/prod) - Prod environment
- [dev](gitops/dev) - `K8s` configuration for Dev environment
- [prod](gitops/prod) - `K8s` configuration for Prod environment
- **Secrets** - `K8s` secret, we've applied in `K8s` cluster
- [IaC](iac/README.md) - Use `Terraform` code for describe how infrastructure look like

<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

No modules.

## Resources

No resources.

## Inputs

No inputs.

## Outputs

No outputs.
<!-- END_TF_DOCS -->
30 changes: 16 additions & 14 deletions infra/iac/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# Infrastructure as Code
- [EKS](eks/README.md) - Create EKS cluster, ArgoCD, nginx ingress controller and external-dns
- [EKS](eks/README.md) - Create EKS cluster, Install ArgoCD, nginx ingress controller and external-dns
- [ArgoCD](argocd-app/README.md) - Create ArgoCD applications
- [SonarQube](sonarqube/README.md) - Create SonarQube server and mapping DNS to SonarQube
- DNS `sonarqube`: `sonarqube.werockstar.dev`
- We're still create project in SonarQube manually
- [Cloudflare](cloudflare/README.md) - Create Cloudflare DNS record for all group
- [RDS](rds/README.md) - Create RDS PostgreSQL database
- [VPC](vpc/README.md) - Create VPC, Subnets, Route Table, Internet Gateway, NAT Gateway, etc.
- Create Cloudflare all record for all group (Implemented in `eks` module)
- Dev
- `group-1-b1-dev`: `group-1-b1-dev.werockstar.dev`
- `group-2-b1-dev`: `group-2-b1-dev.werockstar.dev`
- `group-3-b1-dev`: `group-3-b1-dev.werockstar.dev`
- `group-4-b1-dev`: `group-4-b1-dev.werockstar.dev`
- `group-5-b1-dev`: `group-5-b1-dev.werockstar.dev`
- `group-1-b2-dev`: `group-1-b2-dev.werockstar.dev`
- `group-2-b2-dev`: `group-2-b2-dev.werockstar.dev`
- `group-3-b2-dev`: `group-3-b2-dev.werockstar.dev`
- `group-4-b2-dev`: `group-4-b2-dev.werockstar.dev`
- `group-5-b2-dev`: `group-5-b2-dev.werockstar.dev`
- Prod
- `group-1-b1-prod`: `group-1-b1-prod.werockstar.dev`
- `group-2-b1-prod`: `group-2-b1-prod.werockstar.dev`
- `group-3-b1-prod`: `group-3-b1-prod.werockstar.dev`
- `group-4-b1-prod`: `group-4-b1-prod.werockstar.dev`
- `group-5-b1-prod`: `group-5-b1-prod.werockstar.dev`
- `group-1-b2-prod`: `group-1-b2-prod.werockstar.dev`
- `group-2-b2-prod`: `group-2-b2-prod.werockstar.dev`
- `group-3-b2-prod`: `group-3-b2-prod.werockstar.dev`
- `group-4-b2-prod`: `group-4-b2-prod.werockstar.dev`
- `group-5-b2-prod`: `group-5-b2-prod.werockstar.dev`
- `group-0` is reserved for instructor
- `group-0-b1-dev`: `group-0-b1-dev.werockstar.dev`
- `group-0-b1-prod`: `group-0-b1-prod.werockstar.dev`
- `group-0-b2-dev`: `group-0-b2-dev.werockstar.dev`
- `group-0-b2-prod`: `group-0-b2-prod.werockstar.dev`

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down
63 changes: 63 additions & 0 deletions infra/iac/vpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.8.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.48.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.48.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_eip.nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource |
| [aws_internet_gateway.igw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway) | resource |
| [aws_nat_gateway.nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/nat_gateway) | resource |
| [aws_route_table.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
| [aws_route_table.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource |
| [aws_route_table_association.private-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_route_table_association.private-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_route_table_association.private-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_route_table_association.public-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_route_table_association.public-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_route_table_association.public-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource |
| [aws_subnet.private-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_subnet.private-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_subnet.private-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_subnet.public-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_subnet.public-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_subnet.public-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |
| [aws_vpc.vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | The name of cluster | `string` | n/a | yes |
| <a name="input_nat_name"></a> [nat\_name](#input\_nat\_name) | The name of the NAT Gateway | `string` | `"go-workshop-nat"` | no |
| <a name="input_vpc_name"></a> [vpc\_name](#input\_vpc\_name) | The name of VPC | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_igw_id"></a> [igw\_id](#output\_igw\_id) | n/a |
| <a name="output_nat_id"></a> [nat\_id](#output\_nat\_id) | n/a |
| <a name="output_subnet_private-1a"></a> [subnet\_private-1a](#output\_subnet\_private-1a) | n/a |
| <a name="output_subnet_private-1b"></a> [subnet\_private-1b](#output\_subnet\_private-1b) | n/a |
| <a name="output_subnet_private-1c"></a> [subnet\_private-1c](#output\_subnet\_private-1c) | n/a |
| <a name="output_subnet_public-1a"></a> [subnet\_public-1a](#output\_subnet\_public-1a) | n/a |
| <a name="output_subnet_public-1b"></a> [subnet\_public-1b](#output\_subnet\_public-1b) | n/a |
| <a name="output_subnet_public-1c"></a> [subnet\_public-1c](#output\_subnet\_public-1c) | n/a |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | n/a |
<!-- END_TF_DOCS -->

0 comments on commit 6a545e0

Please sign in to comment.