Reference13r1:Concept App Platform: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
No edit summary
Line 85: Line 85:
* ## escapes a hash mark
* ## escapes a hash mark


== App Platform Infrastructure ==
= App Platform Infrastructure and Concept =
=== Webserver ===
== Webserver ==
The app platform includes a webserver that is highly optimized for handling many Websocket connections at a low memory footprint.
The app platform includes a webserver that is highly optimized for handling many Websocket connections at a low memory footprint.
All apps use that webserver by registering for specific HTTP subpath. So they can all use the same HTTP/HTTPS ports - typically the standard ports.
All apps use that webserver by registering for specific HTTP subpath. So they can all use the same HTTP/HTTPS ports - typically the standard ports.


=== Database ===
== Database ==
The app platform creates a database for each app instance. The apps should store all data in that database. That makes sure that a consistent backup and restore of app instances can be done by the app platform manager.
The app platform creates a database for each app instance. The apps should store all data in that database. That makes sure that a consistent backup and restore of app instances can be done by the app platform manager.
In hosted scenarios, having separate databases for each instance also makes sure that the data of different customers are clearly separated and can easily be moved from one physical platform to another.
In hosted scenarios, having separate databases for each instance also makes sure that the data of different customers are clearly separated and can easily be moved from one physical platform to another.


=== App Platform Manager ===
== App Platform Manager ==
The App Platform Manager is the central component of the App Platform. It does the following:
The App Platform Manager is the central component of the App Platform. It does the following:
* Installing app services by downloading the binaries from an app store.
* Installing app services by downloading the binaries from an app store.
Line 106: Line 106:
* System monitoring (CPU usage, memory usage, etc).
* System monitoring (CPU usage, memory usage, etc).


=== App Services ===
== App Services ==
App services are runned by the App Platform Manager. They implement an interface that is used by the manager to start, stop and configure app instances. Each service runs in a separate child process of the manager.
App services are runned by the App Platform Manager. They implement an interface that is used by the manager to start, stop and configure app instances. Each service runs in a separate child process of the manager.


=== App Instances ===
== App Instances ==
The actual functionality of an app service is provided by app instances. They run in the same process as the app service but have a distinct webserver path and their own database. There can be 0..n instances of an app service.
The actual functionality of an app service is provided by app instances. They run in the same process as the app service but have a distinct webserver path and their own database. There can be 0..n instances of an app service.
Instances can optionally host (web) apps that can be opened in the myApps client.
Instances can optionally host (web) apps that can be opened in the myApps client.


=== Relationship between app instances and app objects in the PBX ===
== Relationship between app instances and app objects in the PBX ==
Typically an app instance is connected to one or more app objects in a customer PBX. This is done by configuring the same parameters on both sides:
Typically an app instance is connected to one or more app objects in a customer PBX. This is done by configuring the same parameters on both sides:
* URL
* URL
Line 121: Line 121:
Some apps need a websocket connection with the PBX. When "websocket" is activated at the app object, the PBX establishes a websocket connection to the app instance and provides the APIs that are configured at the app object.
Some apps need a websocket connection with the PBX. When "websocket" is activated at the app object, the PBX establishes a websocket connection to the app instance and provides the APIs that are configured at the app object.


==== Supported scenarios ====
=== Supported scenarios ===
It is important to understand that the concept does not include any restriction how PBXes and APs correlated. So you can have
It is important to understand that the concept does not do any assumptions on how PBXes and APs are correlated. So you can have
* One AP for one customer
* One AP for one customer
* Many APs for one customer
* Many APs for one customer
* One AP for many customers
* One AP for many customers
* Many APs for many customers.
* Many APs for many customers


==== Current restriction ====
=== Restrictions ===
Currently we don't have redundancy for app instances or APs.
Currently we don't have redundancy for app instances or APs.



Revision as of 17:45, 27 June 2019

General

Requirements

  • V13 or up
  • Gateway (arm): IPx10 (with CF card) or IPx11 (with mSATA SSD)
  • Virtual (x86_64): HyperV or VMWare

Default credentials

  • SSH-Login with admin and ipapps
  • root login with root and iplinux (root login is not directly possible over SSH)
  • web login pwd

App Platform - arm (Gateway)

  • The installation image has a size of ~50MB. During installation, the following partitions are created:
    • /dev/sda1 fat32: 200MB (contains ramdisk, rootfs and kernel)
    • /dev/sda2 ext4: depends on disk size (contains databases, log files and apps)
    • /dev/sda3 ext4: 500MB (contains the rootfs)
    • /dev/sda4 swap: 512MB

App Platform - x86-64 (Virtual Machine)

  • The default disk size is 16GB. It should be increased before the first start if needed!
  • Multiple CPUs are supported, default is one CPU
  • default RAM: 512MB
  • static IP address, DNS, Gateway can be configured with the command setip on the console. Run setip --help to get a list of parameters. (Example: setip --addr=x.x.x.x --mask=x.x.x.x --gateway=x.x.x.x --dns1==x.x.x.x)
  • If you have permission problems change to su user (Password is iplinux or your new admin password)
  • To figure out your ip address you can use the command: ip address on the console.
  • loadkeys de can be used to change to german keyboard layout (etc.)
  • partitions:
    • /dev/sda1 ext2: 350MB (contains ramdisk, rootfs and kernel)
    • /dev/sda2 ext4: depends on disk size (contains databases, log files and apps)
    • /dev/sda3 ext4: 500MB (contains the rootfs)
    • /dev/sda4 swap: 512MB

Installation

ARM Gateway

If you setup a Gateway with the install procedure, the App Platform is installed automatically (Https Download has to be allowed and shouldn't be blocked by any firewall.)

You can also install it manually:

  • Open App Platform -> General and Enable Linux Support. Restart the gateway.
  • You need to enable Proxy-ARP on ETH0 or ETH1, so your Gateway and the Linux Appliance will share the same physical interface.
  • Open App Platform -> IP and configure the IP settings of the App Platform. Restart the Gateway.
  • Open App Platform -> Installation and select the given version or enter an own path to the app-platform-armel.img image file.
  • The installation runs without any further required step.

Virtual machine

  • Import the image into your server environment.
  • Edit the disk size, if needed.
  • Start the machine and wait until it reboots and starts again.

Backup of the Apps

Each App Service can have multiple instances and each instance has its own database. The manager app itself also has its own database.
There are no other files which need to be backuped.
The standard way to backup the databases is through the Devices App Reference13r1:Concept_App_Service_Devices#Backups.

An alternate way is to use a command file which is similar to the command files from the firmware.

Commands

Hash parameters

  • #L App Platform label (neu), e.g. 10024
  • #A App label (neu), e.g. 130004
  • #I instance name (neu), e.g. reporting1
  • #D instance domain (neu), e.g. innovaphone.com
  • #m MAC address of the LAP, e.g. 00ab11eeff
  • #d Current date and time (plain UTC without daylight saving and timezone adjustments) 20051010-170130
  • #bn rolling backup index
  • ## escapes a hash mark

App Platform Infrastructure and Concept

Webserver

The app platform includes a webserver that is highly optimized for handling many Websocket connections at a low memory footprint. All apps use that webserver by registering for specific HTTP subpath. So they can all use the same HTTP/HTTPS ports - typically the standard ports.

Database

The app platform creates a database for each app instance. The apps should store all data in that database. That makes sure that a consistent backup and restore of app instances can be done by the app platform manager. In hosted scenarios, having separate databases for each instance also makes sure that the data of different customers are clearly separated and can easily be moved from one physical platform to another.

App Platform Manager

The App Platform Manager is the central component of the App Platform. It does the following:

  • Installing app services by downloading the binaries from an app store.
  • Running and monitoring app services. If an app service crashes it is restarted, automatically.
  • Management of app instances and providing them with the environment they need:
    • A database
    • A webserver path
    • A password for authentication
  • Backup and restore of app instances.
  • Collecting debug information like tracing and crash dumps.
  • System monitoring (CPU usage, memory usage, etc).

App Services

App services are runned by the App Platform Manager. They implement an interface that is used by the manager to start, stop and configure app instances. Each service runs in a separate child process of the manager.

App Instances

The actual functionality of an app service is provided by app instances. They run in the same process as the app service but have a distinct webserver path and their own database. There can be 0..n instances of an app service. Instances can optionally host (web) apps that can be opened in the myApps client.

Relationship between app instances and app objects in the PBX

Typically an app instance is connected to one or more app objects in a customer PBX. This is done by configuring the same parameters on both sides:

  • URL
  • Password

The password is used by the PBX for authenticating itself, users and services against the app instance.

Some apps need a websocket connection with the PBX. When "websocket" is activated at the app object, the PBX establishes a websocket connection to the app instance and provides the APIs that are configured at the app object.

Supported scenarios

It is important to understand that the concept does not do any assumptions on how PBXes and APs are correlated. So you can have

  • One AP for one customer
  • Many APs for one customer
  • One AP for many customers
  • Many APs for many customers

Restrictions

Currently we don't have redundancy for app instances or APs.

How-Tos

Resizing the disk of a Virtual machine

  • stop the VM
  • expand the disk using your VM utilities
  • start the VM and boot from the first boot entry rescue/setup
  • login with root and iplinux
  • call /home/root/install_step1.sh log.txt resize
  • the VM reboots automatically after a successful resize