Configuring Application Hosting for the Cisco IR1101 Industrial Integrated Services Router
To configure application hosting, enable IOx and configure a VirtualPortGroup to a Layer 3 data port as described in the following sections.
Enable IOx
Perform the following steps to enable access to Cisco IOx Local Manager. 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.
Enter the following command to enable privileged EXEC mode:
Device> enable
Enter this command to enter global configuration mode:
Device# configure terminal
Enter this command to enable Cisco IOx:
Device(config)# iox
Enter this command to enable the HTTP server on your IPv4 or IPv6 system:
Device(config)# ip http server
Enter this command to enable a secure HTTP (HTTPS) server:
Device(config)# ip http secure-server
Use the following command to establish a username-based authentication system and privilege level. The username privilege level must be configured as 15.
Command format:
username name privilege level password {0 | 7 | user-password } encrypted-password
Command example:
Device(config)# username cisco privilege 15 password 0 cisco
Enter this command to exit the interface configuration mode and return to the privileged EXEC mode:
Device(config-if)# end
Multiple Layer 3 data ports can be routed to one or more VirtualPortGroups or containers.
A VirtualPortGroup interface is a virtual interface that connects the application hosting network to the IOS routing domain.
VirutalPortGroups and Layer 3 data ports must be on different subnets.
To configure a VirtualPortGroup to a Layer 3 data port, follow these steps:
Enter the following command to enable privileged EXEC mode. Enter your password if prompted.
Device> enable
Enter the following command to enter global configuration mode:
Device# configure terminal
Enter the following command to enable IP routing. The ip routing command must be enabled to allow external routing on Layer 3 data ports.
Device(config)# ip routing
Use the following command to configure an interface and enter interface configuration mode.
Command format:
interface type number
Command example:
Device(config)# interface gigabitethernet 0/0/0
Enter the following command to place the interface in Layer 3 mode and make it operate more like a router interface than a switch port:
Device(config-if)# no switchport
Use the following command to configure an IP address for the interface.
Command format:
ip address ip-address mask
Command example:
Device(config)# ip address 10.1.1.1 255.255.255.0
Enter the following command to exit interface configuration mode and return to global configuration mode:
Device(config-if)# exit
Use the following command to configure an interface and enter interface configuration mode.
Command format:
interface type number
Command example:
Device(config)# interface virtualportgroup 0
Use the following command to configure an IP address for the interface.
Command format:
ip address ip-address mask
Command example:
Device(config-if)# ip address 192.168.0.1 255.255.255.0
Enter the following command to exit interface configuration mode and return to privileged EXEC mode:
Device(config-if)# end
Application vNIC interface is the standard Ethernet interface inside the container that connects to the platform data plane for application to send and receive packets.
Use the following command to enters global configuration mode, and then enter configuration commands, one per line. Press CTRL-Z when you are finished entering configuration commands.
Device# configure terminal
Use the following command to configure the application and enter the application configuration mode.
Command format:
app-hosting appid app1
Command example:
Device(config)# app-hosting appid app1
Use the app-vnic command to configure the application interface and the gateway of the application. For example:
Device(config-app-hosting)# app-vnic gateway0 virtualportgroup 0 guest-interface 0
Use the guest-ipaddress command to configure the application Ethernet interface IP address. For example:
Device(config-app-hosting-gateway0)# guest-ipaddress 192.168.0.2 netmask 255.255.255.0
Use the app-default-gateway command to configure the default gateway for the application. For example:
Device(config-app-hosting-gateway0)# app-default-gateway 192.168.0.1 guest-interface 0
Enter the following command to exit global configuration mode and return to privileged EXEC configuration mode:
Device# end
Application Lifecycle Management
This section describes how to install and uninstall apps.
Use the following command to enable privileged EXEC mode:
Device> enable
Use the following command to install an app from the specified location. The app can be installed from any local storage location such as, flash, bootflash, and usbflash0.
Command format:
app-hosting install appid application-name package package-path
Command example:
Device(config)# app-hosting install appid lxc_app package flash:my_iox_app.tar
Use the following command to activate the application. This command validates all application resource requests, and if all resources are available, activates the application. If all resources are not available, the activation fails.
Command format:
app-hosting activate appid application-name
Command example:
Device# app-hosting activate appid app1
Use the following command to start the application. This command activates the application start-up scripts.
Command format:
app-hosting start appid application-name
Command example:
Device# app-hosting start appid app1
Use the following command to stop the application.
Command format:
app-hosting stop appid application-name
Command example:
Device# app-hosting stop appid app1
Use the following command to deactivate all resources that are allocated for the application.
Command format:
app-hosting deactivate appid application-name
Command example:
Device# app-hosting deactivate appid app1
Use the following command to uninstall the application. This command uninstalls all packaging and images that are stored, and removes all changes and updates to the application.
Command format:
app-hosting uninstall appid application-name
Command example:
Device# app-hosting uninstall appid app1
App Resource Configuration
This section describes how to configure app resources. Resource changes take effect only after the app-hosting activate command is configured.
Use the following command to enable privileged EXEC mode:
Device> enable
Use the following command to enter global configuration mode:
Device# configure terminal
Use the following command to enable application hosting and enter application hosting configuration mode.
Command format:
app-hosting appid name
Command example:
Device# app-hosting appid app1
Use the following command to configure the custom application resource profile and enter custom application resource profile configuration mode.
Note: Only the custom profile name is supported.
Device(config-app-hosting)# app-resource profile custom
Use the following command to change the default CPU allocation for the application.
Resource values are application-specific. If you make any adjustments to these values, ensure that the application can run reliably with the changes.
Command format:
cpu unit
Command example:
Device(config-app-resource-profile-custom)# cpu 800
Use the following command to change the default memory allocation for the application.
Command format:
memory memory
Command example:
Device(config-app-resource-profile-custom)# memory 512
Use the following command to change the virtual CPU (vCPU) allocation for the application.
Command format:
vcpu number
Command example:
Device(config-app-resource-profile-custom)# vcpu 2
Use the following command to exit custom application resource profile configuration mode and returns to privileged EXEC mode.
Device(config-app-resource-profile-custom)# end
Verifying the Application Hosting Configuration
This section describes how to verify the application hosting configuration.
Use the following command to enable privileged EXEC mode:
Device> enable
Use the following command to display the status of all IOx services:
Device# show iox-service
IOx Infrastructure Summary:
–––––––––––––––––––––––––––––––––––-
IOx Service (CAF) : Running
IOx Service (HA) : Running
IOx Service (IOxman) : Running
Libvirtd : Running
Use the following command to display detailed information about the application:
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
Use the following command to display the list of applications and their statuses:
Device# show app-hosting list
App id State
---------------------------------------------
app1 RUNNING
Use the Console command to connect to the application, as shown in the following example:
iox-ir1101-02# app-hosting app-hosting connect appid app1 console
Connected to appliance. Exit using ^c^c^c
root@ir510-lxc:~#
root@ir510-lxc:~#
root@ir510-lxc:~#
root@ir510-lxc:~#
root@ir510-lxc:~#
root@ir510-lxc:~# IR11014006#
IR11014006#
IR11014006#
(Press Ctrl+C three times to disconnect the console)