This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

MTConnect Agent on IR800 IOx

This Git repo provides procedure and Dockerfiles to build an IOx application
running open source C++ MTConnect Agent on Cisco 829 / 809 Industrial Integrated
Services Routers. This demonstrates how you can build and package IOx apps for
IR 809 or 829.

Building process consists of following steps.

  1. Build MTConnect Agent executable using Cisco provided Docker image.
  2. Extract the built executable from the image.
  3. Build Docker image for runtime.
  4. Convert the runtime image to IOx application.

Prepare your environment

Before you start, you need to have ioxclient installed.

ioxclient is a developer tool used for manipulating IOx environment.
It will be used for creating IOx application from a Docker image.
You can download ioxclient from
DevNet IOx resource download page.

Cisco provides Docker image tailored for IOx application. It can be used both
for build environment and runtime environment. The image is distributed via
devhub.cisco.com.

Consult to
Cisco DevNet site
for more detail.

Build runtime Docker image

The Dockerfile under runtime folder builds cppagent binary and Docker
image for runtime for you. Execute following commands.

$ cd runtime
$ docker build -t cppagent-ir800 .

The Dockerfile under runtime is a multi-stage Dockerfile. The first stage
pulls all dependency for building cppagent and compile it. The second stage
copies the cppagent binary from the first image then setup dependency only
necessary for runtime.

You will get a Docker image tagged with "cppagent-ir800". The image contains
agent executable and start-up shell script. The agent executable is located
at /usr/local/bin/agent. Startup shell script is located at
user/local/bin/start_agent.sh. start_agent.sh can be a startup script for
IOx app.

Convert Docker image to IOx app

Once a Docker image for runtime has been built, you can convert it to
IOx application package.

Navigate to the directory app and execute following command.

$ cd ../app
$ ioxclient docker package cppagent-ir800 .

You will get packaget.tar which is IOx application package installable to
IR809 or IR829.

Build environment

Dockerfile under build folder creates a build environment for cppagent.
It pulls source Docker image for IOx app and all dependencies for building
cppagent then compile it. You can leverage this environment for developing
your own version of cppagent IOx app.

You don't have to create this image just to get runtime image. Dockerfile
under runtime folder does it for you automatically.

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Programming Languages

    Dockerfile
  • License

    Other

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.