Giter VIP home page Giter VIP logo

serverlessdeviceofflinedetection's Introduction

Device Offline Detection with Durable Entities

This is the companion repository for this blogpost:

http://case.schollaart.net/2019/10/31/device-offline-detection-with-durable-entities.html

Run it yourself

You have 2 options:

  1. Create infrastructure with ARM Template and then 'Right Click Deploy' the Function App to it
  2. Fork the repository, use the Azure Pipelines YAML to do all the work

Deployment option 1

  1. Click the Button below to create the infrastructure in your Azure Subscription

    Deploy to Azure

  2. Clone this repository to your machine

  3. Right Click Deploy via an IDE with Azure Functions Tooling installed a. VS Code with read more (screenshot) b. Visual Studio 2019 read more (screenshot)

  4. Continue reading 'Running it'

Deployment option 2 (via Azure Pipelines)

  • Fork the repository and clone it to your machine
  • Go to (or create) an Azure DevOps project where you want the pipline to live
  • Make sure you have a Service Connection to an Azure Subscription read here how to create one
    • Remember the exact name of this Service Connection
  • Create the pipeline in Azure DevOps based on azure-pipelines.yaml. Read how here how to 'Get your first run'
    • Step by Step screenshots 1, 2, 3, 4, 5
    • Update the variables in the azure-pipelines.yaml, there will be a screen to do that during the Azure DevOps pipeline creation wizard (screenshot 5)
      • azureSubscription: The name of the Service Connection
      • functionAppName: the name of your test project, make it lowercase no special characters and it has to be globally unique
      • resourceGroupName: the resource group to deploy to
    • Make sure the build and deploy were succesfull (screenshot)

Running it

  • Go to https://{functionAppName}.azurewebsites.net/api/dashboard, here you should see a Header called 'Devices'
  • Update the ConnectionString to the Storage Queue in the TestDevice project
    • Go to the Azure Portal and go to the {functionAppName}st Storage Account resource (dont mistake it for the storage account ending op dst)
    • Click on 'Access Keys' and copy the Connection String
    • Open this cloned repository/solution on your machine with VS Code or Visual Studio and go to the TestDevice project
    • Edit the appsettings.json and update the StorageConnectionString
  • Run the TestDevice console app [src/TestDevice] (dotnet run) and observe the status in the dashboard, for example, start with 200 devices and then change it to 100

serverlessdeviceofflinedetection's People

Contributors

keesschollaart81 avatar

Watchers

James Cloos avatar  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.