Application deployment

Now that your application have been generated thanks to redpesk CI or the rp-cli, let’s see how to install it on a board. Since redpesk support cross-compilation, we can use either a x86_64 or aarch64 board to get your package installed in.

During this part, two cases will be studied: Emulated x86_64 board: qemu-x86_64 and Real aarch64 board: m3ulcb.

1. Get a redpesk OS image

Two choices here:

  • you can either chose to build your custom redpesk OS image containing your own application. In this case just go to the image-creation section.
  • or you can download a ready-to-use redpesk OS image from here.

2. Run a redpesk OS image

Once you have your image file, you can extract and boot it with Qemu or flash it on the target. This section will deal with both types of image: x86_64 & aarch64. For example :

  • Qemu x86_64 : For more details see here.
  • Renesas Gen3 (M3/H3) : For more details see here.

3. Install your package

There are no difference in the command related to your package installation, neither in a x86_64, nor in an aarch64 redpesk distribution. Once you get in your redpesk image, you can proceed to the package installation.

NOTE: The default redpesk OS image already contains the helloworld-binding installed by default. This example below will use it as it was not already on the image. To be in the same situation just remove the app from your image : dnf remove helloworld-binding

As a reminder, the helloworld-binding gather two sub-packages the helloworld-binding and the helloworld-binding-test. To install the widget sub-package, you can simply run

[root@localhost ~] dnf install helloworld-binding

If you correctly set your project name and version as explained in the Build part, you should have the following output during the package installation

[root@localhost ~] dnf install helloworld-binding
NOTICE: -- Install redpesk widget from /var/local/lib/afm/applications/helloworld-binding --

Start the service by running:

[root@localhost ~] afm-util start helloworld-binding

This implies that your widget has been installed correctly. Check if your widget id is helloworld-binding.

[root@localhost ~] afm-util list --all
    "description":"Provide an Helloworld Binding",
    "author":"Iot-Team <>",

You can then start the service by running:

[root@localhost ~] afm-util start helloworld-binding

For example, you can access to its verb ping which belong to its api helloworld thanks to a HTTP or websocket request sent to the port $PORT such as follow

  • HTTP request
# Need jq
curl -H "Content-Type: application/json" http://localhost:${PORT}/api/helloworld/ping | jq
  • Websocket request
afb-client -H ws://localhost:${PORT}/api?token=x\&uuid=magic helloworld ping

For both requests you should get the following answer from the first request

ON-REPLY 1:helloworld/ping: OK
    "info":"Ping count = 0"

Once again, if you correctly set your project name and version as explained in the Build part, to correctly stop your service

[root@localhost ~] afm-util kill helloworld-binding

And to remove your widget, simply run

[root@localhost ~] dnf remove helloworld-binding