Description
Plugins that can be run from more than one host OS may require different dependencies. This is commonly the case with compiled/extension modules. When an agent requests a plugin from the Island, it needs to receive a plugin that is compatible with its OS.
To achieve this, plugins may be packaged with multiple vendor/ directories. The Island will repackage the plugin when it is requested by the agent. A plugin's source_archive should contain vendor/ XOR (vendor-linux/ or vendor-windows/). When the Island parses the plugin, it can repackage the source_archive so that it contains only the vendor directory for a single host OS.
To clarify: The agent expects the source_archive to contain vendor/ only. The Island will need to parse the source_archive it's provided, rename OS-specific vendor directories, and produce multiple plugins whose source archives contain the correct vendor directory.
Tasks
Merge PRs to the 2811-os-specific-plugins branch.
Description
Plugins that can be run from more than one host OS may require different dependencies. This is commonly the case with compiled/extension modules. When an agent requests a plugin from the Island, it needs to receive a plugin that is compatible with its OS.
To achieve this, plugins may be packaged with multiple
vendor/directories. The Island will repackage the plugin when it is requested by the agent. A plugin'ssource_archiveshould containvendor/ XOR (vendor-linux/ or vendor-windows/). When the Island parses the plugin, it can repackage thesource_archiveso that it contains only the vendor directory for a single host OS.To clarify: The agent expects the
source_archiveto containvendor/only. The Island will need to parse thesource_archiveit's provided, rename OS-specific vendor directories, and produce multiple plugins whose source archives contain the correct vendor directory.Tasks
Merge PRs to the 2811-os-specific-plugins branch.
host_operating_systems: Tuple[OperatingSystem, ...]toAgentPlugin(Refactor 2811-os-specific-plugins branch) - (0d) @shreyamalviyaMapping[OperatingSystem, AgentPlugin](0d) @shreyamalviyaTarFileobject(s) containingplugin.py, any other source code, and a singlevendor/directoryplugin.tarcontainsvendor/returnMapping[OperatingSystem, AgentPlugin]where theAgentPluginis the same instanceplugin.tardoes not containvendor/, return a dict with oneAgentPluginpervendor-[OS]where theAgentPlugininstances are OS-specificIAgentPluginRepository.get_plugin(self, host_operating_system: OperatingSystem, plugin_type: AgentPluginType, name: str)(0d) @cakekoahost_operating_system/api/agent-plugins/OS/TYPE/NAMEendpoint to accept an OS in URL(0d) @cakekoaIIslandAPIClientandHTTPIslandAPIClient.get_agent_plugin()to matchIAgentPluginRepository.get_plugin()(0d) @mssalvatorePluginRegistryto request the plugin for the host OS (0d) @mssalvatore