Documentation
¶
Overview ¶
Command machine-adapter is a stand-in "cloud" that speaks the Hub's machine adapter protocol v1 (docs/hub/provider.md) and, on the same port, the older protocol without a version (v0). It is a separate process: the Hub reaches it over HTTP only, as it would reach an adapter for a real cloud. Servers are records; an operation finishes a moment after it is asked for. With -state the records are kept in a file, so the adapter can be restarted.
machine-adapter -listen 127.0.0.1:8099 -token-file /run/secrets/adapter-token -state /var/lib/adapter/cloud.json
Besides the protocol it serves GET /stub/machines/{id}/bootstrap, which returns what create was given for the machine's agent (hub address and registration code). A real adapter would start the agent with it; here a test or a person plays the agent.