This section provides details about Application Manager operations and IOS XR commands used to manage running containers, including start, stop, kill, and exec actions.
Action commands
App Manager action commands are used to start, stop, kill and exec shell commands inside running container.
| Command name |
Commands |
Purpose |
|---|---|---|
| Application start |
appmgr application start name <name> | Starts a stopped container or application. |
| Application stop |
appmgr application stop name <name> | Stops a stopped running container or application. |
| Application kill |
appmgr application kill name <name> | Kills a running container or application. |
| Application copy |
appmgr application copy <storage-path> | Copy data between host and container. |
| Appliction exec |
appmgr application exec <name> docker-exec-cmd <cmd> | Executes command inside TP container application (docker only). |
Examples
Here are examples for the app manager action commands. For more information on the commands, see Command Reference Guide for NCS 1001.
Action CLI (Start): This starts a stopped container
RP/0/RP0/CPU0:ios# appmgr application start name alpine_app
Action CLI (Stop): This stops a running container
RP/0/RP0/CPU0:ios# appmgr application stop name alpine_app
Action CLI (Kill): This forcefully kills a running container
RP/0/RP0/CPU0:ios# appmgr application kill name alpine_app
Action CLI (Copy): Copy data between host and container
RP/0/RP0/CPU0:ios# appmgr application copy harddisk:/data.txt alpine_app:/
Action CLI (Exec): Execute command inside TP container app
RP/0/RP0/CPU0:ios# appmgr application exec name txt alpine_app docker-exec-cmd “ls -ltr”
Show commands
App Manager show commands shows the application or container info.
| Command name |
Commands |
Purpose |
|---|---|---|
| Source table modification |
show appmgr source-table | Lists all third-party applications onboarded via (XR Infra / Appmgr CLI / Containerz). |
| Application table modification |
show appmgr application-table | Lists all third-party applications managed via (Config / Containerz) workflow in a tabular view. |
| Application source name |
show appmgr source name <name> | Shows the source name. |
| Application package install |
show appmgr packages installed | Lists all the application manager RPM packages installed. |
| Appliction exec |
show appmgr application name <name> info[ detail| summary] | Shows application information at desired verbosity. |
| Application logs |
show appmgr application name <name> logs | Shows application logs. |
| Application stats |
show appmgr application name name stats | Shows application statistics. |
| Application process script table |
show appmgr process-script-table | Shows summary status of all registered process-scripts. |
Examples
This section shows the example outputs for the show appmgr commands. For more information on the show appmgr commands, see the Command Reference guide for the NCS 1001.
The example output shows the onboarded TP applications.
RP/0/RP0/CPU0:ios# show appmgr source-table
Sno Name File Installed By
--- ----------------- -------------------- -----------------------------------
1 alpine alpine.tar.gz containerz
2 hello-world hello-world.tar.gz app_manager
3 bonnet bonnet.tar.gz xr_install
The example output shows the Workflow column that specifies how to manage the TP applications.
RP/0/RP0/CPU0:ios#show appmgr application-table
Name Type Config State Status Workflow
------------- ------ ------------ ------------- ---------------------------------
alp-cz-app Docker Activated Up 2 minutes containerz
bnt-cfg-app Docker Activated Up 1 minutes config
The example output shows the details of the swan application. The Status value under Vrf Relay: <name> indicates the running status of the relay agent. If it reports an Exited state or a Restarting state, use the relay agent logs for troubleshooting.
RP/0/RP0/CPU0:ios#show appmgr application name swan info detail
Mon Nov 23 21:22:47.240 UTC
Application: swan
Type: Docker
Source: swanagent
Config State: Activated
Docker Information:
Container ID: cd27988cd5b066d6272085e5e3ff675c94a64cb4ad06f90c2d89453a8ec4af34
Container name: swan
Labels:
Image: swanagent:latest
Command: "./agentxr"
Created at: 2020-11-23 21:22:39 +0000 UTC
Running for: 8 seconds ago
Status: Up Less than a second
Size: 0B (virtual 82.9MB)
Ports:
Mounts: /var/opt/cisco/iosxr/appmgr/config/docker/swanagent,/var/run/netns
Networks: host
LocalVolumes: 0
Vrf Relays:
Vrf Relay: vrf_relay.swan.70ec1f59336271ab
Source VRF: vrf-mgmt
Source Port: 8000
Destination VRF: vrf-default
Destination Port: 10000
IP Address Range: 172.16.0.0/12
Status: Up 10 seconds
Vrf Relay: vrf_relay.swan.5c7373d41d0ec84f
Source VRF: vrf-mgmt
Source Port: 8001
Destination VRF: vrf-default
Destination Port: 10001
IP Address Range: 172.16.0.0/12
Status: Up 11 seconds