npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

iotedge-runtime

v0.1.3

Published

an NPM wrapper around the Azure IoT Edge dev tool

Downloads

4

Readme

azure-iotedge-runtime

Run the Azure IoT Edge runtime in a Docker container

This project is based on the Azure IoT Edge dev tool, but is only contains the Docker image needed to run the Azure IoT Edge runtime in a container.

It is supposed to be used mostly in local development environments and it's wrapped in an NPM package.

Installation

To install via NPM, simply run:

$ npm install iotedge

Otherwise, clone the project from Github:

$ git clone [email protected]:pineviewlabs/iotedge-docker.git

Usage

1. Building the Docker image

Using NPM:

$ npx build-iotedge

or build the docker image manually with:

$ docker build . -t iotedge-runtime

This will create a Docker image tagged iotedge-runtime.

2. Set the Device Connection String

Go to the Azure Portal, then go to your IoT Hub and click on IoT Edge from under the Automatic Device Management section.

Select an existing device that you would like to use or create a new one. Once on the device page, copy one of the two connection strings (either the Primary Connection String or the Secondary Connection String). You will need to set the connection string you have just grabbed as an environment variable, named IOT_DEVICE_CONNSTR.

Example:

$ export IOT_DEVICE_CONNSTR='HostName=iothub0730.azure-devices.net;DeviceId=myEdgeDevice;SharedAccessKey=zfD73oX3agHTlT0rOvjPnYTkxRPw/k3U0exEGBDWQ5A='

3. Run the Docker image

Using NPM:

$ npx start-iotedge

Or run the container using the provided run-container.sh script in the bin folder:

$ ./bin/run-container.sh

A container named iotedgec will be created and inside the container the iotedged daemon will be started. If everything is working correctly you will see the daemon output log.

The IoT Edge runtime and its associated modules (which are running as independent containers) are using a Docker network called azure-iot-edge. The script also creates the network, if it doesn't already exist.

The daemon will use the default ip address assigned by Docker to the container (most probably will be 172.17.0.2). The discovery is automatically done in the rund.sh script located in the lib folder.

Using the iotedge CLI tool

This package also provides a cli utility which helps with development, debugging, and troubleshooting of issues. You can use it in two ways:

Via NPM:

$ npx iotedge

or running the provided iotedge.sh script directly:

$ ./bin/iotedge.sh

This tool forwards the arguments to the iotedge CLI tool available in the main runtime container.

For example:

$ ./bin/iotedge.sh list

is equivalent to:

docker exec iotedgec iotedge -H http://172.17.0.2:15580 list