Skip to content

Commit 2a1adb3

Browse files
committed
structure of the repository
1 parent a2ec53f commit 2a1adb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+79
-3085
lines changed

README.md

Lines changed: 79 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,79 @@
1-
# GIS Apps Deployment
2-
3-
[![Terraform Deployment](https://github.com/ADORSYS-GIS/moodle-terraform/actions/workflows/checks.yaml/badge.svg)](https://github.com/ADORSYS-GIS/moodle-terraform/actions/workflows/checks.yaml)
4-
5-
## Non-Sensitive informations
6-
7-
```bash
8-
#export TF_VAR_project_id="your_digital_ocean_token" ## Only if we wanna fix on this project
9-
export TF_VAR_org_id="your_digital_ocean_token"
10-
export TF_VAR_folder_id="your_digital_ocean_token"
11-
```
12-
13-
## Sensitive informations
14-
15-
```bash
16-
export TF_VAR_credentials="./dev.json"
17-
export TF_VAR_billing_account="some-secret"
18-
export TF_VAR_repository_username="some-secret"
19-
export TF_VAR_repository_password="some-secret"
20-
export TF_VAR_db_username="some-secret"
21-
export TF_VAR_db_password="some-secret"
22-
```
23-
24-
## Setup
25-
26-
1. **Backend config**: You'll need to have an external backend for better security.
27-
```bash
28-
export BACKEND_BUCKET_STATE="your-backend-bucket"
29-
export BACKEND_CREDENTIAL_FILE_PATH="./credentials.json"
30-
```
31-
32-
Then, run the following command to initialize the backend:
33-
```bash
34-
tf init -var-file=prod.tfvars \
35-
-backend-config="bucket=$BACKEND_BUCKET_STATE" \
36-
-backend-config="prefix=terraform/state" \
37-
-backend-config="credentials=$BACKEND_CREDENTIAL_FILE_PATH" \
38-
-reconfigure
39-
```
40-
41-
2. (Optional) First create the project. To do that, run the corresponding TF Module
42-
```bash
43-
tf apply -auto-approve -var-file=prod.tfvars -target=module.project
44-
```
45-
46-
3. Then create the repository. To do that, run the corresponding TF Module
47-
```bash
48-
tf apply -auto-approve -var-file=prod.tfvars
49-
```
50-
51-
52-
## Terraform modules
53-
54-
<!-- BEGIN_TF_DOCS -->
55-
## Requirements
56-
57-
| Name | Version |
58-
|------|---------|
59-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.8 |
60-
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 6.0 |
61-
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | ~> 6.0 |
62-
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | ~> 2.0 |
63-
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | ~> 2.0 |
64-
65-
## Providers
66-
67-
| Name | Version |
68-
|------|---------|
69-
| <a name="provider_google"></a> [google](#provider\_google) | 6.26.0 |
70-
71-
## Modules
72-
73-
| Name | Source | Version |
74-
|------|--------|---------|
75-
| <a name="module_db"></a> [db](#module\_db) | ./modules/db/ | n/a |
76-
| <a name="module_dns"></a> [dns](#module\_dns) | ./modules/dns/ | n/a |
77-
| <a name="module_helm"></a> [helm](#module\_helm) | ./modules/helm/ | n/a |
78-
| <a name="module_k8s"></a> [k8s](#module\_k8s) | ./modules/k8s/ | n/a |
79-
| <a name="module_project"></a> [project](#module\_project) | ./modules/project | n/a |
80-
| <a name="module_redis"></a> [redis](#module\_redis) | ./modules/redis/ | n/a |
81-
| <a name="module_storage"></a> [storage](#module\_storage) | ./modules/storage/ | n/a |
82-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | ./modules/vpc/ | n/a |
83-
84-
## Resources
85-
86-
| Name | Type |
87-
|------|------|
88-
| [google_client_config.default](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/client_config) | data source |
89-
90-
## Inputs
91-
92-
| Name | Description | Type | Default | Required |
93-
|------|-------------|------|---------|:--------:|
94-
| <a name="input_api_enabled_services"></a> [api\_enabled\_services](#input\_api\_enabled\_services) | The list of apis necessary for the project | `list(string)` | <pre>[<br/> "compute.googleapis.com",<br/> "gkehub.googleapis.com",<br/> "cloudresourcemanager.googleapis.com",<br/> "serviceusage.googleapis.com",<br/> "servicenetworking.googleapis.com",<br/> "cloudkms.googleapis.com",<br/> "logging.googleapis.com",<br/> "cloudbilling.googleapis.com",<br/> "iam.googleapis.com",<br/> "admin.googleapis.com",<br/> "storage-api.googleapis.com",<br/> "monitoring.googleapis.com",<br/> "securitycenter.googleapis.com",<br/> "billingbudgets.googleapis.com",<br/> "vpcaccess.googleapis.com",<br/> "dns.googleapis.com",<br/> "containerregistry.googleapis.com",<br/> "eventarc.googleapis.com",<br/> "run.googleapis.com",<br/> "container.googleapis.com",<br/> "dns.googleapis.com",<br/> "deploymentmanager.googleapis.com",<br/> "artifactregistry.googleapis.com",<br/> "cloudbuild.googleapis.com",<br/> "file.googleapis.com",<br/> "certificatemanager.googleapis.com",<br/> "domains.googleapis.com",<br/> "redis.googleapis.com"<br/>]</pre> | no |
95-
| <a name="input_billing_account"></a> [billing\_account](#input\_billing\_account) | Billing account id for the project | `string` | n/a | yes |
96-
| <a name="input_credentials"></a> [credentials](#input\_credentials) | File path to the credentials file. Keep in mind that the user or service account associated to this credentials file must have the necessary permissions to create the resources defined in this module. | `string` | n/a | yes |
97-
| <a name="input_db_password"></a> [db\_password](#input\_db\_password) | DB password | `string` | n/a | yes |
98-
| <a name="input_db_username"></a> [db\_username](#input\_db\_username) | DB username | `string` | n/a | yes |
99-
| <a name="input_environment"></a> [environment](#input\_environment) | n/a | `string` | n/a | yes |
100-
| <a name="input_folder_id"></a> [folder\_id](#input\_folder\_id) | Folder ID in the folder in which project | `string` | `null` | no |
101-
| <a name="input_gis_application_auth_secret"></a> [gis\_application\_auth\_secret](#input\_gis\_application\_auth\_secret) | GIS Application auth secret | `string` | n/a | yes |
102-
| <a name="input_gis_application_chart_version"></a> [gis\_application\_chart\_version](#input\_gis\_application\_chart\_version) | GIS Application Helm chart version | `string` | n/a | yes |
103-
| <a name="input_gis_application_dns_prefix"></a> [gis\_application\_dns\_prefix](#input\_gis\_application\_dns\_prefix) | GIS Application DNS prefix. Final DNS name will be <prefix>.<root\_domain\_name> | `string` | n/a | yes |
104-
| <a name="input_gis_application_oauth_client_id"></a> [gis\_application\_oauth\_client\_id](#input\_gis\_application\_oauth\_client\_id) | GIS Application OAuth client ID | `string` | n/a | yes |
105-
| <a name="input_gis_application_oauth_client_secret"></a> [gis\_application\_oauth\_client\_secret](#input\_gis\_application\_oauth\_client\_secret) | GIS Application OAuth client secret | `string` | n/a | yes |
106-
| <a name="input_iam_principals"></a> [iam\_principals](#input\_iam\_principals) | List of role (key) names to grant permissions to | `list(string)` | n/a | yes |
107-
| <a name="input_machine_type"></a> [machine\_type](#input\_machine\_type) | Machine type | `string` | n/a | yes |
108-
| <a name="input_name"></a> [name](#input\_name) | base name of this deployment | `string` | `"learn"` | no |
109-
| <a name="input_openai_key"></a> [openai\_key](#input\_openai\_key) | OpenAI application Secure Key | `string` | n/a | yes |
110-
| <a name="input_openai_url"></a> [openai\_url](#input\_openai\_url) | OpenAI provider url | `string` | n/a | yes |
111-
| <a name="input_org_id"></a> [org\_id](#input\_org\_id) | Google Organization ID | `string` | `null` | no |
112-
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The ID of the project where this VPC will be created | `string` | `""` | no |
113-
| <a name="input_region"></a> [region](#input\_region) | The region where to deploy resources | `string` | n/a | yes |
114-
| <a name="input_repository_password"></a> [repository\_password](#input\_repository\_password) | Helm chart Repository Password | `string` | n/a | yes |
115-
| <a name="input_repository_username"></a> [repository\_username](#input\_repository\_username) | Helm chart Repository Username | `string` | n/a | yes |
116-
| <a name="input_root_domain_name"></a> [root\_domain\_name](#input\_root\_domain\_name) | n/a | `string` | `"learn.adorsys.team"` | no |
117-
| <a name="input_sschool_auth_secret"></a> [sschool\_auth\_secret](#input\_sschool\_auth\_secret) | SSchool auth secret | `string` | n/a | yes |
118-
| <a name="input_sschool_chart_version"></a> [sschool\_chart\_version](#input\_sschool\_chart\_version) | SSchool Helm chart version | `string` | n/a | yes |
119-
| <a name="input_sschool_dns_prefix"></a> [sschool\_dns\_prefix](#input\_sschool\_dns\_prefix) | SSchool DNS prefix. Final DNS name will be <prefix>.<root\_domain\_name> | `string` | n/a | yes |
120-
| <a name="input_sschool_oauth_client_id"></a> [sschool\_oauth\_client\_id](#input\_sschool\_oauth\_client\_id) | SSchool OAuth client ID | `string` | n/a | yes |
121-
| <a name="input_sschool_oauth_client_secret"></a> [sschool\_oauth\_client\_secret](#input\_sschool\_oauth\_client\_secret) | SSchool OAuth client secret | `string` | n/a | yes |
122-
123-
## Outputs
124-
125-
| Name | Description |
126-
|------|-------------|
127-
| <a name="output_dns_ns"></a> [dns\_ns](#output\_dns\_ns) | The Zone NS |
128-
<!-- END_TF_DOCS -->
1+
graph TB
2+
subgraph "Project Root"
3+
A["📁 project-root"]
4+
end
5+
6+
subgraph "Infrastructure Layer"
7+
B["🏗️ terraform/"]
8+
B1["📦 modules/"]
9+
B2["🌍 environments/"]
10+
B1_1["networking"]
11+
B1_2["compute"]
12+
B1_3["storage"]
13+
B1_4["kubernetes"]
14+
B2_1["dev/"]
15+
B2_2["staging/"]
16+
B2_3["production/"]
17+
end
18+
19+
subgraph "Application Layer"
20+
C["📊 helm/"]
21+
C1["📋 charts/"]
22+
C2["🎯 values/"]
23+
C1_1["app-service"]
24+
C1_2["infrastructure"]
25+
end
26+
27+
subgraph "Documentation & Automation"
28+
D["📚 docs/"]
29+
E["🔧 scripts/"]
30+
F["⚙️ Config Files"]
31+
D1["terraform/"]
32+
D2["helm/"]
33+
D3["examples/"]
34+
F1[".gitignore"]
35+
F2[".pre-commit-config"]
36+
F3["Makefile"]
37+
end
38+
39+
A --> B
40+
A --> C
41+
A --> D
42+
A --> E
43+
A --> F
44+
45+
B --> B1
46+
B --> B2
47+
B1 --> B1_1
48+
B1 --> B1_2
49+
B1 --> B1_3
50+
B1 --> B1_4
51+
B2 --> B2_1
52+
B2 --> B2_2
53+
B2 --> B2_3
54+
55+
C --> C1
56+
C --> C2
57+
C1 --> C1_1
58+
C1 --> C1_2
59+
60+
D --> D1
61+
D --> D2
62+
D --> D3
63+
64+
B2_1 -.->|uses| B1
65+
B2_2 -.->|uses| B1
66+
B2_3 -.->|uses| B1
67+
68+
C1_1 -.->|deployed on| B1_4
69+
C1_2 -.->|deployed on| B1_4
70+
71+
E -.->|executes| B
72+
E -.->|executes| C
73+
74+
style A fill:#e1f5ff
75+
style B fill:#fff3e0
76+
style C fill:#f3e5f5
77+
style D fill:#e8f5e9
78+
style E fill:#fce4ec
79+
style F fill:#f1f8e9

charts/monitoring/Chart.lock

Lines changed: 0 additions & 18 deletions
This file was deleted.

charts/monitoring/Chart.yaml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)