Skip to main content

Core Module Update Interface

Project description

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.

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:

msg_type: neon.core_updater.check_update
data: 
  include_prerelease: True

will generate the response:

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neon-phal-plugin-core-updater-1.2.1a3.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file neon-phal-plugin-core-updater-1.2.1a3.tar.gz.

File metadata

File hashes

Hashes for neon-phal-plugin-core-updater-1.2.1a3.tar.gz
Algorithm Hash digest
SHA256 4d9a04a581f62db5cdaea97c3608d38aa9abe50879d357284c1430a70494d47b
MD5 3cbf7ee11a19ca3fae25f20eba3646f9
BLAKE2b-256 f6bfd491fe5105942b6dd691cf52311866461d496ced3cb3da201a9de9c4ea47

See more details on using hashes here.

File details

Details for the file neon_phal_plugin_core_updater-1.2.1a3-py3-none-any.whl.

File metadata

File hashes

Hashes for neon_phal_plugin_core_updater-1.2.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 071fdbd292c8454339c3298a0bce9b26fdb9bc9ef5a4b205233e5dd411871f0a
MD5 b391c24c088ac74c78f768df79c11b03
BLAKE2b-256 0675f1847540973c789ebb929ea5bc952bd09a8e4ecb207c686838b8b06bbcf8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page