Skip to content

Instantly share code, notes, and snippets.

@trisberg
Last active January 31, 2020 15:36
Show Gist options
  • Save trisberg/9a4cf4f33004b6458ec9464f8555ac60 to your computer and use it in GitHub Desktop.
Save trisberg/9a4cf4f33004b6458ec9464f8555ac60 to your computer and use it in GitHub Desktop.
minikube start --memory=4096 --cpus=4 --vm-driver=kvm2 --kubernetes-version 1.17.2
kapp deploy -n apps -a cert-manager -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/cert-manager.yaml -y
kapp deploy -n apps -a kpack -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/kpack.yaml -y
kapp deploy -n apps -a riff-builders -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/riff-builders.yaml -y
kapp deploy -n apps -a riff-build -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/riff-build.yaml -y
ytt -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/istio.yaml -f https://storage.googleapis.com/projectriff/charts/overlays/service-nodeport.yaml --file-mark istio.yaml:type=yaml-plain | kapp deploy -n apps -a istio -f - -y
kapp deploy -n apps -a knative -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/knative.yaml -y
kapp deploy -n apps -a riff-knative-runtime -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/riff-knative-runtime.yaml -y
kapp deploy -n apps -a keda -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/keda.yaml -y
kapp deploy -n apps -a riff-streaming-runtime -f https://storage.googleapis.com/projectriff/release/0.5.0-snapshot/riff-streaming-runtime.yaml -y
helm repo add incubator https://storage.googleapis.com/kubernetes-charts-incubator
kubectl create namespace kafka
helm install kafka --namespace kafka incubator/kafka --set replicas=1 --set zookeeper.replicaCount=1 --wait
riff streaming kafka-gateway create franz --bootstrap-servers kafka.kafka:9092
riff streaming stream create in --gateway franz --content-type application/json
riff streaming stream create out --gateway franz --content-type application/json
riff function create time-averager --git-repo https://github.com/projectriff-samples/time-averager.git --handler com.acme.TimeAverager --tail
riff streaming processor create time-averager --function-ref time-averager --input in --output out
kubectl create serviceaccount riff-dev
kubectl create rolebinding riff-dev-edit --clusterrole=edit --serviceaccount=default:riff-dev
kubectl run riff-dev --image=projectriff/dev-utils:0.5.0-snapshot --serviceaccount=riff-dev --generator=run-pod/v1
kubectl exec riff-dev -it -- publish in --content-type application/json -p 33
kubectl exec riff-dev -it -- subscribe out --from-beginning
---
riff streaming processor delete time-averager
riff streaming stream delete in
riff streaming stream delete out
riff streaming inmemory-gateway create test
riff streaming stream create in --gateway test --content-type application/json
riff streaming stream create out --gateway test --content-type application/json
riff streaming processor create time-averager --container-ref time-averager --input in --output out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment