1
- # Terraform Kubernetes DrupalWxT
1
+ # Terraform Kubernetes for Drupal WxT
2
2
3
3
## Introduction
4
4
@@ -14,7 +14,7 @@ The following security controls can be met through configuration of this templat
14
14
15
15
* None
16
16
17
- ## Optional (depending on options configured):
17
+ ## Optional (depending on options configured)
18
18
19
19
* None
20
20
@@ -24,70 +24,86 @@ The following security controls can be met through configuration of this templat
24
24
module "helm_drupalwxt" {
25
25
source = "git::https://github.com/drupalwxt/terraform-kubernetes-drupalwxt.git"
26
26
27
- chart_version = "0.2.2 "
27
+ chart_version = "0.6.8 "
28
28
dependencies = [
29
- "${module.namespace_drupal.depended_on}",
29
+ module.namespace_drupal.depended_on,
30
+ module.drupal_database.depended_on,
30
31
]
31
32
32
- helm_service_account = "tiller"
33
- helm_namespace = "drupal"
34
- helm_repository = "drupalwxt"
35
-
36
- enable_azurefile = "${var.enable_azurefile}"
37
- azurefile_location_name = "${var.azurefile_location_name}"
38
- azurefile_storage_account_name = "${var.azurefile_storage_account_name}"
33
+ helm_namespace = "drupal"
34
+ helm_repository = "https://drupalwxt.github.io/helm-drupal"
39
35
40
36
values = <<EOF
41
37
ingress:
42
38
enabled: true
43
39
annotations:
44
- # kubernetes.io/ingress.class: nginx
45
- # kubernetes.io/tls-acme: "true"
40
+ kubernetes.io/ingress.class: nginx
41
+ kubernetes.io/tls-acme: "true"
46
42
kubernetes.io/ingress.class: istio
47
43
path: /*
48
44
hosts:
49
- - drupalwxt.${var.ingress_domain}
50
- tls: []
51
- # - secretName: chart-example-tls
52
- # hosts:
53
- # - chart-example.local
45
+ - drupal.${var.ingress_domain}
54
46
55
47
drupal:
48
+ ## Drupal image version
49
+ ## ref: https://hub.docker.com/drupalwxt/site-wxt/tags/
50
+ ##
51
+ image: drupalwxt/site-wxt
52
+
53
+ ## Note that by default we use appVersion to get image tag
56
54
tag: 4.0.0-rc3
57
55
56
+ ## Site configuration
57
+ ##
58
+ profile: wxt
59
+
60
+ siteName: Drupal Install Profile (WxT)
61
+
58
62
## User of the application
59
63
##
60
64
username: admin
61
65
62
66
## Application password
63
67
##
64
- password: Password2019
68
+ password: ${var.drupal_password}
65
69
66
70
# php-fpm healthcheck
67
71
# Requires https://github.com/renatomefi/php-fpm-healthcheck in the container.
68
72
# (note: official images do not contain this feature yet)
69
73
healthcheck:
70
74
enabled: true
71
75
72
- # Switch to canada.ca theme
76
+ # Switch to canada.ca theme (only used if install and/or reconfigure are enabled)
73
77
# Common options include: theme-wet-boew, theme-gcweb-legacy
74
78
wxtTheme: theme-gcweb
75
79
76
80
## Extra settings.php settings
77
81
##
78
- extraSettings: ''
82
+ extraSettings: |-
83
+ $settings['trusted_host_patterns'] = ['^drupal\.example\.ca$', '^drupalwxt-nginx$'];
84
+
85
+ ## Extra CLI scripts
86
+ ##
87
+ extraInstallScripts: ''
79
88
# |-
80
- # $settings['trusted_host_patterns'] = ['^example\.com$'];
89
+ # drush config-set system.performance js.preprocess 0 -y;
90
+ # drush config-set system.performance css.preprocess 0 -y;
81
91
82
- # Run the site install
92
+ # Install Drupal automatically
83
93
install: true
84
94
85
- # Run the default migrations
95
+ # Run migrations for default content
86
96
migrate: true
87
97
88
- # Reconfigure the site
98
+ # Reconfigure on upgrade
89
99
reconfigure: true
90
100
101
+ # php-fpm healthcheck
102
+ # Requires https://github.com/renatomefi/php-fpm-healthcheck in the container.
103
+ # (note: official images do not contain this feature yet)
104
+ healthcheck:
105
+ enabled: true
106
+
91
107
# Allows custom /var/www/html/sites/default/files and /var/www/private mounts
92
108
disableDefaultFilesMount: true
93
109
@@ -108,8 +124,20 @@ drupal:
108
124
- name: files-private
109
125
mountPath: /var/www/private
110
126
127
+ initContainers:
128
+ # Pre-create the media-icons folder
129
+ - name: init-media-icons-folder
130
+ image: alpine:3.10
131
+ command:
132
+ - mkdir
133
+ - -p
134
+ - /files/media-icons/generic
135
+ volumeMounts:
136
+ - name: files-public
137
+ mountPath: /files
138
+
111
139
nginx:
112
- tag: 4.0.0-rc3-nginx
140
+ tag: 4.0.0-rc3
113
141
114
142
# Set your cluster's DNS resolution service here
115
143
resolver: 10.0.0.10
@@ -125,67 +153,39 @@ nginx:
125
153
- name: files-public
126
154
mountPath: /var/www/html/sites/default/files
127
155
128
- mysql:
129
- imageTag: 5.7.28
156
+ external:
157
+ enabled: true
158
+ driver: pgsql
159
+ port: 5432
160
+ host: 127.0.0.1
161
+ database: drupal
162
+ user: ${module.drupal_database.administrator_login}@${module.drupal_database.name}
163
+ password: ${var.managed_postgresql_password}
164
+
165
+ files:
166
+ provider: none
130
167
131
- mysqlPassword: SUPERsecureMYSQLpassword
132
- mysqlRootPassword: SUPERsecureMYSQLrootPASSWORD
133
- persistence:
134
- enabled: true
135
- storageClass: managed-premium
136
- size: 256Gi
137
-
138
- # Custom mysql configuration files used to override default mysql settings
139
- configurationFiles:
140
- mysql.cnf: |-
141
- [mysqld]
142
- max_allowed_packet = 256M
143
- innodb_buffer_pool_size = 4096M
144
- innodb_buffer_pool_instances = 4
145
- table_definition_cache = 4096
146
- table_open_cache = 8192
147
- innodb_flush_log_at_trx_commit=2
148
-
149
- ##
150
- ## MINIO-ONLY EXAMPLE
151
- ##
152
168
minio:
153
169
enabled: false
154
170
155
- ##
156
- ## AZURE EXAMPLE
157
- ##
158
- # files:
159
- # cname:
160
- # enabled: true
161
- # hostname: wxt.blob.core.windows.net
162
- files:
163
- provider: none
171
+ mysql:
172
+ enabled: false
173
+
174
+ postgresql:
175
+ enabled: false
176
+ pgbouncer:
177
+ enabled: true
178
+ host: ${module.drupal_database.name}.postgres.database.azure.com
179
+ user: ${module.drupal_database.administrator_login}@${module.drupal_database.name}
180
+ password: ${var.managed_postgresql_password}
181
+ poolSize: 25
182
+ maxClientConnections: 500
164
183
165
- # minio:
166
- # clusterDomain: cluster.cumulonimbus.zacharyseguin.ca
167
- # # Enable the Azure Gateway mode
168
- # azuregateway:
169
- # enabled: true
170
-
171
- # # Access Key should be set to the Azure Storage Account name
172
- # # Secret Key should be set to the Azure Storage Account access key
173
- # accessKey: STORAGE_ACCOUNT_NAME
174
- # secretKey: STORAGE_ACCOUNT_ACCESS_KEY
175
-
176
- # # Disable creation of default bucket.
177
- # # You should pre-create the bucket in Azure.
178
- # defaultBucket:
179
- # enabled: false
180
- # name: wxt
181
-
182
- # # We want a cluster ip assigned
183
- # service:
184
- # clusterIP: ''
185
-
186
- # # We don't need a persistent volume, since it's stored in Azure
187
- # persistence:
188
- # enabled: false
184
+ redis:
185
+ enabled: true
186
+
187
+ varnish:
188
+ enabled: true
189
189
EOF
190
190
}
191
191
```
196
196
| -------------------- | ------ | -------- | --------------------------------------------------- |
197
197
| chart_version | string | yes | Version of the Helm Chart |
198
198
| dependencies | string | yes | Dependency name refering to namespace module |
199
- | helm_service_account | string | yes | The service account for Helm to use |
200
199
| helm_namespace | string | yes | The namespace Helm will install the chart under |
201
200
| helm_repository | string | yes | The repository where the Helm chart is stored |
202
201
| values | list | no | Values to be passed to the Helm Chart |
205
204
206
205
| Date | Release | Change |
207
206
| -------- | ---------- | ---------------------------------------------------------- |
208
- | 20190729 | 20190729.1 | Improvements to documentation and formatting |
209
207
| 20190909 | 20190909.1 | 1st release |
208
+ | 20191220 | 20191220.1 | Updates to specification as Azure File is now in chart |
0 commit comments