# Core Updater Plugin
Exposes a messagebus API to check for and initiate core module updates. Update
checks use GitHub releases or PyPI indices, depending on plugin configuration.
The update command is configurable and is started in a new session. Note that
the calling module might be killed during updates and in many cases, systemD
will kill the update process if the parent service stops.
## Configuration
The update command, core package, and update references are all configurable.
For version checks, a valid Python Package must be installed and versions must
either be published to PyPI or tagged as GitHub releases.
```yaml
PHAL:
admin:
neon-phal-plugin-core-updater:
enabled: True
core_module: neon_core
github_ref: NeonGeckoCom/NeonCore
update_command: systemctl start update_service
```
## Messagebus API
Messagebus events are handled to check for updates and to update to a newer version.
### Check for updates
emitting:
```yaml
msg_type: neon.core_updater.check_update
data:
include_prerelease: True
```
will generate the response:
```yaml
msg_type: neon.core_updater.check_update.response
data:
new_version: <latest version including pre-releases/alphas>
installed_version: <current installed version>
github_ref: <plugin configured GH ref>
pypi_ref: <plugin configured PyPI ref>
```
If `include_prereleases` is not present in the request, the installed version is
used to determine if pre-releases should be included.
Note that only one of `github_ref` or `pypi_ref` should be configured. If both
are configured, PyPI checks take priority.
### Start Updates
emitting:
```yaml
msg_type: neon.core_updater.start_update
data:
version: <new_version>
```
will start the configured update command in a shell with `version` passed as the
first and only argument. If `version` is omitted, the configured update command
will be called with no commands.
Raw data
{
"_id": null,
"home_page": "https://github.com/NeonGeckoCom/neon-phal-plugin-core-updater",
"name": "neon-phal-plugin-core-updater",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Neongecko",
"author_email": "developers@neon.ai",
"download_url": "https://files.pythonhosted.org/packages/e7/2d/2253789256cb4693fa6f9acc256a1dcae46ad031d9f3b41bad9d97955862/neon-phal-plugin-core-updater-1.3.0.tar.gz",
"platform": null,
"description": "# Core Updater Plugin\nExposes a messagebus API to check for and initiate core module updates. Update\nchecks use GitHub releases or PyPI indices, depending on plugin configuration.\nThe update command is configurable and is started in a new session. Note that\nthe calling module might be killed during updates and in many cases, systemD \nwill kill the update process if the parent service stops.\n\n## Configuration\nThe update command, core package, and update references are all configurable.\nFor version checks, a valid Python Package must be installed and versions must\neither be published to PyPI or tagged as GitHub releases.\n\n```yaml\nPHAL:\n admin:\n neon-phal-plugin-core-updater:\n enabled: True\n core_module: neon_core\n github_ref: NeonGeckoCom/NeonCore\n update_command: systemctl start update_service\n```\n\n## Messagebus API\nMessagebus events are handled to check for updates and to update to a newer version.\n\n### Check for updates\nemitting:\n```yaml\nmsg_type: neon.core_updater.check_update\ndata: \n include_prerelease: True\n```\nwill generate the response:\n```yaml\nmsg_type: neon.core_updater.check_update.response\ndata:\n new_version: <latest version including pre-releases/alphas>\n installed_version: <current installed version>\n github_ref: <plugin configured GH ref>\n pypi_ref: <plugin configured PyPI ref>\n```\n\nIf `include_prereleases` is not present in the request, the installed version is\nused to determine if pre-releases should be included.\n\nNote that only one of `github_ref` or `pypi_ref` should be configured. If both\nare configured, PyPI checks take priority.\n\n### Start Updates\nemitting:\n```yaml\nmsg_type: neon.core_updater.start_update\ndata:\n version: <new_version>\n```\nwill start the configured update command in a shell with `version` passed as the\nfirst and only argument. If `version` is omitted, the configured update command\nwill be called with no commands.\n",
"bugtrack_url": null,
"license": "BSD-3",
"summary": "Core Module Update Interface",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/NeonGeckoCom/neon-phal-plugin-core-updater"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a168625ff26986d694f66aeee2d97b7fd30da82b49879660a71d1c18a239d04b",
"md5": "2fa681e77111a1f29371c2c3504981d5",
"sha256": "1cec1ae50dcb12ce56b53ad53600ba47e039082b5de218318231664efe8adb9d"
},
"downloads": -1,
"filename": "neon_phal_plugin_core_updater-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2fa681e77111a1f29371c2c3504981d5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6831,
"upload_time": "2023-09-05T22:32:09",
"upload_time_iso_8601": "2023-09-05T22:32:09.606607Z",
"url": "https://files.pythonhosted.org/packages/a1/68/625ff26986d694f66aeee2d97b7fd30da82b49879660a71d1c18a239d04b/neon_phal_plugin_core_updater-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e72d2253789256cb4693fa6f9acc256a1dcae46ad031d9f3b41bad9d97955862",
"md5": "86ffa3e023cccce624732e9971a163aa",
"sha256": "dcc18832fe22d980cde9d5e2924bae0160834be2c4952961d056c5573381b8a2"
},
"downloads": -1,
"filename": "neon-phal-plugin-core-updater-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "86ffa3e023cccce624732e9971a163aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5569,
"upload_time": "2023-09-05T22:32:10",
"upload_time_iso_8601": "2023-09-05T22:32:10.718285Z",
"url": "https://files.pythonhosted.org/packages/e7/2d/2253789256cb4693fa6f9acc256a1dcae46ad031d9f3b41bad9d97955862/neon-phal-plugin-core-updater-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-05 22:32:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NeonGeckoCom",
"github_project": "neon-phal-plugin-core-updater",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "neon-phal-plugin-core-updater"
}