Hello, would you like Onions with that?

mmussett
2 min readMay 12, 2020

--

Running Flogo on constrained IoT devices

Brian Kernighan wrote the first “hello, world” program as part of the documentation for the BCPL programming language. It’s since been used as the exemplar with about every programming language known to man as a way of testing your newly installed toolchain actually works.

Having received my ever so tiny Onion Omega2+ in the post yesterday the first task I sat out to do was to get Flogo running on board.

Kick-started Flogo by downloading the docker image from http://www.flogo.io/ and set about the task of developing a simple Flogo flow to log those hallowed words to the console.

A one-shot Timer trigger will do:

Add a log activity:

Export the hello_world.json file, build the binary on the CLI

Building any flogo application binary from the CLI is very simple, we just need to set the GOOS and GOARCH environment variables for Flogo to build a binary suitable for MIPS CPU.

GOOS=linux GOARCH=mipsle flogo create -f hello_world.json

Issuing the flogo create command causes Flogo to generate the golang source code that can next be compiled to binary object format using:

GOOS=linux GOARCH=mipsle flogo build -e

Once we have a built binary object all we need to do is copy it to the Onion

rsync -P -a bin/HelloWorld root@omega-9a78.local:/root

The inbuilt browser-based terminal on the Onion allows you to login and start the Flogo application:

Et voila! Flogo loves Onions!

--

--

mmussett
mmussett

Written by mmussett

I am a husband, father-of-two, dog owning, video-game-playing, motorbike-riding technologist.

No responses yet