The next evolution in cloud computing is a smarter application not in the cloud. As the cloud has continued to evolve, the applications that utilize it have had more and more capabilities of the cloud. This presentation will show how to push logic and machine learning from the cloud to an edge application. Afterward, creating edge applications which utilize the intelligence of the cloud should become effortless.
I’m excited to announce that I am authoring another course for Pluralsight. This course targets software developers who are looking to get started with Microsoft Azure Cognitive Services: Text to Speech API to build modern AI solutions and want to get started building an AI solution with a simple REST interface. This course continues from the other Cognitive Services courses created and being created for the Cognitive Services track.
Contoso is an insurance company that has decided to integrate text to speech for multiple consumer facing applications. This course will take a look at utilizing the following features of Cognitive Services – Text to Speech API:
If you are looking for a guide on creating an Open CV module in Python, check out a guide here. This guide will focus on creating an Azure IoT Edge module in C++. To accomplish this we need to take the following steps:
Take these steps to create an IoT Edge module based on Azure IoT C SDK using Visual Studio Code and the Azure IoT Edge extension. First you create a solution, and then you generate the first module in that solution. Each solution can contain more than one module.
In Visual Studio Code, select View > Integrated Terminal.
Select View > Command Palette.
In the command palette, enter and run the command Azure IoT Edge: New IoT Edge Solution.
Browse to the folder where you want to create the new solution. Choose Select folder.
Enter a name for your solution.
Select C Module as the template for the first module in the solution.
Enter a name for your module. Choose a name that’s unique within your container registry.
Provide the name of the module’s image repository. VS Code autopopulates the module name with localhost:5000. Replace it with your own registry information. If you use a local Docker registry for testing, then localhost is fine. If you use Azure Container Registry, then use the login server from your registry’s settings. The login server looks like .azurecr.io.
VS Code takes the information you provided, creates an IoT Edge solution, and then loads it in a new window.
There are four items within the solution:
A .vscode folder contains debug configurations.
A modules folder has subfolders for each module. At this point, you only have one. But you can add more in the command palette with the command Azure IoT Edge: Add IoT Edge Module.
An .env file lists your environment variables. If Azure Container Registry is your registry, you’ll have an Azure Container Registry username and password in it.
The environment file is only created if you provide an image repository for the module. If you accepted the localhost defaults to test and debug locally, then you don’t need to declare environment variables.
The default C module code that comes with the solution is located at modules > > main.c. The module and the deployment.template.json file are set up so that you can build the solution, push it to your container registry, and deploy it to a device to start testing without touching any code. The module is built to simply take input from a source (in this case, the tempSensor module that simulates data) and pipe it to IoT Hub.
When you’re ready to customize the C template with your own code, use the Azure IoT Hub SDKs to build modules that address the key needs for IoT solutions such as security, device management, and reliability.
Build and deploy your module for debugging
In each module folder, there are several Docker files for different container types. Use any of these files that end with the extension .debug to build your module for testing. Currently, C modules support debugging only in Linux amd64 containers.
In VS Code, navigate to the deployment.template.json file. Update your module image URL by adding .debug to the end.
Replace the Node.js module createOptions in deployment.template.json with below content and save this file:
In the VS Code command palette, enter and run the command Edge: Build IoT Edge solution.
Select the deployment.template.json file for your solution from the command palette.
In Azure IoT Hub Device Explorer, right-click an IoT Edge device ID. Then select Create deployment for IoT Edge device.
Open your solution’s config folder. Then select the deployment.json file. Choose Select Edge Deployment Manifest.
You’ll see the deployment successfully created with a deployment ID in a VS Code-integrated terminal.
Check your container status in the VS Code Docker explorer or by running the docker ps command in the terminal.
Start debugging C module in VS Code
VS Code keeps debugging configuration information in a launch.json file located in a .vscode folder in your workspace. This launch.json file was generated when you created a new IoT Edge solution. It updates each time you add a new module that supports debugging.
Navigate to the VS Code debug view. Select the debug configuration file for your module. The debug option name should be similar to ModuleName Remote Debug (C).
Navigate to main.c. Add a breakpoint in this file.
Select Start Debugging or select F5. Select the process to attach to.
In VS Code Debug view, you’ll see the variables in the left panel.
The preceding example shows how to debug C IoT Edge modules on containers. It added exposed ports in your module container createOptions. After you finish debugging your Node.js modules, we recommend you remove these exposed ports for production-ready IoT Edge modules.
Once that was added to the CMakeLists.txt, the main.cpp file was changed to the following code:
Deploy the Azure IoT Edge Module
Once you create IoT Edge modules with your business logic, you want to deploy them to your devices to operate at the edge. If you have multiple modules that work together to collect and process data, you can deploy them all at once and declare the routing rules that connect them.
This article shows how to create a JSON deployment manifest, then use that file to push the deployment to an IoT Edge device. For information about creating a deployment that targets multiple devices based on their shared tags, see Deploy and monitor IoT Edge modules at scale
To deploy modules using Visual Studio Code, save the deployment manifest locally as a .JSON file. You will use the file path in the next section when you run the command to apply the configuration to your device.
Here’s a basic deployment manifest with one module as an example:
You can use the Azure IoT extensions for Visual Studio Code to perform operations with your IoT hub. For these operations to work, you need to sign in to your Azure account and select the IoT hub that you are working on.
In Visual Studio Code, open the Explorer view.
At the bottom of the Explorer, expand the Azure IoT Hub Devices section.
Click on the … in the Azure IoT Hub Devices section header. If you don’t see the ellipsis, hover over the header.
Choose Select IoT Hub.
If you are not signed in to your Azure account, follow the prompts to do so.
Select your Azure subscription.
Select your IoT hub.
Deploy to your device
You deploy modules to your device by applying the deployment manifest that you configured with the module information.
In the Visual Studio Code explorer view, expand the Azure IoT Hub Devices section.
Right-click on the device that you want to configure with the deployment manifest.
Select Create Deployment for IoT Edge Device.
Navigate to the deployment manifest JSON file that you want to use, and click Select Edge Deployment Manifest.
The results of your deployment are printed in the VS Code output. Successful deployments are applied within a few minutes if the target device is running and connected to the internet.
View modules on your device
Once you’ve deployed modules to your device, you can view all of them in the Azure IoT Hub Devices section. Select the arrow next to your IoT Edge device to expand it. All the currently running modules are displayed.
If you recently deployed new modules to a device, hover over the Azure IoT Hub Devices section header and select the refresh icon to update the view.
Right-click the name of a module to view and edit the module twin.
Microsoft Azure can host almost any application, but understanding how to use it with existing workflows is a must. In this course, you will learn how to integrate existing workflows, technologies, and processes with Microsoft Azure.
Knowing how to integrate Microsoft Azure with an existing app’s workflow is essential to using Azure to host that application. In this course, Identifying Existing Products, Services, and Technologies in Use for Microsoft Azure, you will learn foundational knowledge of and gain the ability to navigate the Microsoft Azure documentation and utilize the tools for Microsoft Azure. First, you will discover how to navigate through the Microsoft Azure documentation. Next, you will learn how to utilize the different guides and tutorials of the Microsoft Azure products. Finally, you will explore how to work with Microsoft Azure using your existing tools and workflows. When you are finished with this course, you will have the skills and knowledge of Microsoft Azure tools and documentation needed to use the products, services, and technologies provided.
After my sessions at Update Conference Prague I will be discussing the Azure IoT Edge platform with .NET Rocks!. Hopefully I will have recovered from jet lag and my other presentations to give a coherent and passable interview. One of the questions they asked me was, what hardware would I buy if I had $5000 to spend on it?
Keeping up to date on all the new services and features for an entire cloud portfolio could be a full-time job. In this presentation, we will look at the state of IoT in Microsoft Azure and discuss how the different services work together to implement an enterprise solution. Use this presentation to get an overview of architecture and products so that the next time you are presented with an IoT problem in Azure you know the solution.
Coming soon I will be authoring a course for Pluralsight titled – “Identify Existing Products, Services and Technologies in Use For Microsoft Azure” . This course targets software developers who are looking to get started with Microsoft Azure services to build modern cloud-enabled solutions and want to further extend their knowledge of those services by learning how to use existing products, services, and technologies offered by Microsoft Azure.
Microsoft Azure is a host for almost any application, but determining how to use it within existing workflows is paramount for success. In this course, Identify Existing Products, Services and Technologies in Use, you will learn how to integrate existing workflows, technologies, and processes with Microsoft Azure.
We explore Microsoft Azure with the following technologies:
Languages, Frameworks, and IDEs –
Visual Studio Code
Microsoft Azure Products
Azure App Services
Azure IoT Hub
Hopefully we can take a developer familiar with the languages, frameworks, and ides available and make have them up and running on Microsoft Azure after this short course.
The Azure IoT Edge getting started guide currently utilizes VS Code and Docker to create modules. If you receive “docker.sock connect: permission denied” after trying to build, run the following two commands in the terminal:
sudo usermod -aG docker $USER
If you still have the error, restart your machine and try again.
September 20th at Cobb Center in Detroit I will be presenting:
Alternative Device Interfaces and Machine Learning
In this presentation, we will look at the how users interface with machines without the use of touch. These different types of interaction have their benefits and pitfalls. To showcase the power of these user interactions we will explore: Voice commands with mobile applications, Speech Recognition, and Computer Vision. After this presentation, attendees will have the knowledge to create applications that can utilize voice, video, and machine learning.
Users use voice (Alexa, Cortana, Google Now) or video as a mode of interaction with applications. More than a fad, this is a natural interface for users and is becoming more and more common with the ever-decreasing size of hardware.
Different types of interaction have their benefits and pitfalls. To showcase the power of these user interactions we will explore: Voice commands with two app types: UWP and Xamarin Forms (iOS and Android). Speech Recognition with Cognitive Services: Verifying the speaker with Speaker Recognition API. Computer Vision with Cognitive Services: Verifying a user with Face API.
By utilizing UWP, Xamarin, and Cognitive services; a device with the ultimate in customization for user interactions will be created. Come and see how!