What's New
Product Documentation

Docker Agent Installation for Cisco Catalyst 9000 Series Switches

This article details the steps to install a ThousandEyes Enterprise Agent Docker container on a Cisco Catalyst 9000-series switch running IOS XE, using the command line. The agent is a signed ThousandEyes Docker image that can be quickly launched using Cisco application hosting. The agent can also be installed using the Cisco DNA Center orchestrator.

Requirements

In order to do the steps outlined in this article, you must have the following in place:

  • A Cisco Catalyst 9300 switch, running IOS XE version 17.3.3.

  • Cisco DNA Advantage or DNA Premier licensing, to enable application hosting. (See Application Licensing.)

  • 500 MB of available memory per installed appliance. (See IOX Application Resource Limitations.)

  • 4 GB of free space on the bootflash. To verify the amount of free space on bootflash:

    Dut1#dir bootflash: | include total
    11353194496 bytes total (5859037184 bytes free)
  • Knowledge of the vlan where the internet gateway for this app connects to the internet.

  • Familiarity with Cisco Catalyst IOS XE application hosting. (See Application Hosting.)

Installation Steps

The installation process consists of the following steps:

Downloading the Docker Image

Download the Docker image from the ThousandEyes dashboard and copy it to your Cisco switch using SCP, FTP, TFTP, or USB storage.

If the switch has internet access, download the image directly onto the switch. Download the package from the ThousandEyes downloads site.

  1. Log in to the ThousandEyes platform using a login belonging to the account group that will be associated with the appliance.

  2. Go to Cloud & Enterprise Agents > Agent Settings and click Add New Enterprise Agent.

  3. Download the .tar file with the ThousandEyes appliance for Catalyst 9000-series switches.

  4. Use SCP, FTP, TFTP, or USB storage to copy the signed Docker image to the switch's flash: directory.

    copy scp://[email protected]/thousandeyes-enterprise-agent-3.0.cat9k.tar flash:
  5. Run a checksum (md5) command to verify that the package transfer was successful. The md5 output should match 66c9ddf64575de515a1305a1c682d8fe:

    catalyst#verify /md5 flash:thousandeyes-enterprise-agent-3.0.cat9k.tar
    -----------------------------------------------------------
    verify /md5 (flash:thousandeyes-enterprise-agent-3.0.cat9k.tar) = 66c9ddf64575de515a1305a1c682d8fe

Installing the Docker Container

  1. Enable the IOx framework on the switch:

    Enter configuration commands, one per line. End with CNTL/Z.
    catalyst(config)#iox
    catalyst(config)#end
  2. Wait until all the services are running:

    catalyst#show iox-service
    ​IOx Infrastructure Summary:
    ---------------------------
    IOx service (CAF) 1.11.0.5 : Running
    IOx service (HA) : Running
    IOx service (IOxman) : Running
    IOx service (Sec storage) : Not Running
    Libvirtd 1.3.4 : Running
    Dockerd 18.03.0 : Running
    Application DB Sync Info : Available
    Sync Status : Disabled
  3. Run the install command:

    catalyst#app-hosting install appid <app-name > package flash:thousandeyes-enterprise-agent-3.0.cat9k.tar

    Specify your desired app name and the location of the image file you want to use. In this example, we use thousandeyes_enterprise_agent.

  4. If the image is hosted on an HTTPS server, you can run the following command to download the image:

    catalyst#app-hosting install appid <app-name> package https://downloads.thousandeyes.com/enterprise-agent/thousandeyes-enterprise-agent-3.0.cat9k.tar
  5. Your application should now be installed. You can check on it by running the following:

    catalyst#sh app-hosting list
    App id State
    thousandeyes_enterprise_agent DEPLOYED

Configuring the Docker Container

Docker supports both guest IP address assignment and dynamic IP address assignment. You must configure a single virtual network interface card (vNIC) for the appliance.

  1. Verify that the front panel data port is running, with Layer-2 VLAN allowed from uplink:

    interface GigabitEthernet1/0/13
    description Uplink MGMT
    switchport access vlan 21
  2. Create an SVI (Switch Virtual Interface) that matches with Layer-2 VLAN:

    interface Vlan21
    ip address 10.100.21.13 255.255.255.0
  3. Configure the AppGigabitEthernet port to allow Layer-2 VLAN:

    interface AppGigabitEthernet1/0/1
    switchport trunk allowed vlan 21
    switchport mode trunk
  4. Configure the application, either with a static IP or with DHCP IP.

    Configuration with Static IP

    Use a guest IP address to assign a static IP address. In this example, assign 10.100.21.222/24, under VLAN 21 and use Google resolver:

    catalyst(config)#app-hosting appid thousandeyes_enterprise_agent
    catalyst(config-app-hosting)#app-vnic AppGigabitEthernet trunk
    catalyst(config-config-app-hosting-trunk)#vlan 21 guest-interface 0
    catalyst(config-config-app-hosting-vlan-access-ip)#guest-ipaddress 10.100.21.222 netmask 255.255.255.0
    catalyst(config-config-app-hosting-vlan-access-ip)#exit
    catalyst(config-config-app-hosting-trunk)#exit
    catalyst(config-app-hosting)#app-default-gateway 10.100.21.1 guest-interface 0
    catalyst(config-app-hosting)#name-server0 8.8.8.8
    catalyst(config-app-hosting)#name-server1 8.8.4.4

    Next, set up the required Docker run options to specify account token. If you want to specify a hostname other than the switch's name, do this here as well:

    catalyst(config-app-hosting)#app-resource docker
    catalyst(config-app-hosting-docker)#prepend-pkg-opts
    catalyst(config-app-hosting-docker)#run-opts 1 "-e TEAGENT_ACCOUNT_TOKEN=<Token>"
    catalyst(config-app-hosting-docker)#run-opts 2 "--hostname Cisco-Docker"
    catalyst(config-app-hosting)#start
    catalyst(config-app-hosting)#end

    Configuration with DHCP IP

    Make sure the DHCP server is running on the layer-2 VLAN. In this case, assign a DHCP address under VLAN 21 and use Google resolver:

    catalyst(config)#app-hosting appid thousandeyes_enterprise_agent
    catalyst(config-app-hosting)#app-vnic AppGigabitEthernet trunk
    catalyst(config-config-app-hosting-trunk)#vlan21 guest-interface 0

    Next, set up the required Docker run options to specify the account token. If you want to specify a hostname other than the switch's name, do this here as well:

    catalyst(config-config-app-hosting-vlan-access-ip)#app-resource docker
    catalyst(config-app-hosting-docker)#prepend-pkg-opts
    catalyst(config-app-hosting-docker)#run-opts 1 "-e TEAGENT_ACCOUNT_TOKEN=<Token>"
    catalyst(config-app-hosting-docker)#run-opts 2 "--hostname Cisco-Docker"
    catalyst(config-app-hosting-docker)#name-server0 8.8.8.8
    catalyst(config-app-hosting)#start
    catalyst(config-app-hosting)#end

    For a full list of the Docker configuration options, see Docker Agent Configuration Options.

  5. Exit three times to completely exit out of config mode.

  6. Use wr mem to ensure that your configuration changes have persisted across reboots:

    catalyst#wr mem
    Building configuration...
    [OK]

Verifying That the Docker Container Is Running

With the (config-app-hosting)#start command, the Docker container should have been started and should be running.

  1. Verify this by running the following:

    catalyst# sh app-hosting list
    App id State
    ---------------------------------------------------------
    thousandeyes_enterprise_agent RUNNING
  2. Verify the Docker container’s details:

    catalyst#show app-hosting detail appid thousandeyes_enterprise_agent
    App id : thousandeyes_enterprise_agent
    Owner : iox
    State : RUNNING
    Application
    Type : docker
    Name : thousandeyes/enterprise-agent
    Version : 3.0
    Description :
    Path : flash:thousandeyes-enterprise-agent-3.0.cat9k.tar
    URL Path :
    Activated profile name : custom
    Resource reservation
    Memory : 500 MB
    Disk : 1 MB
    CPU : 1850 units
    VCPU : 1
    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:d:38:3d
    Network name : mgmt-bridge-v21
    Docker
    ------
    Run-time information
    Command :
    Entry-point : /sbin/my_init
    Run options in use : -e TEAGENT_ACCOUNT_TOKEN=TOKEN_NOT_SET
    --hostname=$(SYSTEM_NAME) --cap-add=NET_ADMIN --mount
    type=tmpfs,destination=/var/log/agent,tmpfs-size=140m --mount
    type=tmpfs,destination=/var/lib/te-agent/data,tmpfs-size=200m -v
    $(APP_DATA)/data:/var/lib/te-agent -e TEAGENT_PROXY_TYPE=DIRECT -e
    TEAGENT_PROXY_LOCATION= -e TEAGENT_PROXY_USER= -e
    TEAGENT_PROXY_AUTH_TYPE= -e TEAGENT_PROXY_PASS= -e
    TEAGENT_PROXY_BYPASS_LIST= -e TEAGENT_KDC_USER= -e TEAGENT_KDC_PASS=
    -e TEAGENT_KDC_REALM= -e TEAGENT_KDC_HOST= -e TEAGENT_KDC_PORT=88 -e
    TEAGENT_KERBEROS_WHITELIST= -e TEAGENT_KERBEROS_RDNS=1 -e PROXY_APT=
    -e APT_PROXY_USER= -e APT_PROXY_PASS= -e APT_PROXY_LOCATION= -e
    TEAGENT_AUTO_UPDATES=1 -e
    TEAGENT_ACCOUNT_TOKEN=nfhjzm8e8ikg07d4n31wcsws9bakcloh --hostname
    Cisco-Docker
    Package run options : -e TEAGENT_ACCOUNT_TOKEN=TOKEN_NOT_SET
    --hostname=$(SYSTEM_NAME) --cap-add=NET_ADMIN --mount
    type=tmpfs,destination=/var/log/agent,tmpfs-size=140m --mount
    type=tmpfs,destination=/var/lib/te-agent/data,tmpfs-size=200m -v
    $(APP_DATA)/data:/var/lib/te-agent -e TEAGENT_PROXY_TYPE=DIRECT -e
    TEAGENT_PROXY_LOCATION= -e TEAGENT_PROXY_USER= -e
    TEAGENT_PROXY_AUTH_TYPE= -e TEAGENT_PROXY_PASS= -e
    TEAGENT_PROXY_BYPASS_LIST= -e TEAGENT_KDC_USER= -e TEAGENT_KDC_PASS=
    -e TEAGENT_KDC_REALM= -e TEAGENT_KDC_HOST= -e TEAGENT_KDC_PORT=88 -e
    TEAGENT_KERBEROS_WHITELIST= -e TEAGENT_KERBEROS_RDNS=1 -e PROXY_APT=
    -e APT_PROXY_USER= -e APT_PROXY_PASS= -e APT_PROXY_LOCATION= -e
    TEAGENT_AUTO_UPDATES=1
    Application health information
    Status : 0
    Last probe error :
    Last probe output :
  3. In the ThousandEyes platform, go to Cloud & Enterprise Agents > Agent Settings and verify the Docker container’s IP address.

Reconfiguring the Docker Container

  1. Stop the application:

    catalyst# app-hosting stop appid thousandeyes_enterprise_agent
    thousandeyes_enterprise_agent stopped successfully
    Current state is: STOPPED
  2. De-activate the application:

    catalyst# app-hosting deactivate appid thousandeyes_enterprise_agent
    thousandeyes_enterprise_agent deactivated successfully
    Current state is: DEPLOYED
  3. Modify the Docker options, and exit three times:

    catalyst(config)#app-hosting appid thousandeyes_enterprise_agent
    catalyst(config-app-hosting)#app-resource docker
    catalyst(config-app-hosting-docker)#prepend-pkg-opts
    catalyst(config-app-hosting-docker)#<run-opts command>
    catalyst(config-app-hosting-docker)#exit
    catalyst(config-app-hosting)#exit
    catalyst(config)#exit
  4. Reactivate the application, and confirm that it’s activated:

    catalyst# app-hosting activate appid thousandeyes_enterprise_agent
    thousandeyes_enterprise_agent activated successfully
    Current state is: ACTIVATED
  5. Start the application, and confirm that it is running:

    catalyst# app-hosting start appid thousandeyes_enterprise_agent
    thousandeyes_enterprise_agent started successfully
    Current state is: RUNNING