Provisioning backing services¶
A plugin can declare a provision step in install.yaml for setting up a
backing service it needs — a database, a message queue, whatever.
xcore-agent deliberately ships no database/queue client to support this:
a lean deployment agent shouldn't carry backend-specific dependencies most
projects don't need. Instead, provision runs an operator-configured shell
command:
How it's invoked¶
- The
provisionstep ininstall.yamlreferences a plugin id (ProvisionStep). - The agent looks up that id in
--provisioners-config(loaded byload_provisioners_from_configinagent/provisioners.py). - It appends the plugin id as the command's last argument and exports it as
PROVISION_PLUGIN_ID. - It runs the command with the configured
envandtimeout(default 300s).
Why this is safe to shell out to¶
Unlike anything inside install.yaml itself, the command comes from the
operator's own trusted host-side config, never from the (untrusted)
.xdeploy artifact, which only ever supplies a plugin id via
ProvisionStep. The operator already has root on their own VPS; nothing here
hands the artifact a new capability.
Required config¶
No config passed to provision for a plugin that has one → a clear
InstallError, not a silent no-op.
Trust boundary¶
--provisioners-config shares its trust model with the marketplace's
--install-plan: it's a local operator file. The artifact fetched from the
Hub supplies code, never deployment instructions or shell commands.