Thank you for joining Fluvio community. The goal of this document is to provide everything you need to get started with developing Fluvio.
Familiarity with
Developer guide and examples should work with the following platforms:
- macOS X
- Linux Other platforms such as Windows can be made to work, but we haven't tried them yet.
To test and run services, you need to get access to development Kubernetes cluster. Our guide uses Minikube as examples because it is easy to it get it started, but you can use other Kubernetes cluster as well. Please see Kubernetes for setting up a development cluster.
Currently, Fluvio is using the nightly version of Rust because it is using unstable version of the Futures library. We expect to switch to the stable version of Rust in 1.39
Fluvio platform consists of the following components.
Streaming Controller implements control plane operations for data-in-motion. It is responsible for organizing and coordinating data streams between SPU's. It uses the declarative model to self-heal and recover much as possible during failures.
SPU's are the engine for data-in-motion. Each SPU can handle multiple data streams. SPU uses reactive and asynchronous architecture to ensure efficient handling of data.
Fluvio CLI provides manages SPU manages streams (topics and partitions) produce and consume streams
Please follow setup instructions to install Rust and Cargo.
This will build Fluvio for your environment:
$ git clone https://github.com/infinyon/fluvio.git
$ cd fluvio
$ cargo build
$ cargo test
It is recommended to use custom SPU instead of managed SPU which allow SPU to run locally in your local machine.
Due to limitation of third party library, we need to apply DNS name for minikube cluster.
This requires 2 steps.
- Add host entry
minikubeCA
in your /etc/hosts file. - Add Kube config context to use host-based configuration
First find IP address of the minikube
minikube ip
then paste output to /etc/hosts
. You probably need to perform as sudo
The host name must be minikubeCA
as shown below
192.168.64.9 minikubeCA
Here we set up new context use hostname for minikube.
kubectl config set-cluster mycube --server=https://minikubeCA:8443 --certificate-authority=.minikube/ca.crt
kubectl config set-context mycube --user=minikube --cluster=mycube
kubectl config use-context mycube
In order to run custom spu, we must register them. To register 3 SPU:
kubectl create -f k8-util/samples/crd/spu_5001.yaml
kubectl create -f k8-util/samples/crd/spu_5002.yaml
kubectl create -f k8-util/samples/crd/spu_5003.yaml
./dev-tools/log/debug-spu-min 5001 9005 9006
./dev-tools/log/debug-spu-min 5002 9007 9008
./dev-tools/log/debug-spu-min 5003 9009 9010