You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/hosting.md
+25-13Lines changed: 25 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,28 +190,30 @@ After one or two docsites have succesfully used the new builder (see [wordpress.
190
190
### wpdocs
191
191
192
192
Staging:
193
-
* Follow [§ Create a new node](#create-a-new-node) for `wp-XX.stage`, follow special cases including:
194
-
* run `jq-tarsnap-keygen` for each of the new node names, before provisioning with Puppet.
195
-
* Switch DNS for `wpdocs-stage.svc.jquery.net`. This is done first instead of last, as otherwise the instance cannot acquire the [staging certificates](../hieradata/environments/staging/roles/docs/wordpress.yaml). For production we proxy via Cloudflare and require only a FQDN certificate.
196
-
* NOTE: Puppet automatically adds updates [builder nodes](#builder) to include all wpdocs hosts in the current environment (i.e. staging or production). This means the builder logs may temporarily contain errors if it tried to push content to a new node before it was ready.
193
+
* Follow [§ Create a new node](#create-a-new-node) for `wp-XX.stage`,
194
+
including the special step to run `jq-tarsnap-keygen` before provisioning with Puppet.
195
+
* Switch DNS for `wpdocs-stage.svc.jquery.net`. This is done first instead of last, as otherwise the instance cannot acquire [TLS certificates](../hieradata/environments/staging/roles/docs/wordpress.yaml). For production we proxy via Cloudflare or Fastly and require only a FQDN certificate on the origin.
196
+
* NOTE: Puppet automatically updates [builder nodes](#builder) to be aware of all wpdocs hosts. This means the builder logs is expected to temporarily contain errors if it tries to push content to a new node before it was ready.
197
197
* Follow [§ Register a webhook](#register-a-webhook) for the new node at [org-wide jquery webhooks](https://github.com/organizations/jquery/settings/hooks).
198
-
* Once provisioned, check that https://stage.jquery.com/ and https://stage.api.jqueryui.com/1.13/ look identical to their production counterparts, except having no content yet.
198
+
* Once provisioned, check that https://stage.api.jquery.com/ renders OK (albeit empty, with no pages yet).
199
199
* ssh to a **staging** builder:
200
200
* Confirm `cat /etc/builder-wordpress-hosts` contains the new wp-XX.stage host.
201
201
* Run `builder-rebuild-all` and wait for it to finish (~20min).
202
-
For any failing site, you can iterate with [WordPress § Manual build](./wordpress.md#manual-build). When you push a commit, it will automatically start a build, which you can follow via [WordPress § Debug notifier](./wordpress.md#debug-notifier) instead.
203
-
* Spot-check a few staging sites and confirm that they look the same as their production counterparts:
202
+
If any issues come up, fix those first. You can iterate on a single site with [WordPress § Manual build](./wordpress.md#manual-build). When you push a commit to the site's repo, the webhook automatically starts a build. You can follow use [WordPress § Debug notifier](./wordpress.md#debug-notifier) to follow this.
203
+
* Spot-check these staging sites and confirm that they look the same as their production counterparts:
* Confirm `cat /etc/builder-wordpress-hosts` contains both of the new wp-XX hosts.
227
229
* Run `builder-rebuild-all` and wait for it to finish (~20min).
228
230
* If any issues come up, fix those first. You can iterate on a single site with [WordPress § Manual build](./wordpress.md#manual-build). When you push a commit to the site's repo (and a semver tag for sites that require this), the webhook automatically starts a build. You can follow use [WordPress § Debug notifier](./wordpress.md#debug-notifier) to follow this.
229
231
* Once all issues are fixed, re-run `builder-rebuild-all`
230
232
* Switch DNS for https://api.jquerymobile.com/ and confirm that it looks the same as before.
231
-
Wait for and confirm that it is a response from a new server by comparing the `X-Powered-By: PHP` version in browser devtools.
233
+
Wait for and confirm that it is a response from a new server by comparing the `X-Powered-By: PHP/X.Y.Z` version in browser devtools.
232
234
* Switch DNS for all sites listed at [WordPress § Doc sites](./wordpress.md#doc-sites).
233
-
We assign `*.jquery.com` to the first node,
234
-
and assign all others to the second node.
235
+
We assign `*.jquery.com` to the first node (NYC),
236
+
and assign all others to the second node (SFO).
237
+
* Switch "releases" service in Fastly and change both origins to the new hosts.
238
+
Take care to update all mentions of the hostname in the origin settings (origin name, origin address, expected cert, expected SNI).
239
+
Browse around https://releases.jquery.com until you see a response with the newer `X-Powered-By: PHP/X.Y.Z` version in broser devtools. If this doesn't happen, perhaps check the origin? See also [Runbook: Nginx debugging](./runbook-nginx-debug.md).
240
+
```sh
241
+
curl -si https://wp-XX.ops.jquery.net/jquery/ -H 'Host: releases.jquery.com' | head -n25
242
+
# HTTP/1.1 200 OK
243
+
# …
244
+
# <title>jQuery Core – All Versions | jQuery CDN</title>
245
+
# …
246
+
```
235
247
* Shutdown the old nodes and **wait a few days** to preserve prior backups and ease recovery just in case
236
248
* Remove old node from [jquery org-wide webhooks](https://github.com/organizations/jquery/settings/hooks)
237
249
* Follow [§ Delete a node](#delete-a-node) for the old node
Copy file name to clipboardExpand all lines: doc/runbook-nginx-debug.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Sometimes iterating through the staging branch is tedious, or there might not be
36
36
```
37
37
3. Perform your test against HTTP localhost using `curl` and a Host header. Remember that on the staging server, the hostnames have a `stage.` prefix in the URL hostname:
0 commit comments