cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
148
Views
5
Helpful
4
Replies
nathan
Enthusiast

Automating Local Manager Deployment actions

Hi

I have been able to get an app deployed and tested using the Local Manager UI, so I know that works.

In a development environment using automated CI/CD, the web UI is not useful. Indeed, after the second attempt at using it for even one app, it is already getting in the way :-)

One needs to be able to automate the deploy, activate, start, stop, deactivate and delete stages, ideally via CLI in the SDK environment calling a REST API exposed by the Local Manager. That CLI could be integrated with Jenkins for automated builds.

To get there, one needs to be provided with such a CLI, or the Python or REST APIs that such a CLI would call.

I can see that there is an API for Python, in /opt/cisco/iox/caf/src/appfw/api/pythonapi.py, which is used by the Local Manger web app. I could, then, create a CLI wrapper around that Python API, which would be useful when using the Sandbox as a development environment.

The CLI/Python approach, though, would not work for an actual device. In that case, I need to create a CLI for the application deployment and start/stop lifecycle that accesses the REST API of Local Manager. That REST API seems to be implemented via the webapp.py code which, in turn, calls the connector.py on_post. The upshot is that it is hard to decode what the actual REST call is, though I can probably do that from the log files.

Before I go down these paths, though, I would appreciate feedback from the product team about their plans in this space. I am definitely not the only person thinking along these lines.

Many thanks

Nathan

4 REPLIES 4
nathan
Enthusiast

I was pointed to the "ioxclient" CLI tool in the SDK. It works like this, assuming that one has installed the HelloWorld app once already:

ioxclient deactivate HelloWorld

ioxclient uninstall HelloWorld

ioxclient in HelloWorld PyHelloWorld.tar

ioxclient activate HelloWorld

ioxclient start HelloWorld

ixo and ioxclient in IOx SDK are the tools for automating. For details, please refer to: IOx SDK2 Install and Configuration Guide and IOx SDK2 User Guide.

Steve

Many thanks for your reply.

In the "IOx SDK2 Install and Configuration Guide” I see one mention of “ioxclient" in the section describing the SDK content, but no explanation of what ioxclient actually is in that document.

In the "IOx SDK2 User Guide” I see no mention of “ioxclient" at all.

The “iox” command is illustrated, and I can see that it is used for the purposes of packaging applications.

By invoking the “ioxclient” command at the CLI and looking at the help text that is output, I can infer that ioxclient is an SDK CLI client to the Local Manger on the deployment target, i.e. the sandbox or router. The ioxclient command appears to support the same functions that one might access via the Local Manager web UI.

From that, I gather that the “ioxclient” command is what one would use to automate, say in a Makefile, the commands required to manage the lifecycle of an application on the deployment target.

Regards

Nathan

It will come for the description of iox and ioxclient. Currently we are working on the updates. Thanks.

Content for Community-Ad