Skip to content

Commit

Permalink
0.1.1 (#4)
Browse files Browse the repository at this point in the history
* Updating documentation and minor bugfixes
  • Loading branch information
petewilcock authored Jun 19, 2021
1 parent e614143 commit 5a2c157
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .header.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,48 @@ resource "null_resource" "update_nameservers" {
}
```
See [examples](docs/examples) for full set-up example.

## Launching container, customize Wordpress and publish static site

Check that the CodeBuild job for the container has built successfully.

Toggle the `launch` value of the module to 1, and re-run Terraform plan/apply, which will launch the instance of the
Wordpress management container.

First-time launch of container will take 5-6 minutes as the installation of Wordpress completes. You can
check status if you wish in CloudWatch log groups for ECS. It will come up within a few seconds on subsequent launches.

The Wordpress management container will become available at http://wordpress.yourdomain.com (note HTTP, not HTTPS) by
default, unless you specified your own `wordpress_subdomain` prefix.

Default admin is: supervisor
Default password: techtospeech.com

Change these on first log in or specify your own in module instantiation.

You will find WP2Static with S3 Add-on installed. Go to the WP2Static Menu->Addons, and click the 'Disabled' button to
Enable the Add-on.

The configuration of the plugin has been set up such that no additional configuration is required unless you wish to
change any options.

You may now edit Wordpress as you would normally, customize your site as you like, and when ready proceed to the 'Run'
section of the WP2Static plugin, and click the 'Generate Static Site' button. This will take some minutes depending on
the size of your site. When complete the site will be published in S3, and available via the public URL configured
in your module definition.

Gentle reminder that no backup options are currently bundled with this module - the most effective means would be to
generate and retain a backup from within Wordpress for maximum flexibility. We recommend the UpdraftPlus plugin.

## Troubleshooting

If you experience issues with the publish element of WP2Static, you can retry. It can be more reliable to proceed to
'Caches' section and select to delete all caches. Currently you need to additionally delete the S3 deploy cache manually.

You should also try increasing the CPU/Memory allocated to the container. Undersizing the container can cause timeout
issues that are currently not well handled in the plugin.

If the job fails immediately and your site has previously generated a sitemaps.xml file, ensure you restore the plugin
that generates this file and the crawl job can fail fast if it cannot locate it. For all other features and issues
relating to WP2Static, [raise an issue on their repo](https://github.com/leonstafford/wp2static/issues).
For any issues relating to this module, [raise an issue against this repo.](https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues)
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.1.1 - 19th June 2021

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

## 0.1.0 - 19th June 2021

Expand Down
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,56 @@ resource "null_resource" "update_nameservers" {
```
See [examples](docs/examples) for full set-up example.

## Launching container, customize Wordpress and publish static site

Check that the CodeBuild job for the container has built successfully.

Toggle the `launch` value of the module to 1, and re-run Terraform plan/apply, which will launch the instance of the
Wordpress management container.

First-time launch of container will take 5-6 minutes as the installation of Wordpress completes. You can
check status if you wish in CloudWatch log groups for ECS. It will come up within a few seconds on subsequent launches.

The Wordpress management container will become available at http://wordpress.yourdomain.com (note HTTP, not HTTPS) by
default, unless you specified your own `wordpress_subdomain` prefix.

Default admin is: supervisor
Default password: techtospeech.com

Change these on first log in or specify your own in module instantiation.

You will find WP2Static with S3 Add-on installed. Go to the WP2Static Menu->Addons, and click the 'Disabled' button to
Enable the Add-on.

The configuration of the plugin has been set up such that no additional configuration is required unless you wish to
change any options.

You may now edit Wordpress as you would normally, customize your site as you like, and when ready proceed to the 'Run'
section of the WP2Static plugin, and click the 'Generate Static Site' button. This will take some minutes depending on
the size of your site. When complete the site will be published in S3, and available via the public URL configured
in your module definition.

Gentle reminder that no backup options are currently bundled with this module - the most effective means would be to
generate and retain a backup from within Wordpress for maximum flexibility. We recommend the UpdraftPlus plugin.

## Troubleshooting

If you experience issues with the publish element of WP2Static, you can retry. It can be more reliable to proceed to
'Caches' section and select to delete all caches. Currently you need to additionally delete the S3 deploy cache manually.

You should also try increasing the CPU/Memory allocated to the container. Undersizing the container can cause timeout
issues that are currently not well handled in the plugin.

If the job fails immediately and your site has previously generated a sitemaps.xml file, ensure you restore the plugin
that generates this file and the crawl job can fail fast if it cannot locate it. For all other features and issues
relating to WP2Static, [raise an issue on their repo](https://github.com/leonstafford/wp2static/issues).
For any issues relating to this module, [raise an issue against this repo.](https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues)

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_ecs_cpu"></a> [ecs\_cpu](#input\_ecs\_cpu) | The CPU limit password to the Wordpress container definition. | `number` | `256` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/codebuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This module sets up the build to take a vanilla Wordpress image and bake customi

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <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 |
| <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 |
| <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 |
| <a name="input_container_memory"></a> [container\_memory](#input\_container\_memory) | The memory allocated to the container (in MB) | `number` | n/a | yes |
| <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 |
Expand Down
2 changes: 1 addition & 1 deletion modules/codebuild/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ variable "wordpress_ecr_repository" {
}

variable "aws_account_id" {
type = number
type = string
description = "The AWS account ID into which resources will be launched."
}

Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ variable "subnet_ids" {
}

variable "aws_account_id" {
type = number
type = string
description = "The AWS account ID into which resources will be launched."
}

Expand Down

0 comments on commit 5a2c157

Please sign in to comment.