TBD
Currenly Matchbox doesn't provide any machine discovery mechanism. Matchbox operators should manually create groups with appropriate mac address selectors.
As a Matchbox operator i want to have:
- machine discovery mechanism
- ability to assign profiles to machines
TBD
{
"id": "node1",
"name": "etcd Node 1",
"profile": "etcd3",
"mac": "52:54:00:a1:9c:ae",
"metadata": {
"foo": "bar"
}
}
Id and mac mandatory.
gRPC:
- MachinePut
- MachineGet
- MachineList
bootcmd machine list
bootcmd machine create --file $FILE
bootcmd machine get $MACHINE_ID
bootcmd machine register-as-group $MACHINE_ID --group-template $FILE
register-as-group - locally compiles text/template with mac address of machine and executes "bootcmd group create"
TODO: How to handle profile?
HTTP:
- /discover
Example request to HTTP /discover:
curl -H "Content-Type: application/json" \
-X POST \
-d '{"id":"${uuid}","name":"machine1", "mac": "11:22:33:44:aa:bb"}' \
http://matchbox.foo:8080/discover
Matchbox started with default group called "discovery". So every unknown machine will boot into "discovery" group. Discovery group boots CoreOS with special "discovery" ignition. Discovery inginition has oneshot systemd unit. This unit will make a requiest to Matchbox discovery url.
Roman Sokolkov rsokolkov@gmail.com
- Introduce new model called "Machine" DONE
- Add new "machine" gRPC api endpoints DONE
- Add new "machine" cli commands DONE
- Add new "dicovery" HTTP endpoint DONE
- Define discovery mechanism DONE
TBD
Please discuss how the changed document will be tested.
- Add created and updated timestampts for machines
TBD