Exam topics covered:
5.5 Describe how to host an application on a network device (including Catalyst 9000 and Cisco IOx-enabled devices)
Network devices such as the Catalyst 9300 support application hosting by providing an environment where applications can run as Docker containers on the device. This means a network appliance can run any x86 compatible app as a container. Each container is allocated 1Gbps max of bandwidth, and storage can use the on-board SSD or a USB drive can be added for additional capacity.
Create a Dockerfile and docker-compose file for the application
Export the Docker image as a .tar file:
docker save [image-name] -o [filename].tar
Copy the image to the device using FTP/SCP, etc.
Configure the switch for app hosting
app-hosting appid [app-name]
vlan 4000 guest-interface 0
guest-ipaddress 10.10.20.101 netmask 255.255.255.0
app-default-gateway 10.10.20.254 guest-interface 0
app-resource docker
run-opts "--restart=unless-stopped -p 5000:5000/tcp"
app-hosting install appid [app-name] package usbflash1:[filename].tar
show app-hosting list
!
status=DEPLOYED
app-hosting activate appid [app-name]
show app-hosting list
!
status=ACTIVATED
app-hosting start appid [app-name]
!
status=RUNNING
show app-hosting utilization appid [app-name]
show app-hosting detail appid [app-name]
app-hosting stop appid [app-name]
app-hosting deactivate [app-id]
app-hosting uninstall [app-name]