- Quay.io account
- Quay.io repository and a robot account created in it.
sterntool installed.- A Strimzi cluster
- Serverless Operator and Serving, Eventing, KnativeKafka enabled.
- Bitmine courier deployed:
cd bitmine-courier && ./mvnw clean package -Dquarkus.kubernetes.deploy=trueCreate a project namespace.
oc new-project functioniaCreate a AMQ Streams / Strimzi cluster inside (Please first enable the AMQ Streams Operator)
You can use Strimzi CLI to create one easily (or you can use the operator resources to create one).
kfk clusters --create --cluster my-cluster -n functioniaCreate Quarkers miner clan function.
kn func create -l quarkus -t cloudevents quarkers-mining-serviceDo the editings in the function.
Build and deploy function.
cd quarkers-mining-service
kn func deploy --buildUpdate the function service.
kn service update quarkers-mining-service --concurrency-target=1Call bitmine-courier with curl with 10 mine requests.
curl -XGET http://bitmine-courier-functionia.apps-crc.testing/10Checkout the pod count and logs.
stern -n functionia -c user-container quarkers-mining-serviceDelete quarkers-kafka-source.
kn source kafka delete quarkers-kafka-sourceCreate Noders miner clan function.
kn func create -l node -t cloudevents noders-mining-serviceDo the editings in the function. Build and deploy function.
cd noders-mining-service && kn func deploy --buildUpdate the function service.
kn service update noders-mining-service --concurrency-target=1Create the kafka channel. Create the quarkers subscription. Create the noders subscription.
Edit bitmine-courier to produce to channel topic.
oc set env dc/bitmine-courier TOPIC=knative-messaging-kafka.functionia.kafka-channeloc rollout latest dc/bitmine-courier Call bitmine-courier with curl with 50 mine requests.
curl -XGET http://bitmine-courier-functionia.apps-crc.testing/50Checkout the pod count and logs.
stern -n functionia -c user-container quarkers-mining-servicestern -n functionia -c user-container noders-mining-serviceDelete the Kafka channel.
oc delete -f resources/2-channel-subscription/kafka-channel.yamlCreate the broker.
oc apply -f resources/3-broker-trigger/functionia-broker.yamlCreate triggers for clans.
oc apply -f resources/3-broker-trigger/quarkers-trigger.yamloc apply -f resources/3-broker-trigger/noders-trigger.yamlEdit bitmine-courier to produce to channel topic.
oc set env dc/bitmine-courier TOPIC=knative-broker-functionia-kafka-brokeroc rollout latest dc/bitmine-courier Checkout the pod count and logs.
stern -n functionia -c user-container quarkers-mining-servicestern -n functionia -c user-container noders-mining-serviceTag Noders service as noders.
kn service update noders-mining-service --tag=noders-mining-service-00002=nodersEdit the NodeJS function and build/deploy it.
kn func deploy --buildTag the new version as wakanda.
kn service update noders-mining-service --tag=noders-mining-service-00003=wakandaSplit the traffic as requested.
kn service update noders-mining-service --traffic noders=80,wakanda=20Checkout the traffic status.
kn revision listCheckout the distribution and logs.
stern -n functionia -c user-container quarkers-mining-servicestern -n functionia -c user-container noders-mining-service



