Coder Social home page Coder Social logo

iotedge-vm-deploy's Introduction

iotedge-vm-deploy

Detailed documentation is available on Microsoft Docs

ARM Template to deploy IoT Edge enabled VM

The following Azure Resource Templates are for IoT Edge release 1.5.

ARM template to deploy a VM with IoT Edge pre-installed (via cloud-init)

The ARM template visualized for exploration

Azure CLI command to deploy IoT Edge enabled VM

The commands below deploy a VM with IoT Edge pre-installed and provisioned with the provided connection string. To deploy a VM with IoT Edge pre-installed but not provisioned, do not include the --parameters deviceConnectionString=... portion of the command.

Using an ARM template

az deployment group create \
  --name edgeVm \
  --resource-group replace-with-rg-name \
  --template-uri "https://raw.githubusercontent.com/Azure/iotedge-vm-deploy/main/edgeDeploy.json" \
  --parameters dnsLabelPrefix='my-edge-vm1' \
  --parameters adminUsername='azureuser' \
  --parameters authenticationType='sshPublicKey' \
  --parameters adminPasswordOrKey="$(< ~/.ssh/id_rsa.pub)" \
  --parameters deviceConnectionString=$(az iot hub device-identity show-connection-string --device-id replace-with-device-name --hub-name replace-with-hub-name -o tsv)

Using a local Azure Bicep file

az deployment group create \
  --name edgeVm \
  --resource-group replace-with-rg-name \
  --template-file "./edgeDeploy.bicep" \
  --parameters dnsLabelPrefix='my-edge-vm1' \
  --parameters adminUsername='azureuser' \
  --parameters authenticationType='sshPublicKey' \
  --parameters adminPasswordOrKey="$(< ~/.ssh/id_rsa.pub)" \
  --parameters deviceConnectionString=$(az iot hub device-identity show-connection-string --device-id replace-with-device-name --hub-name replace-with-hub-name -o tsv)

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

iotedge-vm-deploy's People

Contributors

damonbarry avatar jeeweetje avatar kgremban avatar micahl avatar mumian avatar pataltimore avatar shelwig avatar toolboc avatar veyalla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iotedge-vm-deploy's Issues

Deployment failed with validation error

following the example here: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-ubuntuvm
and I am getting this error:
{"error":{"code":"InvalidTemplate","message":"Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Boolean'. Actual 'String'. Please see https://aka.ms/resource-manager-parameter-files for usage details.'.","additionalInfo":[{"type":"TemplateViolation","info":{"lineNumber":54,"linePosition":17,"path":"parameters.allowSsh"}}]}

this used to work a month or so ago last time I checked.

The template not working on westus2 region

The VM size: Standard_DS1_v2 is not available on westus2 region.

{'code': 'InvalidTemplateDeployment', 'message': "The template deployment failed with error: 'The resource with id: '/subscriptions/48bd2a8b-17b3-4061-ac87-700480cd04b8/resourceGroups/IoTEdgeResources/providers/Microsoft.Compute/virtualMachines/vmEdgeDevice' failed validation with message: 'The requested size for resource '/subscriptions/48bd2a8b-17b3-4061-ac87-700480cd04b8/resourceGroups/IoTEdgeResources/providers/Microsoft.Compute/virtualMachines/vmEdgeDevice' is currently not available in location 'westus2' zones '' for subscription '48bd2a8b-17b3-4061-ac87-700480cd04b8'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.'.'."}

Bicep file reports linter warnings

When using the bicep deployment file https://github.com/Azure/iotedge-vm-deploy/blob/main/edgeDeploy.bicep, linter warnings are reported.

/home/pat/main.bicep(58,5) : Warning decompiler-cleanup: The name of variable 'networkSecurityGroupName_var' appears to have originated from a naming conflict during a decompilation from JSON. Consider renaming it and removing the suffix (using the editor's rename functionality). [https://aka.ms/bicep/linter/decompiler-cleanup]
/home/pat/main.bicep(131,13) : Warning use-resource-id-functions: If property "id" represents a resource ID, it must use a symbolic resource reference, be a parameter or start with one of these functions: extensionResourceId, guid, if, reference, resourceId, subscription, subscriptionResourceId, tenantResourceId. Found nonconforming expression at id -> subnet1Ref [https://aka.ms/bicep/linter/use-resource-id-functions]
/home/pat/main.bicep(151,65) : Warning simplify-json-null: Simplify json('null') to null [https://aka.ms/bicep/linter/simplify-json-null]

Authenticate using X.509 certificates

The IoT Edge is currently authenticating to Azure IoT Hub using a connection string. Would it be possible to extend the deployment to allow X.509 authentication?

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.