Cisco Gateway Deployment¶
Purpose¶
This document describes the steps to deploy the Leitwert Gateway app on Cisco Access Points using DNA Center.
The appendix at the end of this document provides information on deployment using the command line tool ioxclient.
Requirements¶
- Cisco Access Point of the C9100 series. It must be able to run IOx applications.
- Leitwert Gateway application package file
package-<tag>.tar. Provided by Leitwert AG. - Settings and credentials. Provided by Leitwert AG.
- Gateway ID
- Messagebus host, port, username, password
- Loki host, url, port, username, password
- Cisco DNA Center web application, configured to communicate with the Access Point(s) on which the Leitwert Gateway app is to be installed.
Deployment procedure¶
This tutorial has been tested with:
- DNA Center base version 2.1.365.62360
- DNA Center UI version 1.6.2.432
- DNA Center Application Hosting version 1.6.0.2107090810
- C9120 AP running firmware version 17.6.1.13
Install Application Hosting package¶
This is a prerequisite to being able to install the Leitwert Gateway application on the AP.
- Open the menu in the top left corner.
- Click
System > Software Updates, then clickInstalled Appson the left. - Scroll down to
Automationand check if the package calledApplication Hostingis installed. - Download and install if necessary.
Upload the Leitwert Gateway application package¶
- Open the menu in the top left corner and click
Provision > IoT Servicesto enter the App Hosting page. - To upload the Leitwert Gateway application to Cisco DNA Center, click on
New Appon the right side of the screen and upload the Leitwert Gateway application tar package to be installed. - The application should now be listed in the
IoT Servicespage.
Deploy the Leitwert Gateway application¶
- Open the menu in the top left corner and click on
Workflows. - Scroll down and click on the grid labeled
Enable IoT Services. - Follow the guided steps until you reach the
Configure Apppage. - On the
Configure Apppage, set the details for the Gateway ID, the message bus and the Loki endpoint. This information is provided by either Leitwert AG or your network administrator.
App management¶
Select AP on which to manage the Leitwert Gateway app¶
This is a generic procedure that is used as a prerequisite step in the following app management procedures:
- Open the menu in the top left corner and click
Provision > IoT Servicesto enter the App Hosting page. - Click on the
Leitwert Gatewayapp icon. - Click on
Manage. - A list of APs should appear.
- Check the box of the AP(s) on which you would like to manage the
Leitwert Gatewayapp.
Stopping and restarting the app¶
- Select the AP on which to manage the
Leitwert Gatewayapp. - In the
Actionsdrop-down menu, selectStop App, orStart App.
Uninstalling the app¶
- Select the AP on which to manage the
Leitwert Gatewayapp. - In the
Actionsdrop-down menu, selectUninstall App.
Edit the app config¶
This section describes how to edit the configuration that was passed to the Leitwert Gateway app during the steps described in Deploy the Leitwert Gateway application:
- Select the AP on which to manage the
Leitwert Gatewayapp. - In the
Actionsdrop-down menu, selectEdit App Config. - A window appears, in which the configuration can be edited.
Log Files¶
The Leitwert Gateway app generates the following log files:
gateway_launcher.loggateway.log
These log files are described in more detail below.
Downloading app log files¶
- Open the menu in the top left corner and click
Provision > IoT Servicesto enter the App Hosting page. - Click on the hostname of the AP. A list of apps should apper.
- Select the app for which the logs shall be viewed.
- Click on
app logs. - See also section Log Files for information on the log files that are generated by the Leitwert Gateway app.
Gateway Launcher Log¶
The log file with the name gateway_launcher.log is generated by the shell script /app/launcher.sh.
This script prepares the environment for the Leitwert Gateway app to run in. In addition to that, it launches the
Leitwert Gateway app executable and re-launches it in case the executable exits.
This log file is erased each time the app is stopped and restarted.
Gateway App Log¶
The log file with the name gateway.log is generated by the Leitwert Gateway app executable.
It contains all logs that are generated by the Leitwert Gateway app executable.
This log file is generated by the Python RotatingFileHandler.
This handler automatically generates a backup, if a log file has reached a certain size.
The file being written to is always gateway.log. When this file is filled, it is closed and renamed to
gateway.log.1 - and if file gateway.log.1 exists, then it is renamed to gateway.log.2 and so forth.
Appendix¶
Deplyoment using Ioxclient¶
This section is intended for a technically versed audience. Ioxclient offers administrative features that are not present in the DNA Center interface.
Edit the configuration file for local configuration¶
Create a file called package_config.ini with the following structure:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Install the gateway application on the access point¶
Use this resources.json file and execute the following commands:
1 2 3 4 | |
Verify successful installation and start of the application¶
1 | |
1 2 3 4 | |
Remove gateway application¶
Removing the gateway application is necessary if:
- A new version of the gateway application is available and the application shall be updated.
- A unrecoverable error has happened during installation and the process must be started over.
- The gateway application has to be removed from the access point for other reasons.
Execute the following commands to remove an existing gateway application:
1 2 3 | |