cefco

module
v0.0.0-...-486893a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: MIT

README

CEFCO

Cloud-Edge File Coordination Operator, can transfer file from edge node to cloud by NATS.

Prepare

# clone repo
$ git clone https://github.com/inspursoft/cefco

if not deploy nats2.2, deploy nats-jetstream for cloud node(refer https://docs.nats.io/nats-server/installation and https://docs.nats.io/jetstream/getting_started).

Build reader image for edge node and writer image for cloud, please refer the readme.md

Build run

# create crd
$ kubectl apply -f artifacts/crd.yaml

# run for test
$ make filesync-controller VERSION=0.1.0 noRace=T
$ ./filesync-controller --kubeconfig /root/.kube/config

# run for docker image
$ make filesync-controller-docker filesyncVersion=0.1.0
# push it to your registry
# run
$ kubectl apply -f artifacts/rbac.yaml
# deploy the operator(assign the hostname and image version)
$ kubectl apply -f artifacts/deployment.yaml

# create an example
# assign hostname and image for reader and writer, include nats ip and port
$ kubectl apply -f artifacts/examples/example-mini.yaml
# delete the example if undeploy
$ kubectl delete -f artifacts/examples/example-mini.yaml

tip for nats-jetstream

# Create a stream
$ nats --user s1 --password s1 str add example --subjects="example.>" --storage=memory --retention=workq --discard=new --max-msgs=-1 --max-bytes=-1 --max-age=-1 --max-msg-size=-1 --dupe-window=2s --replicas=1
# Create a consumer
nats --user s1 --password s1 con add example mini --deliver=all --replay=instant --filter="example.mini" --max-deliver=-1 --max-pending=1 --pull

Directories

Path Synopsis
cmd
controllers
pkg
apis/filesync/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/filesync/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/filesync/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
generated/clientset/versioned/typed/filesync/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/filesync/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL