Deploying the IOx Application to the Gateway using Cisco Kinetic GMM
To deploy the IOx application to the gateway, follow these steps:
1. Upload the IOX Application tar file onto Kinetic GMM.
Log in to the Kinetic GMM UI using your credentials. Click Applications -> Add Application. Select the package.tar file created above. Click Import.
Figure 14 Uploading IOx Application tar File onto Kinetic GMM
2. Verify that the upload was successful.
Once the upload is successful, the application should show in the Available state under the Applications tab.
2020欧洲杯体育官方网址Figure 15 Verifying IOx Application tar Successfully Uploaded onto Kinetic GMM
3. Install the application onto a gateway.
■Select the SampleNodeApp application and click Install. In the pop-up window, select the appropriate application resource profile. In this case, the c1.small profile providing 200 CPU units and 64 MB RAM should be sufficient.
■Select the gateway or gateways on which you want this application to be installed from the drop-down menu.
■Leave the interface Name as default “eth0”.
■For the network name, select IOx-nat0 since access to the Node.js application from outside is required. Internally, the Node.js application listens on port 8000. Externally map this to the desired port. In the example below, it is mapped it to an external port of 8000. Hence the Node.js application can also be accessed on port 8000 externally.
■Click Install2020欧洲杯体育官方网址 to begin installation of the IOx application onto the selected gateway(s). In the example below, a single gateway is selected on which to install this application.
Figure 16 Installing the IOx Application onto the Gateway(s)
4. Monitor the deployment.
Once you click Install, you can navigate to the Instances2020欧洲杯体育官方网址 tab and see the application state and status as “Deploying”.
Figure 17 Monitoring IOx Application Deployment
In a few minutes you should see your application in the “Running” state. It will also display a corresponding IP address/port combination on which the application can be externally accessed.
Figure 18 IOx Application in Running State
A similar application status can be viewed under the Gateways tab by clicking the appropriate gateway on which the application has been installed and navigating to Apps. You can also view the application state in the Summary tab.
2020欧洲杯体育官方网址Figure 19 Viewing IOx Application State from Gateway Tab
5.2020欧洲杯体育官方网址 Viewing the Gateway Event Log.
In case of any deployment errors, you can view the logs on the Event Log tab.
Figure 20 Inspecting Gateway Event Log
6. Externally accessing the application.
One way to access the Node.JS IOx application is to VPN into the router using the Kinetic GMM management tunnel and access the application on the specified IP address and port.
In order to VPN to the router, navigate to the Gateways tab, select the gateway in question, and click VPN.
Figure 21 Retrieving VPN Connecting Information
A pop-up window displays the requisite information needed to connect to the gateway using the Cisco AnyConnect VPN application. You need to enter your credentials to view the decrypted password.
Figure 22 Viewing VPN Connecting Information
2020欧洲杯体育官方网址Open up your AnyConnect Client and connect to the gateway using a secure VPN tunnel.
Figure 23 Using Cisco AnyConnect Client to Establish a VPN Connection to the Gateway
Once connected, open a web browser and connect to the gateway on the IP address and port specified for the IOx application that was deployed above. You should see the message “Hello World!”
2020欧洲杯体育官方网址Figure 24 Verifying IOx Application Accessibility
Note: In a similar way, you should be able to access the IOx application from your enterprise if you have configured Enterprise Network Integration as part of your deployment. Refer to the Enterprise Network Integration module for more details.
7. Viewing Application and Container logs.
Navigate to the Apps tab for the gateway on which the IOx application is deployed and click the application. Expand the Application Logs tab by clicking the + (plus) icon.
Figure 25 Inspecting Application and Container Logs
8. Building an updated version of the IOx application.
You can modify the application so that it responds with “Hello World! Welcome to my IOx Application” instead of just “Hello World!”. Do this by modifying the “response.end” line in the server.js file.
2020欧洲杯体育官方网址Figure 26 Making Modifications to the IOx Application Code
Create a new Docker image with a version tag of, for example, “2.0”.
2020欧洲杯体育官方网址Figure 27 Building Docker Image with Updated Code
Change the application version number in the package.yaml file to “2.0”.
Figure 28 Updating Version in package.yaml
Build an updated version of the package.tar file with the updated version of the application. Make sure to use the updated tag of “2.0” for the Docker image.
2020欧洲杯体育官方网址Figure 29 Re-package Updated IOx Application
There is now an updated version of the package.tar file based on the updated Docker image of samplenode:2.0.
9. Upgrading the deployed application to version 2.0 using Kinetic GMM.
Navigate to Applications2020欧洲杯体育官方网址 and click the application you want to upgrade.
Figure 30 Upgrading to the Newer Version of the IOx Application onto Kinetic GMM
Click the Upgrade button and you see a pop-up screen where you can upload the updated version of the package.tar file that was built in the previous step. You see a small warning at the bottom of the pop-up screen indicating that all of the IOx applications will be upgraded to the newer version on all applicable gateways. Check the box I understand the risks. Proceed with editing and click Upgrade.
2020欧洲杯体育官方网址Figure 31 Uploading Updated IOx Application onto Kinetic GMM
2020欧洲杯体育官方网址Once the upgrade is successful, the application version is updated to “2.0”.
Figure 32 Verifying Updated Version of IOx Application
It is also configuring the updated version of the IOx application on any associated gateways.
2020欧洲杯体育官方网址Figure 33 Gateway Being Updated with Newer Version of IOx Application
Once version 2.0 of the application is rolled out to all the associated gateways, AnyConnect VPN to any one of them and verify that the updated version of the application is running.
Figure 34 Verifying Newer Version of IOx Application Successfully Running
10. Stopping the application.
To stop the application, click the check box next to the application and click Stop App.
Figure 35 Stopping IOx Application
Figure 36 Verifying IOx Application in Stopped State
In a similar manner you can click the checkbox next to the application and click Start App to start the application.
11.2020欧洲杯体育官方网址 Uninstalling the application.
To uninstall the application, click the check box next to the application and click Uninstall. A pop-up screen is displayed asking you to confirm that you really want to uninstall the application. You can confirm by clicking the Delete button. You see the status message “Removing” and within a short time you will see that the application has been uninstalled from your gateway.
Figure 37 Uninstalling an IOx Application on a Gateway
Figure 38 Confirming Deletion of IOx Application from a Gateway
Figure 39 Verifying that IOx Application Being Removed from the Gateway