ekuiper
ekuiper copied to clipboard
Support for file-based rule & stream provisioning on startup
It would be useful if Kuiper supported file-based rule and stream provisioning (i.e. importing) on startup. Currently rules and streams need to be created by someone using the client, or an application requesting creation via the Kuiper REST API.
Supporting file-based provisioning would allow someone to deploy Kuiper with a pre-defined set of streams and rules, removing the need for someone (or some application) to create them.
EdgeX uses this concept for device services, which support provisioning of devices and device profiles via static YAML files read by the service on startup from a pre-defined directories (configurable).
Hi. May I have a try on it. Are there any advice for implementation.
@wfnuser This is basically a copy of tools/kubernetes except that it only runs once. You can try to migrate our k8s tool to run at kuiperd server startup
@wfnuser This is basically a copy of tools/kubernetes except that it only runs once. You can try to migrate our k8s tool to run at kuiperd server startup
Cool. Let me try it.
@ngjaying
My original idea was that rules and streams would be handled the same way sinks and sources are, namely on startup, kuiper would read them from the appropriate directories (e.g. /etc/rules, /etc/streams). Sorry for leaving that out!
The approach you're suggesting essentially uses a k8s helper application to read JSON from a file which provides enough information to construct kuiper REST requests, which can then be used to create rules and streams.
I think we could accomplish the same thing by just using the kuiper client right? The only thing I'm not sure about is whether or not the create stream
command supports reading from a file (e.g. -f
)?
@tonyespy This issue aims to support your original idea which wll not need a helper applications after it is implemented.
The kuiper CLI client do supporte -f
to specify a file for stream/rule. Please check CLI create a stream