Application Development
Workflow to build and install an app on AuterionOS
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.
You need to be an Auterion OEM or part of the App Developer program in order to distribute apps
Getting app examples
App examples can be downloaded from Auterion Suite. 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.
Building the example 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.
You need a working docker installation as well as docker-compose-plugin for building apps
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 .
Building for Virtual Skynode
If you are building your app for Virtual Skynode, you must provide the --simulation
flag to specify the correct simulation target architecture:
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.
Installing the app-base
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 installation can take up to 10 minutes. The app base itself is large, but only needs to be installed once.
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
:
The app base will show as "stopped". This is intended and normal. The app base itself does not do any work, its only purpose is to be present for other apps to use. Therefore, it is correct that it does not run, it only has to be present.
Installing the example app
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.
Show status and logs of an app
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
Extending the examples
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 appapp-author
with the reverse-domain notation of your entity, e.g.com.auterion
app-version
with the version of your appIn
services
list your the services (Docker images / containers) your app will have. Most apps just have one service. Set thebuild
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 theimage:
directive instead ofbuild:
. auterion-cli will attempt todocker 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
App services should inherit from the auterion/app-base image.
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.
Last updated