Merge pull request 'Upgrade Sockethub to 5.0.0-beta.0, serve info page' (#685) from chore/upgrade_sockethub into master

Reviewed-on: #685
This commit was merged in pull request #685.
This commit is contained in:
raucao committed 2026-10-12 20:35:18 +00:00
commit dc4771fd6b
7 files changed
+66 -5

No files matched your search

+10
View File
@@ -2,6 +2,16 @@ name "sockethub"
default_attributes 'kosmos_redis' => {
'requirepass' => false
},
'sockethub' => {
'about' => {
'name' => 'Kosmos Sockethub',
'description' => '',
'contact' => 'ops@kosmos.org',
'links' => [],
'showVersion' => false,
'showUptime' => false
}
}
run_list %w(
+10
View File
@@ -1,6 +1,16 @@
CHANGELOG
=========
0.4.0
-----
- Update to sockethub 5.0.0-beta.0
- The root URL now serves a server info page (and a JSON service descriptor
with `Accept: application/json`); the examples moved to /examples
- Generate the `about` block from `node['sockethub']['about']`, letting the
deployment name, description, contact and links be set in the role
- Set an explicit `platforms` list from `node['sockethub']['platforms']`,
disabling the `@sockethub/platform-dummy` platform in production
0.3.0
-----
- Update to sockethub 5.0.0-alpha.25
+13 -1
View File
@@ -10,7 +10,19 @@ Attributes
| Key | Type | Description | Default |
| --- | --- | --- | --- |
| `['sockethub']['version']` | String | The npm version of sockethub to install | `5.0.0-alpha.25` |
| `['sockethub']['version']` | String | The npm version of sockethub to install | `5.0.0-beta.0` |
| `['sockethub']['port']` | Integer | The local port to run sockethub on | `10550` |
| `['sockethub']['domain']` | String | The public domain served by the openresty proxy | `sockethub.kosmos.org` |
| `['sockethub']['log_level']` | String | Console log level (error, warn, info, debug) | `info` |
| `['sockethub']['about']['name']` | String | Display name of this instance on the root info page | `''` |
| `['sockethub']['about']['description']` | String | Short description shown on the root info page | `''` |
| `['sockethub']['about']['contact']` | String | Operator contact (email or URL) on the root info page | `''` |
| `['sockethub']['about']['links']` | Array | Extra links (`{ "label": ..., "url": "https://..." }`) on the root info page | `[]` |
| `['sockethub']['about']['showVersion']` | Boolean | Show the exact server version on the root info page | `false` |
| `['sockethub']['about']['showUptime']` | Boolean | Show the process uptime on the root info page | `false` |
| `['sockethub']['platforms']` | Array | Platform packages to load (the production set, without `platform-dummy`) | see `attributes/default.rb` |
The `about` values are set per deployment in `roles/sockethub.rb`; the cookbook
defaults are empty, so the root info page shows only the technical details.
`links` entries must be objects with a `label` and an `http(s)` `url`.
+20 -2
View File
@@ -1,4 +1,22 @@
node.default['sockethub']['version'] = '5.0.0-alpha.25'
node.default['sockethub']['version'] = '5.0.0-beta.0'
node.default['sockethub']['port'] = '10550'
node.default['sockethub']['domain'] = 'sockethub.kosmos.org'
node.default['sockethub']['log_level'] = 'info'
node.default['sockethub']['log_level'] = 'info'
node.default['sockethub']['about'] = {
'name' => '',
'description' => '',
'contact' => '',
'links' => [],
'showVersion' => false,
'showUptime' => false,
}
node.default['sockethub']['platforms'] = [
'@sockethub/platform-carddav',
'@sockethub/platform-caldav',
'@sockethub/platform-feeds',
'@sockethub/platform-irc',
'@sockethub/platform-metadata',
'@sockethub/platform-xmpp',
]
+1 -1
View File
@@ -4,7 +4,7 @@ maintainer_email 'mail@kosmos.org'
license 'MIT'
description 'Installs/Configures sockethub'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.3.0'
version '0.4.0'
depends 'firewall'
depends 'kosmos-base'
+3 -1
View File
@@ -40,7 +40,9 @@ template "/etc/sockethub/sockethub.config.json" do
mode 0640
variables port: node['sockethub']['port'],
domain: node['sockethub']['domain'],
log_level: node['sockethub']['log_level']
log_level: node['sockethub']['log_level'],
about: node['sockethub']['about'],
platforms: node['sockethub']['platforms']
notifies :restart, 'systemd_unit[sockethub_nodejs.service]', :delayed
end
@@ -1,5 +1,14 @@
{
"examples": false,
"platforms": <%= @platforms.to_json %>,
"about": {
"name": <%= @about['name'].to_json %>,
"description": <%= @about['description'].to_json %>,
"contact": <%= @about['contact'].to_json %>,
"links": <%= @about['links'].to_json %>,
"showVersion": <%= @about['showVersion'] ? 'true' : 'false' %>,
"showUptime": <%= @about['showUptime'] ? 'true' : 'false' %>
},
"logging": {
"level": "<%= @log_level %>",
"file": ""