Skip to content

Commit 5a2c157

Browse files
authored
0.1.1 (#4)
* Updating documentation and minor bugfixes
1 parent e614143 commit 5a2c157

File tree

6 files changed

+95
-4
lines changed

6 files changed

+95
-4
lines changed

.header.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,48 @@ resource "null_resource" "update_nameservers" {
159159
}
160160
```
161161
See [examples](docs/examples) for full set-up example.
162+
163+
## Launching container, customize Wordpress and publish static site
164+
165+
Check that the CodeBuild job for the container has built successfully.
166+
167+
Toggle the `launch` value of the module to 1, and re-run Terraform plan/apply, which will launch the instance of the
168+
Wordpress management container.
169+
170+
First-time launch of container will take 5-6 minutes as the installation of Wordpress completes. You can
171+
check status if you wish in CloudWatch log groups for ECS. It will come up within a few seconds on subsequent launches.
172+
173+
The Wordpress management container will become available at http://wordpress.yourdomain.com (note HTTP, not HTTPS) by
174+
default, unless you specified your own `wordpress_subdomain` prefix.
175+
176+
Default admin is: supervisor
177+
Default password: techtospeech.com
178+
179+
Change these on first log in or specify your own in module instantiation.
180+
181+
You will find WP2Static with S3 Add-on installed. Go to the WP2Static Menu->Addons, and click the 'Disabled' button to
182+
Enable the Add-on.
183+
184+
The configuration of the plugin has been set up such that no additional configuration is required unless you wish to
185+
change any options.
186+
187+
You may now edit Wordpress as you would normally, customize your site as you like, and when ready proceed to the 'Run'
188+
section of the WP2Static plugin, and click the 'Generate Static Site' button. This will take some minutes depending on
189+
the size of your site. When complete the site will be published in S3, and available via the public URL configured
190+
in your module definition.
191+
192+
Gentle reminder that no backup options are currently bundled with this module - the most effective means would be to
193+
generate and retain a backup from within Wordpress for maximum flexibility. We recommend the UpdraftPlus plugin.
194+
195+
## Troubleshooting
196+
197+
If you experience issues with the publish element of WP2Static, you can retry. It can be more reliable to proceed to
198+
'Caches' section and select to delete all caches. Currently you need to additionally delete the S3 deploy cache manually.
199+
200+
You should also try increasing the CPU/Memory allocated to the container. Undersizing the container can cause timeout
201+
issues that are currently not well handled in the plugin.
202+
203+
If the job fails immediately and your site has previously generated a sitemaps.xml file, ensure you restore the plugin
204+
that generates this file and the crawl job can fail fast if it cannot locate it. For all other features and issues
205+
relating to WP2Static, [raise an issue on their repo](https://github.com/leonstafford/wp2static/issues).
206+
For any issues relating to this module, [raise an issue against this repo.](https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 0.1.1 - 19th June 2021
44

55
Bugfix: Refactor md5 calculation on archive_file in codebuild child module.
6+
Bugfix: Re-typed AWS account number as string to avoid rounding on account numbers prepended with zeros.
67

78
## 0.1.0 - 19th June 2021
89

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,56 @@ resource "null_resource" "update_nameservers" {
161161
```
162162
See [examples](docs/examples) for full set-up example.
163163

164+
## Launching container, customize Wordpress and publish static site
165+
166+
Check that the CodeBuild job for the container has built successfully.
167+
168+
Toggle the `launch` value of the module to 1, and re-run Terraform plan/apply, which will launch the instance of the
169+
Wordpress management container.
170+
171+
First-time launch of container will take 5-6 minutes as the installation of Wordpress completes. You can
172+
check status if you wish in CloudWatch log groups for ECS. It will come up within a few seconds on subsequent launches.
173+
174+
The Wordpress management container will become available at http://wordpress.yourdomain.com (note HTTP, not HTTPS) by
175+
default, unless you specified your own `wordpress_subdomain` prefix.
176+
177+
Default admin is: supervisor
178+
Default password: techtospeech.com
179+
180+
Change these on first log in or specify your own in module instantiation.
181+
182+
You will find WP2Static with S3 Add-on installed. Go to the WP2Static Menu->Addons, and click the 'Disabled' button to
183+
Enable the Add-on.
184+
185+
The configuration of the plugin has been set up such that no additional configuration is required unless you wish to
186+
change any options.
187+
188+
You may now edit Wordpress as you would normally, customize your site as you like, and when ready proceed to the 'Run'
189+
section of the WP2Static plugin, and click the 'Generate Static Site' button. This will take some minutes depending on
190+
the size of your site. When complete the site will be published in S3, and available via the public URL configured
191+
in your module definition.
192+
193+
Gentle reminder that no backup options are currently bundled with this module - the most effective means would be to
194+
generate and retain a backup from within Wordpress for maximum flexibility. We recommend the UpdraftPlus plugin.
195+
196+
## Troubleshooting
197+
198+
If you experience issues with the publish element of WP2Static, you can retry. It can be more reliable to proceed to
199+
'Caches' section and select to delete all caches. Currently you need to additionally delete the S3 deploy cache manually.
200+
201+
You should also try increasing the CPU/Memory allocated to the container. Undersizing the container can cause timeout
202+
issues that are currently not well handled in the plugin.
203+
204+
If the job fails immediately and your site has previously generated a sitemaps.xml file, ensure you restore the plugin
205+
that generates this file and the crawl job can fail fast if it cannot locate it. For all other features and issues
206+
relating to WP2Static, [raise an issue on their repo](https://github.com/leonstafford/wp2static/issues).
207+
For any issues relating to this module, [raise an issue against this repo.](https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues)
208+
164209
## Inputs
165210

166211
| Name | Description | Type | Default | Required |
167212
|------|-------------|------|---------|:--------:|
168-
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS account ID into which resources will be launched. | `number` | n/a | yes |
213+
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS account ID into which resources will be launched. | `string` | n/a | yes |
169214
| <a name="input_cloudfront_aliases"></a> [cloudfront\_aliases](#input\_cloudfront\_aliases) | The domain and sub-domain aliases to use for the cloudfront distribution. | `list(any)` | `[]` | no |
170215
| <a name="input_cloudfront_class"></a> [cloudfront\_class](#input\_cloudfront\_class) | The [price class](https://aws.amazon.com/cloudfront/pricing/) for the distribution. One of: PriceClass\_All, PriceClass\_200, PriceClass\_100 | `string` | `"PriceClass_All"` | no |
171216
| <a name="input_ecs_cpu"></a> [ecs\_cpu](#input\_ecs\_cpu) | The CPU limit password to the Wordpress container definition. | `number` | `256` | no |

modules/codebuild/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This module sets up the build to take a vanilla Wordpress image and bake customi
77

88
| Name | Description | Type | Default | Required |
99
|------|-------------|------|---------|:--------:|
10-
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS account ID into which resources will be launched. | `number` | n/a | yes |
10+
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS account ID into which resources will be launched. | `string` | n/a | yes |
1111
| <a name="input_codebuild_bucket"></a> [codebuild\_bucket](#input\_codebuild\_bucket) | The name of the bucket used for codebuild of the image. | `string` | n/a | yes |
1212
| <a name="input_container_memory"></a> [container\_memory](#input\_container\_memory) | The memory allocated to the container (in MB) | `number` | n/a | yes |
1313
| <a name="input_main_vpc_id"></a> [main\_vpc\_id](#input\_main\_vpc\_id) | The VPC ID into which to launch resources. | `string` | n/a | yes |

modules/codebuild/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ variable "wordpress_ecr_repository" {
1818
}
1919

2020
variable "aws_account_id" {
21-
type = number
21+
type = string
2222
description = "The AWS account ID into which resources will be launched."
2323
}
2424

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ variable "subnet_ids" {
1313
}
1414

1515
variable "aws_account_id" {
16-
type = number
16+
type = string
1717
description = "The AWS account ID into which resources will be launched."
1818
}
1919

0 commit comments

Comments
 (0)