Skip to content

Commit

Permalink
feat: add cymbal shop + cymbal bank deployment (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
caetano-colin authored Oct 22, 2024
1 parent 892eb49 commit be36dee
Show file tree
Hide file tree
Showing 215 changed files with 1,555 additions and 697 deletions.
9 changes: 9 additions & 0 deletions 2-multitenant/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,13 @@ apps = {
}
"acronym" = "cb",
}
"cymbal-shop" : {
"ip_address_names" : [
"cymbal-shop-frontend-ip",
]
"certificates" : {
"cymbal-shop-frontend-example-com" : ["cymbal-shop.frontend.example.com"]
}
"acronym" = "cs",
}
}
2 changes: 1 addition & 1 deletion 4-appfactory/envs/shared/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| applications | A map where the key is the application name, containing the configuration for each microservice under the application. Each microservice has the following properties:<br>- **admin\_project\_id** (Optional): Admin project associated with the microservice. This hosts microservice specific CI/CD pipelines. If set, `create_admin_project` must be `false`.<br>- **create\_infra\_project** (Required): Indicates whether an infrastructure project should be created for the microservice (one infra project will be created per environment defines in var.envs).<br>- **create\_admin\_project** (Required): Indicates whether a Admin project should be created for the microservice. | <pre>map(map(object({<br> admin_project_id = optional(string, null)<br> create_infra_project = bool<br> create_admin_project_id = bool<br> })))</pre> | n/a | yes |
| applications | A map where the key is the application name, containing the configuration for each microservice under the application. Each microservice has the following properties:<br>- **admin\_project\_id** (Optional): Admin project associated with the microservice. This hosts microservice specific CI/CD pipelines. If set, `create_admin_project` must be `false`.<br>- **create\_infra\_project** (Required): Indicates whether an infrastructure project should be created for the microservice (one infra project will be created per environment defines in var.envs).<br>- **create\_admin\_project** (Required): Indicates whether a Admin project should be created for the microservice. | <pre>map(map(object({<br> admin_project_id = optional(string, null)<br> create_infra_project = bool<br> create_admin_project = bool<br> })))</pre> | n/a | yes |
| billing\_account | Billing Account ID for application admin project resources. | `string` | n/a | yes |
| bucket\_force\_destroy | When deleting a bucket, this boolean option will delete all contained objects. If false, Terraform will fail to delete buckets which contain objects. | `bool` | `false` | no |
| bucket\_prefix | Name prefix to use for buckets created. | `string` | `"bkt"` | no |
Expand Down
6 changes: 3 additions & 3 deletions 4-appfactory/envs/shared/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ variable "applications" {
- **create_admin_project** (Required): Indicates whether a Admin project should be created for the microservice.
EOF
type = map(map(object({
admin_project_id = optional(string, null)
create_infra_project = bool
create_admin_project_id = bool
admin_project_id = optional(string, null)
create_infra_project = bool
create_admin_project = bool
})))

validation {
Expand Down
19 changes: 16 additions & 3 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ steps:
waitFor:
- appinfra-apply

- id: appsource-verify
- id: appsource-verify-cymbal-bank
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
Expand All @@ -148,12 +148,24 @@ steps:
]
waitFor:
- appinfra-apply

- id: appsource-verify-cymbal-shop
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"cft test run TestSourceCymbalShop --stage verify --verbose",
]
waitFor:
- appinfra-apply

- id: app-e2e
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
["/bin/bash", "-c", "cft test run TestAppE2E --stage verify --verbose"]
waitFor:
- appsource-verify
- appsource-verify-cymbal-bank
- id: appinfra-teardown
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
Expand All @@ -164,7 +176,8 @@ steps:
]
waitFor:
- app-e2e
- appsource-verify
- appsource-verify-cymbal-bank
- appsource-verify-cymbal-shop
- appinfra-verify
- appfactory-verify
- fleetscope-verify
Expand Down
25 changes: 0 additions & 25 deletions examples/cymbal-bank/4-appfactory/envs/shared/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions examples/cymbal-bank/4-appfactory/envs/shared/iam.tf

This file was deleted.

80 changes: 0 additions & 80 deletions examples/cymbal-bank/4-appfactory/envs/shared/main.tf

This file was deleted.

39 changes: 0 additions & 39 deletions examples/cymbal-bank/4-appfactory/envs/shared/outputs.tf

This file was deleted.

46 changes: 0 additions & 46 deletions examples/cymbal-bank/4-appfactory/envs/shared/remote.tf

This file was deleted.

Loading

0 comments on commit be36dee

Please sign in to comment.