Skip to content

mihainstr/iotedge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure IoT Edge

This repository consists of two projects: the Module Management Agent (edge-agent) and the Edge Hub (edge-hub).

Setup

Make sure the following dependencies are installed in your environment before you build IoT Edge code:

Dependency Notes
.NET Core 2.0 Installation instructions here.
Java Not needed if building in VS IDE (Windows). Otherwise, JRE is required to compile the Antlr4 grammar files into C# classes, and java must be on your path.
package feed authorization Access to project package feeds.

Build

Besides using Visual Studio IDE in Windows, you can build by running the build script:

Linux

scripts/linux/buildBranch.sh

Windows

scripts\windows\buildBranch.bat

Binaries are published to target/publish/.

Run unit tests

Besides using Test Explorer in Visual Studio IDE, you can run the unit tests with:

Linux

scripts/linux/runTests.sh

Windows

scripts\windows\runTests.bat

Run integration tests & BVTs

To run integration tests and/or BVTs, make sure the following dependencies are installed in your environment:

Dependency Notes
Azure CLI Installation instructions here
Powershell Installation instructions here
Jq Installation instructions here
Docker Installation instructions here. In Linux environments, be sure to follow the post-installation steps so the tests can run without sudo.

The integration tests and BVTs expect to find certain values in an Azure KeyVault (see edge-util/test/Microsoft.Azure.Devices.Edge.Util.Test.Common/settings/base.json). For the tests to access the KeyVault at runtime, a certificate must first be installed in the environment where the tests will run. Install the KeyVault certificate with:

Linux

scripts/linux/downloadAndInstallCert.sh <SpUsername> <SpPassword> <AadTenant> <CertName> <VaultName>
Argument Description
SpUsername Service principal username. See az login help.
SpPassword Service principal password. See az login help.
AadTenant Azure Active Directory tenant. See az login help.
CertName Certificate name. See --secret in az keyvault secret show help.
VaultName KeyVault name. See az keyvault secret show help.

Windows

powershell scripts\windows\DownloadAndInstallCertificate.ps1 <VaultName> <CertificateName>
Argument Description
VaultName KeyVault name. See Get-​Azure​Key​Vault​Secret help.
CertName Certificate name. See Get-​Azure​Key​Vault​Secret help.

Then run the tests either with Test Explorer in Visual Studio IDE, or with:

Linux

scripts/linux/runTests.sh "--filter Category=Integration|Category=Bvt"

Windows

scripts\windows\runTests.bat "--filter Category=Integration|Category=Bvt"

The syntax of the "filter" argument is described here. All IoT Edge tests are categorized as one of Unit, Integration, or Bvt.

Build Manifest Image

There is a script in the repo to build multi-architecture images. This scripts assumes that the platform specific images are already in the docker registry. Usage is as follows:

$ scripts/linux/buildManifest.sh --help

buildManifest.sh [options]
Note: Depending on the options you might have to run this as root or sudo.

options
 -r, --registry       Docker registry required to build, tag and run the module
 -u, --username       Docker Registry Username
 -p, --password       Docker Username's password
 -v, --image-version  Docker Image Version.
 -t, --template       Yaml file template for manifest definition.

Release

Release Process

About

The IoT Edge OSS project

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 68.6%
  • Rust 27.6%
  • Shell 3.1%
  • PowerShell 0.3%
  • Dockerfile 0.3%
  • Makefile 0.1%