OpenCHAMI / configurator

An extensible tool to dynamically generate configs from SMD with Jinja 2 templating support.
MIT License
1 stars 1 forks source link

Add `serve` command to run configurator as a microservice #2

Closed davidallendj closed 7 months ago

davidallendj commented 7 months ago

This PR addresses issue #1 and updates the README.md to reflect the changes. The configurator server can be started using the serve command.

./configurator serve --config config.yaml

The server will wait for requests until it is shut down. Requests can be sent using the target endpoint with query params.

curl http://127.0.0.1:3334/target?type=dhcp&template=dnsmasq

This request is equivalent to the following generate command ran locally:

./configurator generate --config config.yaml --target dhcp:dnsmasq