Application Development
Workflow to build and install an app on AuterionOS
Last updated
Workflow to build and install an app on AuterionOS
Last updated
Only install apps from trusted sources
Make sure to have right safety precautions when testing apps Apps can have the possibility to deeply interact with the system. Malfunctioning apps can have flight-safety critical implications to the operation of the aircraft.
App examples can be downloaded from . There are currently the following examples available:
minimal-cpp: A bare minimum example app using C++
get-telemetry-cpp: A C++ app that obtains vehicle telemetry via MAVLink
get-telemetry-python: A python app that obtains vehicle telemetry via MAVLink
crosscompile-cpp: A minimal C++ with a full cross-compilation setup
The apps, albeit fairly minimal, can serve as a starting point for developing your own apps.
Go into the directory of the app, which is the directory that contains the auterion-app.yml
file, and run
This command will create a new directory called build
that contains a *.auterionos
file. The *.auterionos
is the app image that can be installed your Auterion device.
Build failed? Auterion-cli simply calls docker build
in the background.
For debugging, you can cd
in the directory where your Dockerfile is, and run docker build --platform=linux/arm64 .
By doing so, the app's target architecture is configured to linux/amd64, enabling it to run within the simulation environment on your machine, provided your machine operates on the specified architecture.
Most AuterionOS apps require an app base to be installed on the target Skynode. The app base is a common layer that includes most of the runtime dependencies for apps. This allows the image size of apps to remain small, while still be able to access powerful libraries and tools.
The app base itself is distributed as an app (.auterionos file) as well and can be obtained from the developer account on Auterion Suite.
To install the app base, run
The app base needs to be installed before any app can be installed on Skynode
To verify that the app base was correctly installed, you can run the app list
command of auterion-cli
:
You can install the example app, (or any other app) using the app install
command. In case of the example app we built above, the .auterionos
file will be in the build directory.
You can get the status of an app using the app list
command. A working app will be shown as "running".
If an app crashes, it gets restarted automatically by the system. If an app crashes on boot, the app will constantly appear as "restarting".
To get live logs of an app, use the app logs
command.
Live logs with the `-f` option require at least AuterionOS 2.7 or later
e.g.
Press CTRL+C to quit the live log
An AuterionOS app is structured the following way
auterion-app.yml - Contains all meta-information about the app, like name, version, author etc. This file needs to be in the project root directory. Each build entry points to the location of a Dockerfile that needs to be built and run.
Dockerfile - Describes how to actually build and run your app. You can use any docker command in here. Apps shall inherit from the auterion/app-base image. The Dockerfile gets discovered in the build process by the tool looking at the locations indicated in the auterion-app.yml file.
Source files - The source files of your app. They can be in any language, since the app runs in a docker container
To extend the examples, do the following steps
In the auterion-app.yml, set
app-name
with the name of your app
app-author
with the reverse-domain notation of your entity, e.g. com.auterion
app-version
with the version of your app
In services
list your the services (Docker images / containers) your app will have. Most apps just have one service. Set the build
of your service to the location where the Dockerfile for your service is. It is also possible to use existing docker images which the machine where auterion-cli will be executed has access to. To do so use the image:
directive instead of build:
. auterion-cli will attempt to docker pull
any images that are not built from source.
Add the sources for your app
Edit / replace the Dockerfile with instructions how to build / run your app
The auterion/app-base image is a multi-arch image for both aarch64(arm64) and x86-64(amd64). When building for Skynode using auterion-cli, it will automatically choose the aarch64 version and run all your build instructions in an aarch64 context.
If, for testing, you build the docker image to run on your local machine, it will chose the native architecture of your machine, most likely x86-64.
If you are building your app for , you must provide the --simulation
flag to specify the correct simulation target architecture: