IOx Application Hosting

This section contains the following topics:

Application Hosting Overview

A hosted application is a software as a service solution, and it can be run remotely using commands. Application hosting gives administrators a platform for leveraging their own tools and utilities.

This module describes the Application Hosting feature and how to enable it.

An excellent source of additional information can be found on DevNet.

Information About Application Hosting

Need for Application Hosting

The move to virtual environments has given rise to the need to build applications that are reusable, portable, and scalable. Application hosting gives administrators a platform for leveraging their own tools and utilities. An application, hosted on a network device, can serve a variety of purposes. This ranges from automation, configuration management monitoring, and integration with existing tool chains.

Cisco devices support third-party off-the-shelf applications built using Linux tool chains. Users can run custom applications cross-compiled with the software development kit that Cisco provides.

IOx Overview

IOx is a Cisco-developed end-to-end application framework that provides application hosting capabilities for different application types on Cisco network platforms.

IOx architecture for the ESR6300 is different compared to other Cisco platforms that use the hypervisor approach. In other platforms, IOx runs as a virtual machine. IOx is running as a process on the ESR6300.

The only type of container supported on the ESR6300 is the LXC container.

Cisco Application Hosting Overview

The ESR6300 enables the user to deploy the application using the app-hosting CLIs. These app-hosting CLIs are not avaiable on the other older platforms. There are additional ways to deploy the applications using the Local Manager.

Application hosting provides the following services:

  • Launches designated applications in containers.
  • Checks available resources (memory, CPU, and storage), and allocates and manages them.
  • Provides support for console logging.
  • Provides access to services via REST APIs.
  • Provides a CLI endpoint.
  • Provides an application hosting infrastructure referred to as Cisco Application Framework (CAF).
  • Helps in the setup of platform-specific networking (packet-path) via VirtualPortGroup and management interfaces

The container is referred to as the virtualization environment provided to run the guest application on the host operating system. The Cisco IOS-XE virtualization services provide manageability and networking models for running guest applications. The virtualization infrastructure allows the administrator to define a logical interface that specifies the connectivity between the host and the guest. IOx maps the logical interface into the Virtual Network Interface Card (vNIC) that the guest application uses.

Applications to be deployed in the containers are packaged as TAR files. The configuration that is specific to these applications is also packaged as part of the TAR file.

The management interface on the device connects the application hosting network to the IOS management interface. The Layer 3 interface of the application receives the Layer 2 bridged traffic from the IOS management interface. The management interface connects through the management bridge to the container/application interface. The IP address of the application must be on the same subnet as the management interface IP address.

IOXMAN

IOXMAN is a process that establishes a tracing infrastructure to provide logging or tracing services for guest applications, except Libvirt, that emulates serial devices. IOXMAN is based on the lifecycle of the guest application to enable and disable the tracing service, to send logging data to IOS syslog, to save tracing data to IOx tracelog, and to maintain IOx tracelog for each guest application.

Application Hosting on the ESR6300 Industrial Integrated Services Router

This section describes the application-hosting characteristics specific to the ESR6300 Industrial Integrated Services Router.


Note


The ESR6300 CPU is not based on x86 architecture like other Routers. Therefore, this requires the application to comply with the ARM 64-bits architecture.

Application hosting can be achieved using the app-hosting cli's as well using the Local Manager and Fog Director. Application hosting using Local Manager is done through the WebUI. In order to deply the applications using Local Manager, WebUI should be enabled and then login to the Local Manager.

Figure 1. Local Manager

1. From the WebUI, click on Configuration > Services > IOx

2. Login using the username and password configured.

3. Follow the steps for the application lifecycle in the Cisco IOx Local Manager Reference Guide using this link: https://www.cisco.com/c/en/us/support/cloud-systems-management/iox/products-technical-reference-list.html

The next section explains the deployment of an application using the app-hosting cli's.

VirtualPortGroup

The VirtualPortGroup is a software construct on Cisco IOS that maps to a Linux bridge IP address. As such, the VirtualPortGroup represents the switch virtual interface (SVI) of the Linux container. Each bridge can contain multiple interfaces; each mapping to a different container. Each container can also have multiple interfaces.

VirtualPortGroup interfaces are configured by using the interface virtualportgroup command. Once these interfaces are created, IP address and other resources are allocated.

The VirtualPortGroup interface connects the application hosting network to the IOS routing domain. The Layer 3 interface of the application receives routed traffic from IOS. The VirtualPortGroup interface connects through the SVC Bridge to the container/application interface.

The following graphic helps to understand the relationship between the VirtualPortGroup and other interfaces, as it is different than the IR8x9 routers.

Figure 2. Virtual Port Group Mapping

vNIC

For the container life cycle management, the Layer 3 routing model that supports one container per internal logical interface is used. This means that a virtual Ethernet pair is created for each application; and one interface of this pair, called vNIC is part of the application container. The other interface, called vpgX is part of the host system.

NIC is the standard Ethernet interface inside the container that connects to the platform dataplane for the sending and receiving of packets. IOx is responsible for the gateway (VirtualPortGroup interface), IP address, and unique MAC address assignment for each vNIC in the container.

The vNIC inside the container/application are considered as standard Ethernet interfaces.

How to Configure Application Hosting

Enabling IOX

Before you begin

Perform this task to enable access to the IOx Local Manager. The IOx Local Manager provides a web-based user interface that you can use to manage, administer, monitor, and troubleshoot apps on the host system, and to perform a variety of related activities.


Note


In the steps that follow, IP HTTP commands do not enable IOX, but allow the user to access the WebUI to connect the IOX Local Manager.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device#configure terminal

Enters global configuration mode.

Step 3

iox

Example:

Device(config)#iox

Enables IOx

Step 4

ip http server

Example:

Device(config)#ip http server

Enables the HTTP server on your IP or IPv6 system.

Step 5

ip http secure-server

Example:

Device(config)#ip http secure-server

Enables a secure HTTP (HTTPS) server.

Step 6

username name privilege level password 0|7 user-password|encrypted-password

Example:

Device(config)#username cisco privilege 15 password 0 cisco

The username privilege level must be configured as 15.

Step 7

end

Example:

Device(config-if)#end

Exits interface configuration mode and returns to privileged EXEC mode.

Configuring a VirtualPortGroup to a Layer 3 Data Port

Multiple Layer 3 data ports can be routed to one or more VirtualPortGroups or containers. VirutalPortGroups and Layer 3 data ports must be on different subnets.

Enable the ip routing command to allow external routing on the Layer 3 data-port.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device#configure terminal

Enters global configuration mode.

Step 3

ip routing

Example:

Device(config)#ip routing

Enables IP routing.

The ip routing command must be enabled to allow external routing on Layer 3 data ports.

Step 4

interface type number

Example:

Device(config)#interface gigabitethernet 0/0/0

Configures an interface and enters interface configuration mode.

Step 5

no switchport

Example:

Device(config-if)#no switchport

Places the interface in Layer 3 mode, and makes it operate more like a router interface rather than a switch port.

Step 6

ip address ip-address mask

Example:

Device(config-if)#ip address 10.1.1.1 255.255.255.0

Configures an IP address for the interface.

Step 7

exit

Example:

Device(config-if)#exit

Exits interface configuration mode and returns to global configuration mode.

Step 8

interface type number

Example:

Device(config)#interface virtualportgroup 0

Configures an interface and enters interface configuration mode.

Step 9

ip address ip-address mask

Example:

Device(config-if)#ip address 192.168.0.1 255.255.255.0

Configures an IP address for the interface.

Step 10

end

Example:

Device(config-if)#end

Exits interface configuration mode and returns to privileged EXEC mode.

Step 11

configure terminal

Example:

Enter configuration commands, one per line. End with CNTL/Z.

Device#configure terminal

Enters global configuration mode.

Step 12

app-hosting appid app1

Example:

Device(config)#app-hosting appid app1

Configures the application and enters the application configuration mode.

Step 13

app-vnic gateway0 virtualportgroup 0 guest-interface 0

Example:

Device(config-app-hosting)#app-vnic gateway0 virtualportgroup 0 guest-interface 0

Configures the application interface and the gateway of the application.

Step 14

guest-ipaddress ip-address netmask netmask

Example:

Device(config-app-hosting-gateway0)#guest-ipaddress 192.168.0.2 netmask 255.255.255.0

Configures the application Ethernet interface ip address.

Step 15

app-default-gateway ip-address guest-interface number

Configures the default gateway for the application.

Step 16

end

Example:

Device#end

Exits global configuration mode and returns to privileged EXEC configuration mode.

Installing and Uninstalling Apps

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

app-hosting install appid application-name package package-path

Example:

Device#app-hosting install appid lxc_app package flash:my_iox_app.tar

The app can be installed from any local storage location such as, flash, bootflash, and usbflash0.

Step 3

app-hosting activate appid application-name

Example:

Device#app-hosting activate appid app1

Activates the application.

This command validates all application resource requests, and if all resources are available the application is activated; if not, the activation fails.

Step 4

app-hosting start appid application-name

Example:

Device#app-hosting start appid app1

Starts the application.

Application start-up scripts are activated.

Step 5

app-hosting stop appid application-name

Example:

Device#app-hosting stop appid app1

Stops the application.

Step 6

app-hosting deactivate appid application-name

Example:

Device#app-hosting deactivate appid app1

Deactivates all resources allocated for the application.

Step 7

app-hosting uninstall appid application-name

Example:

Device#app-hosting uninstall appid app1

Uninstalls the application.

Uninstalls all packaging and images stored.

All changes and updates to the application are also removed.

Overriding the App Resource Configuration

Resource changes will take effect only after the app-hosting activate command is configured.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device#configure terminal

Enters global configuration mode.

Step 3

app-hosting appid name

Example:

Device(config)#app-hosting appid app1

Enables application hosting and enters application hosting configuration mode.

Step 4

app-resource profile name

Example:

Device(config-app-hosting)#app-resource profile custom

Configures the custom application resource profile, and enters custom application resource profile configuration mode.

Only the custom profile name is supported.

Step 5

cpu unit

Example:

Device(config-app-resource-profile-custom)# cpu 800

Changes the default CPU allocation for the application.

Step 6

memory memory-unit

Example:

Device(config-app-resource-profile-custom)# memory 512

Resource values are application-specific, and any adjustment to these values must ensure that the application can run reliably with the changes.

Step 7

vcpu number

Example:

Device(config-app-resource-profile-custom)# vcpu 2

Changes the default memory allocation.

Step 8

end

Example:

Device(config-app-resource-profile-custom)# end

Exits custom application resource profile configuration mode and returns to privileged EXEC mode.

Verifying the Application Hosting Configuration

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device>enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

show iox-service

Example:

Device# show iox-service
IOx Infrastructure Summary:
–––––––––––––––––––––––––––––––––––-
IOx Service (CAF) : Running
IOx Service (HA) : Running
IOx Service (IOxman) : Running
Libvirtd : Running

Displays the status of all IOx services

Step 3

show app-hosting detail

Example:

Device#show app-hosting detail
App id : app1
Owner : iox
State : RUNNING
Application
Type : lxc
Name : nt08-stress
Version : 0.1
Description : Stress Testing Application
Path : usbflash0: my_iox_app.tar
Activated profile name : custom
Resource reservation
Memory : 64 MB
Disk : 2 MB
CPU : 500 units
Attached devices
Type Name Alias
---------------------------------------------
serial/shell iox_console_shell serial0
serial/aux iox_console_aux serial1
serial/syslog iox_syslog serial2
serial/trace iox_trace serial3
Network interfaces
---------------------------------------
eth0:
MAC address : 52:54:dd:fa:25:ee

Displays detailed information about the application.

Step 4

show app-hosting list

Example:

Device#show app-hosting list
App id State
-----------------------------------------

Displays the list of applications and their status.

Configuration Examples for Application Hosting

See the following examples:

Example: Enabling IOx


Device> enable
Device# configure terminal
Device(config)# iox
Device(config)# ip http server
Device(config)# ip http secure-server
Device(config)# username cisco privilege 15 password 0 cisco
Device(config)# end

Example: Configuring a VirtualPortGroup to a Layer 3 Data Port


Device> enable
Device# configure terminal 
Device(config)# ip routing
Device(config)# interface gigabitethernet 0/0/0
Device(config-if)# no switchport
Device(config-if)# ip address 10.1.1.1 255.255.255.0
Device(config-if)# exit
Device(config)# interface virtualportgroup 0
Device(config-if)# ip address 192.168.0.1 255.255.255.0
Device(config-if)# end

Example: Installing and Uninstalling Apps


Device> enable 
Device# app-hosting install appid app1 package flash:my_iox_app.tar
Device# app-hosting activate appid app1
Device# app-hosting start appid app1
Device# app-hosting stop appid app1
Device# app-hosting deactivate appid app1
Device# app-hosting uninstall appid app1

Example: Overriding the App Resource Configuration


Device# configure terminal
Device(config)# app-hosting appid app1
Device(config-app-hosting)# app-resource profile custom
Device(config-app-resource-profile-custom)# cpu 800
Device(config-app-resource-profile-custom)# memory 512
Device(config-app-resource-profile-custom)# vcpu 2
Device(config-app-resource-profile-custom)# end