Using the App Template
Last updated
Last updated
These instructions only apply to AuterionOS version 2.5 and earlier. Developers targeting AOS 2.7 and newer should use the new app workflow instead: Getting Started
This documentation explains how to develop an application for AuterionOS. An application is a set of Docker containers that can interact together and with Auterion software. Tools are provided in order for you to build, deploy and run your application on top of AuterionOS for development, and then package it into an update archive to deploy it to Skynode-powered vehicles. Attached to this documentation there are four example applications written in C++ and Python that use mavlink (MavSDK) to get flight controller telemetry or interact with Auterion Payload Manager. At the end of the documentation you will find a section listing the most important commands to know in order to interact with an application installed on your device.
Have a look at the Examples if you like to see code first
You can also first develop and prototype by just using ssh to connect to Skynode. See the section on for further details.
An application is composed of:
app.yml
: A YAML file that describes your application
src
: A folder that contains application source code and Dockerfile
Makefile
: One makefile that contains build and install instructions
tools
: A folder that contains tools needed in order to build and deploy your application
The app.yml
is the file that describes and configures your application. This file follows the Compose file format and should define every service that composes your application.
A minimal app.yml
should contain at least:
Where service1
is the name of your docker container and myapp
is the name of your application.
For a multiple containers application, app.yml should contain at least:
Where service1
is the name of your first docker container, service2
is the name of your second docker container and myapp
is the name of your application.
Network
By adding network_mode: host
to your service definition in app.yml
you will be able to expose your service to the network.
Volumes
By adding - '/persistent/shared_container_dir:/shared_container_dir'
to the list of volumes of your service definition in app.yml
, you will be able to access to the WiFi and LTE configuration files.
By adding the following volumes to the list of volumes of your service definition in app.yml, you will be able to access pictures taken by Auterion Payload Manager:
You are actually free to architecture your application as you want. One way to architecture your src
folder is:
You can learn more about Dockerfile on docs.docker.com
In order to drive the build and deployment processes you can define a Makefile with the following rules:
Where service1
is the name of your first docker container, service2
is the name of your second docker container and myapp
is the name of your application.
The build
target will build every service and generate the application artifact in output/<myapp>.auterionos
. The install
target will upload and install the artifact on your device (via USB-C).
The tools folder is important because it contains the scripts you will need to package an application and to deploy it to your device. You will need to copy the following scripts from tools
and copy them to the root of your application workspace:
tools/package_app.sh
tools/mender-artifact
A good way to start developing applications for AuterionOS is to experiment with the example applications provided by Auterion.
In case your deployment fails you can find useful information in the following logs:
/var/log/apache2/error.log
/data/<APP_NAME>.log
In case you cannot package an artifact or build an application, you can execute the script ./setup/sanity_check.sh
in order to verify that your setup is configured correctly. This script will give you additional information in order to fix your setup issue.
Depending on which Linux distribution the development environment is installed, the make
command may need to be executed with sudo
. The package script uses mounts in order to copy files in the artifact, which may require elevated privileges.
Manufactuers refer to for a guide on how to package your app into an AuterionOS base image. The process can be used to include Apps directly in AuterionOS images.