Commit Graph

49 Commits

Author SHA1 Message Date
Chris Marusich 170faaa81d
cdn: README.org: Explain that the CDN is disabled. 2019-08-15 00:21:32 -07:00
Chris Marusich 582f5d7881
cdn: Disable the CDN.
* cdn/terraform/cloudfront.tf (charlie-distribution) <enabled>: Change
to false.
2019-07-31 19:44:27 -07:00
Chris Marusich bf5bbce7ed
cdn: Update billing alarms.
* cdn/terraform/cloudwatch.tf (alarm-estimated-charges-185-usd)
(alarm-estimated-charges-200-usd, alarm-estimated-charges-285-usd)
(alarm-estimated-charges-300-usd): Remove these alarms...
(alarm-estimated-charges-340-usd): ...and add this one.
2019-07-07 15:31:20 -07:00
Chris Marusich 45f61e0153
cdn: Enable the CDN.
* cdn/terraform/cloudfront.tf (charlie-distribution) <enabled>: Change
to true.
2019-06-01 00:23:24 -07:00
Chris Marusich 360c3e18c5
cdn: Disable the CDN.
* cdn/terraform/cloudfront.tf (charlie-distribution) <enabled>: Change
to false.
2019-05-17 23:13:03 -07:00
Chris Marusich 253a178a3a
cdn: Change charlie's origin to ci.guix.info.
Now that ci.guix.info points directly to berlin, we can avoid
depending on the guixsd.org zone by using ci.guix.info as the origin.

* cdn/terraform/cloudfront.tf (locals) <default_behavior>
<do_not_cache_behavior>: Change target_origin_id to "ci.guix.info".
2019-05-04 02:24:54 -07:00
Chris Marusich c95b77c0ea
cdn: Update the README.org file.
* cdn/README.org (ACM Certificate Validation): Update a stale
reference to berlin-mirror-certificate so it refers to
charlie-certificate instead.
2019-05-04 02:05:14 -07:00
Chris Marusich 8accbde744
cdn: Remove unused berlin-mirror-certificate.
The berlin-mirror-certificate ACM certificate is safe to delete, since
it was only used by the berlin-mirror CloudFront distribution, which
has already been removed.

* cdn/terraform/acm.tf (berlin-mirror-certificate): Remove it.
2019-05-04 01:45:14 -07:00
Chris Marusich 9e804142b1
cdn: Remove unused berlin-mirror.
The berlin-mirror CloudFront distribution is safe to delete because it
is not currently being used.  The charlie-distribution CloudFront
distribution has replaced it.

* cdn/terraform/cloudfront.tf (berlin-mirror, berlin-mirror-id)
(berlin-mirror-enabled, berlin-mirror-status)
(berlin-mirror-domain-name): Remove these.
2019-05-04 01:44:33 -07:00
Chris Marusich c71c5286c1
cdn: Add a distribution for ci.guix.gnu.org.
* cdn/terraform/cloudfront.tf (charlie-distribution): New resource.
(charlie-distribution-id, charlie-distribution-enabled)
(charlie-distribution-status, charlie-distribution-domain-name): New
outputs.
2019-05-01 15:43:17 -07:00
Chris Marusich 2c4d28aeee
cdn: Add an ACM certificate for ci.guix.gnu.org.
* cdn/terraform/acm.tf (charlie-certificate): New resource.
2019-04-28 23:05:46 -07:00
Chris Marusich d15e6576eb
cdn: Move SNS configuration into its own file.
* cdn/terraform/acm.tf (guix-billing-alarms): Move this resource...
* cdn/terraform/sns.tf: into this new file.
2019-04-28 23:05:46 -07:00
Chris Marusich 0e9ee9cd43
cdn: Fix "info-guix" email address in README.org.
* cdn/README.org: Replace "info@guix" with the actual email address,
which is info-guix@gnu.org.
2019-04-25 23:54:28 -07:00
Chris Marusich 07194bd81d
cdn: Enable the CDN.
Note that this only turns on the CloudFront distribution.  It does not
cause client requests to be sent to the distribution.  That will only
happen after we flip the DNS record for ci.guix.info, also.

* cdn/terraform/cloudfront.tf (berlin-mirror) <enabled>: Change to true.
2019-04-25 23:54:22 -07:00
Chris Marusich 7246051d3c
cdn: Add output to show whether CDN is enabled.
* cdn/terraform/cloudfront.tf (berlin-mirror-enabled): New output.
2019-04-21 17:53:05 -07:00
Chris Marusich ae12095163
cdn: Update billing alarms.
* cdn/terraform/cloudwatch.tf (alarm-estimated-charges-150-usd)
(alarm-estimated-charges-140-usd, alarm-estimated-charges-100-usd)
(alarm-free-tier-exceeded): Remove these alarms...
(alarm-estimated-charges-300-usd, alarm-estimated-charges-285-usd)
(alarm-estimated-charges-200-usd, alarm-estimated-charges-185-usd):
...and add these.
2019-04-21 17:44:41 -07:00
Chris Marusich 5ad1f66c63
cdn: Update the README.org file.
* cdn/README.org: Fix/remove various stale statements.
2019-04-21 17:32:21 -07:00
Chris Marusich 90d0988573
cdn: Disable the CDN.
This is safe to do because at the time of this change, the
ci.guix.info DNS entry was not pointing at the CloudFront
distribution, and nobody was using the CloudFront distribution.

* cdn/terraform/cloudfront.tf (berlin-mirror) <enabled>: Change to
false.
2019-02-24 23:09:56 -08:00
Chris Marusich 1d8a7c1616
cdn: Cache Cuirass's static resources.
* cdn/terraform/cloudfront.tf (berlin-mirror)
<ordered_cache_behavior>: Add a cache behavior for paths matching the
pattern "/static/*".
2019-01-17 21:31:27 -08:00
Chris Marusich ba5026796c
cdn: Update README.org.
* cdn/README.org: Explain how to check the bill using the AWS CLI.
2019-01-11 23:08:55 -08:00
Chris Marusich 38366d17e8
cdn: Remove guix-empty-bucket.
* cdn/terraform/s3.tf (guix-empty-bucket): Remove it.
2019-01-11 23:08:55 -08:00
Chris Marusich a3166ddcf8
cdn: Change default behavior to not cache.
* cdn/terraform/cloudfront.tf (locals) <do_not_cache_behavior>: New
variable.
(berlin-mirror) <default_cache_behavior>: Use the new
do_not_cache_behavior.
(origin) <empty-origin>: Remove it.
* cdn/README.org: Remove the section explaining that Cuirass will no
longer be accessible via ci.guix.info.
2019-01-11 23:08:52 -08:00
Chris Marusich 0adacfcf43
cdn: Update the deployment plan in README.org.
* cdn/README.org (Deployment Plan): Update it.
2019-01-08 01:49:27 -08:00
Chris Marusich 4e7e971040
cdn: Only accept requests for substitutes.
* cdn/terraform/cloudfront.tf (locals) <default_behavior>: New
variable.
(berlin-mirror) <origin>: Add empty-origin, pointing to
guix-empty-bucket.
<default_cache_behavior>: Update its target_origin_id to point to the
empty-origin.
<ordered_cache_behavior>: New field.  Add one behavior for each
substitute-related path published by "guix publish".
* cdn/terraform/s3.tf (guix-empty-bucket): New bucket.
2019-01-05 19:29:00 -08:00
Chris Marusich 1540978fda
cdn: Move service configs into individual files.
* cdn/terraform/main.tf: Remove all service-specific configuration.
* cdn/terraform/acm.tf: New file.
* cdn/terraform/cloudfront.tf: New file.
* cdn/terraform/cloudwatch.tf: New file.
* cdn/terraform/dynamodb.tf: New file.
* cdn/terraform/iam.tf: New file.
* cdn/terraform/s3.tf: New file.
2019-01-05 15:53:02 -08:00
Chris Marusich 43b1e2353f
cdn: Add a minor comment.
* cdn/terraform/main.tf: Label the start of the IAM configuration with
a comment.
2019-01-04 23:56:14 -08:00
Chris Marusich ce210ea35d
cdn: Update the README.org.
* cdn/README.org: Update many parts of it.
2019-01-04 23:42:48 -08:00
Chris Marusich 03121abf87
cdn: Update README.org.
* cdn/README.org: Add an overview and clean up some sections.
2019-01-04 01:13:35 -08:00
Chris Marusich f584a1f3a8
cdn: Increase Terraform state retention period.
* cdn/terraform/main.tf (guix-terraform-state) <lifecycle_rule>:
Update abort_incomplete_multipart_upload_days to 7 and
noncurrent_version_expiration to 14 days.
2019-01-04 00:05:47 -08:00
Chris Marusich fd899edad3
cdn: Hard-code the region to us-east-1.
* cdn/terraform/main.tf (provider) <region>: New field.  Set it to
us-east-1.
(guix-terraform-state) <region>: Remove it.
2019-01-04 00:05:47 -08:00
Chris Marusich 2a6a274122
cdn: Remove a stale comment from README.org
* cdn/README.org (Next steps): Remove a stale comment.
2018-12-29 19:47:26 -08:00
Chris Marusich 5e0890def9
cdn: Remove "set up locking" from README.org.
* cdn/README.org (Next steps): Remove "set up locking" because we've
set it up.
2018-12-29 19:31:44 -08:00
Chris Marusich 75aa4ee1d4
cdn: Enable locking in the S3 backend.
* cdn/terraform/main.tf (terraform-locking): New table.
(terraform) <dynamodb_table>: Use it to perform locking.
2018-12-29 19:26:41 -08:00
Chris Marusich 017e25ef71
cdn: Add another Terraform benefit to README.org.
* cdn/README.org (Avoiding "Service as a Software Substitute"):
Mention that Terraform also helps to avoid vendor lock-in.
2018-12-29 19:21:31 -08:00
Chris Marusich 0796267b6b
cdn: Alarm when we start paying money.
* cdn/terraform/main.tf (alarm-free-tier-exceeded): New alarm.
2018-12-29 12:59:03 -08:00
Chris Marusich 5b68c2fc3f
cdn: Add an example command to the README.org.
* cdn/README.org (Process) <General>: Add an example command.
2018-12-28 23:04:05 -08:00
Chris Marusich a84019c594
cdn: Add billing alarms.
* cdn/README.org: Mention that Terraform does not support email
subscriptions to SNS topics.
* cdn/terraform/main.tf (guix-billing-alarms): New SNS topic.
(alarm-estimated-charges-150-usd, alarm-estimated-charges-140-usd)
(alarm-estimated-charges-100-usd): New alarms.
2018-12-28 23:04:05 -08:00
Chris Marusich ddc2420c6f
cdn: Allow clients to use both HTTP and HTTPS.
* cdn/terraform/main.tf (berlin-mirror) <viewer_protocol_policy>:
Change to "allow-all".
2018-12-28 23:04:05 -08:00
Chris Marusich 5a8cf18447
cdn: Provision a TLS certificate for ci.guix.info.
* cdn/README.org: Mention that certificate validation requires manual
action outside of Terraform.
* cdn/terraform/main.tf (berlin-mirror-certificate): New certificate.
(berlin-mirror): Use it with SNI in the CloudFront distribution.
2018-12-28 23:04:04 -08:00
Chris Marusich a130bda64c
cdn: Switch default region to us-east-1.
Before doing this, I destroyed all Terraform-managed AWS resources and
locally stored Terraform state, so we can rebuild it fresh.

* cdn/README.org: Update us-west-2 references to us-east-1.
* cdn/terraform/main.tf (terraform, guix-terraform-state): Likewise.
2018-12-28 23:04:04 -08:00
Chris Marusich b4eee7c69b
cdn: Add a basic deployment plan to the README.org
* cdn/README.org: Discuss the deployment plan.
2018-12-28 23:04:04 -08:00
Chris Marusich 5129c65178
cdn: Add a lifecycle policy to the state bucket.
* cdn/terraform/main.tf (guix-terraform-state) <lifecycle_rule>: New
lifecycle rule.
2018-12-28 23:04:04 -08:00
Chris Marusich 01189233b6
cdn: Use Terraform's S3 backend.
* cdn/terraform/main.tf (terraform): New object, with an s3 backend.
* cdn/README.org: Update accordingly.
2018-12-28 23:04:04 -08:00
Chris Marusich 03cff9ec02
cdn: Add an S3 bucket to hold Terraform state.
* cdn/terraform/main.tf (guix-terraform-state): New bucket.
* cdn/README.org: Add more documentation.
2018-12-28 23:04:04 -08:00
Chris Marusich d3600c75b9
cdn: Add a CloudFront distribution fronting berlin.
This is not the final version, but it gives us a good starting point.

* cdn/terraform/main.tf (berlin-mirror): New resource.
(berlin-mirror-id, berlin-mirror-status, berlin-mirror-domain-name):
New outputs.
* cdn/README.org: Update accordingly.
2018-12-28 23:04:03 -08:00
Chris Marusich 1204bc3d45
cdn: Do not hard-code the profile name.
* cdn/terraform/main.tf (provider) <profile>: Remove it.
2018-12-28 23:04:03 -08:00
Chris Marusich 7680ddf06c
cdn: Add thoughts about next steps to README.
* cdn/README.org (Next steps): New section.
2018-12-28 23:04:03 -08:00
Chris Marusich 0efa3d77a4
cdn: Give Ludo and Ricardo administrative access.
* cdn/terraform/main.tf (civodul, rekado): New users.
(administrators-membership): Add civodul and rekado as members of the
administrators group.
(civodul-access-key-1, rekado-access-key-1) New access keys.
(civodul-login-profile, rekado-login-profile): New login profiles.
(civodul-name, civodul-password, civodul-access-key-1-id)
(civodul-access-key-1-secret, rekado-name, rekado-password)
(rekado-access-key-1-id, rekado-access-key-1-secret): New outputs.
* cdn/terraform/variables.tf (pgp_key_civodul, pgp_key_rekado): New
variables.
2018-12-28 23:04:03 -08:00
Chris Marusich 176631a416
cdn: Initial commit of Terraform configuration.
* .gitignore (/cdn/terraform/terraform.tfstate)
(/cdn/terraform/terraform.tfstate.backup, /cdn/terraform/.terraform):
New ignore patterns.
* cdn/README.org: New file.
* cdn/terraform/main.tf: New file.
* cdn/terraform/variables.tf: New file.
2018-12-28 23:04:03 -08:00