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
All of the WordPress settings are managed by Puppet. The sites are
14
-
backed by a locally running MariaDB instance.
14
+
All sites have their WordPress settings managed by Puppet, and all
15
+
sites are powered by a locally running MariaDB instance, and backed
16
+
up daily to Tarsnap.
15
17
16
18
## WordPress versions
17
19
18
-
By default we have WordPress auto upgrades enabled. If you want to pin
19
-
a specific version or to rollback to an older one, set one of these
20
+
WordPress "auto upgrades" are enabled. If you want to pin
21
+
a specific version or rollback to an older version, set one of these
20
22
hiera keys in `common.yaml` to the version you want to use:
23
+
21
24
```yaml
22
25
profile::wordpress::blogs::wordpress_version: ''
23
26
profile::wordpress::docs::wordpress_version: ''
24
27
```
25
28
26
-
You might need to restore the database from a backup if you had to roll
27
-
back to an older version with an older database schema.
29
+
You might also need to restore the database from a backup if the
30
+
older version had a different database schema.
28
31
29
-
## Backups
32
+
## Doc sites
30
33
31
-
We keep Tarsnap backups for the databases and (for blogs) uploads. See
32
-
the [backup.md] file for details.
34
+
### Builder hosts
33
35
34
-
[backup.md]: ./backup.md
36
+
The docs sites are provisioned by the `builder` hosts. These run
37
+
`node-notifier`to pick up changes to the sites and then run Grunt to
38
+
perform the upgrade. All of the configuration (including user
39
+
management) is handled by Puppet.
40
+
41
+
### Control flow
42
+
43
+
1. Each doc site has an associated Git repository, such as [api.jquery.com](https://github.com/jquery/api.jquery.com/).
44
+
2. An [organization-wide webhook](https://github.com/organizations/jquery/settings/hooks/) notifies the `builder` and `wp` hosts of commits and published tags. The hooks are secured with secret tokens and SSL-verification.
45
+
3. The `builder` hosts are provisioned with `role::docs::builder` by Puppet. Sites are defined by `docs_sites` in [hieradata/common.yaml](../hieradata/common.yaml). The builder host uses [jquery/notifier](https://github.com/jquery/node-notifier-server/) to receive these hooks. In the staging environment, sites generally build on each commit to the main branch. In production, most sites react only to semver-formatted tags.
46
+
4. Upon a relevant commit or tag, a [shell script](../modules/profile/files/builder/builder-do-update.sh) is executed on the builder host, which checks out the relevant commit hash, and uses `grunt-jquery-content` to build the WordPress pages, and deployes them via WordPress RPC to the `wp` hosts.
47
+
5. The `wp` hosts contain several standalone WordPress installations (Nginx, php-fpm, MariaDB). Our themes and plugins are managed in the [jquery-wp-content.git](https://github.com/jquery/jquery-wp-content) repository. Changes to jquery-wp-content are automatically deployed on every main branch commit, to both production and staging wp hosts.
48
+
6. The CDN for most doc sites is Cloudflare, except for releases.jquery.com which is behind Fastly (matching code.jquery.com). See also [cdn.md](./cdn.md).
49
+
50
+
### Debugging builder notifier
51
+
52
+
To check for any system problems with the notifier that receives webhooks, or the shell script that builds and deploys the site, ssh to a builder host, and run the following command:
4. Log in via wp-admin, and maybe set a new password other than the
57
103
randomly generated one?
58
104
59
-
## Doc sites
60
-
61
-
### Webhooks
62
-
63
-
There are token-secured and SSL-verified webhooks for [github.com/jquery](https://github.com/organizations/jquery/settings/hooks/) (organisztion-wide) that notify the `builder` and `wp` hosts
64
-
of push events (commits and tags) to all repositories.
105
+
## Backups
65
106
66
-
### Builder hosts
107
+
We keep Tarsnap backups for the databases and (for blogs) uploads. See
108
+
the [backup.md] file for details.
67
109
68
-
The docs sites are provisioned by the `builder` hosts. These run
69
-
`node-notifier`to pick up changes to the sites and then run Grunt to
70
-
perform the upgrade. All of the configuration (including user
0 commit comments