Git Product home page Git Product logo

cppagent-ir800's Introduction

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.

cppagent-ir800's People

Contributors

nshimaza avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.