Deploy IOx Application on AP Using ioxclient

The ioxclient, a command line tool in the Cisco IOx SDK, is used to develop, test, and deploy IOx applications.

Create Profile

To use the ioxclient, first create a profile to be used with the AP which will host the IOx application.

root@ioxsde:~# ioxclient pr create
Active Profile :  ap9105-202
Enter a name for this profile : testprofile              <<<<<<<< Name the profile
Your IOx platform's IP address[127.0.0.1] : 1.1.1.1   <<<<<<<< Enter the AP's IP address
Your IOx platform's port number[8443] :
Authorized user name[root] : admin                    <<<<<<<< Enter the AP's Username
Password for admin :                                  <<<<<<<< Enter the AP's Password
Local repository path on IOx platform[/software/downloads]:
URL Scheme (http/https) [https]:
API Prefix[/iox/api/v2/hosting/]:
Your IOx platform's SSH Port[2222]: 22                <<<<<<<< Change port to 22
Your RSA key, for signing packages, in PEM format[]:
Your x.509 certificate in PEM format[]:
Activating Profile  new-profile
Saving current configuration
root@ioxsde:~#

Check IOx Application Status on AP

During any step of the IOx application installation, you can use the below command to check the status of IOx applications running on the Cisco Catalyst AP.

ioxclient --profile <profile-name> application list

Install the IOx Application on AP

ioxclient --profile <profile-name> application install <package-name> <package.tar>

Note: The IOx package cannot have a hyphen (“-“) in the name. An added hyphen results in the package installation failure.

Activate the IOx Application on AP

ioxclient --profile <profile-name> application activate <package-name> --payload <activation-payload-file>
 
 
# An activation.json file is optional. However, if the IOx app needs access to a serial device or needs a network port map of 1:1, then this file should be provided.
# example activation payload file
root@ioxsde:~# cat activation.json
{
        "resources":
        {
                "network": [{"interface-name": "eth0", "network-name": "iox-nat0", "port_map":{"mode" : "1to1" } }],
                "devices": [{"type": "serial", "alias": "usb_serial", "label": "HOST_DEV", "device-id":"/dev/ttyUSB0", "usage":"Serial device of USB port of AP"}]
        }
}

Start the IOx Application on AP

ioxclient --profile <profile-name> application start <package-name>

Alternatively, to install, activate, and start the IOx app at one go, you can also use the below command:

ioxclient --profile <profile-name> application run <package-name> <package.tar> --payload activation.json

Stop the IOx Application on AP

ioxclient --profile <profile-name> application stop <package-name>

Deactivate the IOx Application on AP

ioxclient --profile <profile-name> application deactivate <package-name>

Uninstall the IOx Application on AP

ioxclient --profile <profile-name> application uninstall <package-name>