web-platform-tests / wpt.live

A live version of the web-platform-tests project
https://wpt.live/
15 stars 11 forks source link

Stabilize the wpt-live cert renewal process #77

Closed jcscottiii closed 11 months ago

jcscottiii commented 1 year ago

There have been multiple instances of when the certificate renewal fails as reported in #57.

This issue serves to track the work to do if we want to re-work it to stabilize the process.

Option 1 is the preferred option. But option 2 is available as a short term option.

Option 1: Use a Load Balancer and let the load balancer automatically renew the certificate

Currently, there is a TCP load balancer used (not in the diagram on the README page). Cert renewals have to be managed by the team as a result when using a TCP load balancer. There are now HTTPS load balancers that renew the certificate automatically.

Docs: https://cloud.google.com/load-balancing/docs/https/setup-global-ext-https-serverless

*Google Managed Certificates*                               *GitHub*
      |                                                     |
[TLS certificate auto renewed]                      [WPT source code]
      |                                   .------------.    |
      V                               .-->| wpt server |<---+
.--------------.                      |   '------------'    |
| GCP HTTPS LB |---------------------->                     |
'--------------'                      |   .------------.    |
                                      '-->| wpt server |<---'
                                          '------------'
Legend
                    .---.               +++++
*   * external      |   | GCE           +   + object     [   ] message
      service       '---' instance      +++++ store            contents

Steps:

Pros:

Cons:

Option 2 - Migrate to Cert Renewal Process to a cron job in Cloud Run

The Cert Renewal Process is already in a Dockerfile. This makes it easy to convert to Cloud Run which can run Docker images that run on a schedule. Docs.

*Let's Encrypt*                                         *GitHub*
      |                                                     |
[TLS certificate]                                   [WPT source code]
      |                                   .------------.    |
      V                               .-->| wpt server |<---+
.--------------.    +++++++++++++++   |   '------------'    |
| cert-renewer |--->+ certificate +---+                     |
'--------------'    +    store    +   |   .------------.    |
                    +++++++++++++++   '-->| wpt server |<---'
                                          '------------'
Legend
                    .---.               +++++
*   * external      |   | GCE           +   + object     [   ] message
      service       '---' instance      +++++ store            contents

*Note It's the same architecture as the current one in the README

Steps:

Pros:

Cons: