Dive into Spring Cloud Data Flow on Kubernetes with Minikube for Mac OS

So you want to run Spring Cloud Data Flow on Kubernetes. Let’s start. First you must install Kubernetes and Helm. As a Kubernetes distribution, I used minikube and installed it using homebrew

brew install minikube helm

For Spring Cloud Data Flow, I use the Bitnami helm charts here. To deploy Spring Cloud Data Flow, you need to execute the following two commands, which will install a rabbitmq pod, a MariaDB pod, Spring Cloud Data Flow Server and Skipper and the corresponding services for the pods. You may want to start minikube with more CPUs and Memory as we are deploying quite a few artefacts, so the start command gets some more parameters:

minikube start –cpus=4 –memory=8192
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install scdf bitnami/spring-cloud-dataflow

You can get data flow dashboard with the following command:

export SERVICE_PORT=$(kubectl get –namespace default -o jsonpath=”{.spec.ports[0].port}” services scdf-spring-cloud-dataflow-server)
kubectl port-forward –namespace default svc/scdf-spring-cloud-dataflow-server ${SERVICE_PORT}:${SERVICE_PORT} &
open “http://127.0.0.1:${SERVICE_PORT}/dashboard”

That’s it.

Indian Butter Chicken

If you have been searching for a recipe of original tasting butter chicken, the like you get at restaurants in Mumbai (like Saffran in Lower Parel), search no further: I found an original tasting recipe on YouTube that is just delicious. You don’t need that much sugar though, instead of 4 tablespoons of sugar, I only use one (and yes, I do like sugar).

Improve VPN performance on ODROID N2

I like to secure my home network with a VPN, so I have used single board computers for years for that. I started with the Raspberry PI 1, upgraded to BananaPi 1, then upgraded to an ODROID C2, tried out the new Raspberry PI 3, before ending up with my current ODROID N2. I upgraded frequently, as running encryption on these small computers maxes out their CPU capability with ease, and OpenVPN only uses 1 CPU Core, so having a multi-core CPU does not help a lot in this use case. Also, even though my ODROID N2 has hardware accelerated AES encryption, unfortunately, the SHA512 hash algorithm used by my VPN provider is not hardware accelerated. In addition to the VPN, I use the ODROID as PiHole to filter ads and trackers on a DNS network level and also as a network backup server that emulates an Apple Time Capsule.

In this post I talk about how I was able to get better VPN performance.

It has happened several times to me that openvpn was slow, and not delivering more then 40 MBit/s on the connection. Instead I saw a rather high cpu/interrupt load for ksoftirqd/0. After a lot of searching, I figured out that it was using one of the 2 “little” ARM A53 cores instead of the faster ARM A73 cores. On the ODROID N2 the little cores are cores 0-1, the big cores are 2-5 (for some details on the processor architecture, see https://www.hardkernel.com/blog-2/odroid-n2/).

The solution? Setting the CPU affinity, meaning the preference where the openvpn process runs, to the faster CPU cores by changing the startup script (/etc/init.d/openvpn) to startup the openvpn process using taskset:

DAEMON="taskset --cpu-list 2-5 /usr/sbin/openvpn"

Depending on your system, you may also want to change the Systemd service to execute the openvpn process with taskset, too. You can prepend the taskset command from above in the service definition file in:

/lib/systemd/system/[email protected]

and then run:

systemctl daemon-reload
systemctl restart openvpn

After a short speedtest, I now reach more than 300 MBit/s with OpenVPN running with AES-256-GCM and SHA-512 encryption.