Container Based Applications

Overview

The Container based Application term refers to a type of packaged application which contains both the applications and the a Linux Distribution. This type of application is also referred as "LXC App" as it is most often uses LXC technology to provide the Runtime Container.

For an overview of this application type see:

In terms of complexity and overhead, the Container based Application type sits between the PaaS style and VM based Applications.

  • Similar to PaaS:
    • Low overhead in term of resources at runtime
    • Does not provide Kernel - shares it with the IOx Platform - Linux based system only
  • Similar to VM:
    • Choice of Linux OS (only Linux though unlike VM)
    • Application usually have more integration with the OS
    • Native code supported for the given type of IOx Platform - unlike PaaS

Typical Scenarios for Container based Apps

The Container based Applications is mostly used in the following cases:

  • Must be a Linux based application
  • The Application contains code that must be compiled for a given platform - C, C++ software which makes it non-portable across different CPU Architectures
  • The Application's components have dependencies on components/software-packages that are non-portable (.so, native programs, ...)
  • A full VM is not required and would be too heavy or VM type Application is not supported by the targeted IOx platform

Developer Required Skills

The required skill set for developing a Container based Application is substantially more than what is required for PaaS type Application.

Developers working on an Container based Application are expected to:

  • Have a basic/intermediate understanding of Linux including:
    • rootfs, partition, system initialization, package installation
  • Familiar how to build unix application
  • Customize/configure linux system

Package Anatomy

The package structure is very similar to the PaaS Style Application. The package is a tarball containing the following files (in order):

File Description
package.yaml Application Descriptor
package.mf Manifest file containing the checksum of the other files at this level
artifacts.tar.gz Compressed envelope containing an ext2 file

Some notes on the content of the files in the package:

  • package.yaml
    • Must specify that the app type is "lxc"
    • Must specify the "cpuarch" the linux distibution binaries are compatible with
  • artifacts.tar.gz
    • Must contain a .ext2 file (which must also appear in the application descriptor)

Linux Distribution

The IOx SDK and Platforms allow the developer to include custom Linux Distribution in the package along with its Application logic. Allowing the developers to provide a Linux Distribution customized for the application is useful for:

  • Selecting a favorite Linux Distribution
  • Modify the Distribution/installation
  • Incorporate FOSS packages required by the application

Depending on the developer's skills and familiarity with Linux system, this may be a daunting task.

The IOx SDK does provide a reference implementation for a Linux Distribution that facilitate this task; it does include support for Yocto. Providing a reference implementation allows us to:

  • Guaranty a common Linux Distribution across all IOx Platforms
  • Tests the Application Hosting capability of IOx Platforms
  • Provides a base distribution that is customizable and suitable for most potential Applications

Requirements

  • Platform Support - Ensure that the platform(s) you want to develop your application for supports this application type
  • The platform should be enough resources to host the application