How to create the package file when publish a solution template to marketplace?

To publish a solution template to marketplace, you need to upload a package file. This package file contains all the template files and createUIDefinitionFile.  The main template file should be named mainTemplate.json and is required.The createUIDefinition file describes how the inputs needed for the template need to be rendered. The file is also required and should be named createUIDefinition.json. Prerequisites: An azure subscription Steps: a. Create a mainTemplate.json If you are not familiar with the structure and syntax of Azure Resource Manager templates, go through this article first. Here I create a sample mainTemplate.json file. The sample mainTemplate will create a... Read more

How to connect to VM hosted MySQL using Node.js in Azure Function

Recently, some customers asked for a demo about how to connect to VM hosted MySQL using Node.js in Azure Function, so this article provides a simple demo describes how to connect to VM hosted MySQL using Node.js in Azure Function. Prerequisites: A VM hosted MySQL server with remote connection allowed for user root : Procedures: 1.Create a JS Webhook connect, my function name is “testMysqlConn”: 2.Paste code below into the function(this function will connect to the VM hosted MySQL server and then execute sql in request body): module.exports = function (context, req) { context.log('JavaScript HTTP trigger function processed a request.'); var... Read more

How to invoke https service protected by self-signed certificate from azure app service

When we use azure web app, we usually need to invoke the outside service. In order to protect the service, some companies usually secure it via https. But when we do some local test, we use the self-signed certificate to protect the service. Usually, we only need to add the client certificate to trusted list when we invoke the https service. Unfortunately, web app doesn’t provide us the administrator privilege and the high privilege operations cannot be executed. What shall we do? Here I will show you how to change the verification rules of the certificate. Steps: Export the client... Read more

The Refresh Token in Oauth2.0

The Refresh Token in Oauth2.0 1.Concept The biggest difference between Oauth2.0 and Oauth1.0 is the acquirement of access token, the access token of Oauth1.0 can be stored in the database and used for long time, the validity period is basically infinite, which result in its insecurity. The access token of And Oauth2.0 is valid for a short period, Therefore, Oauth2.0 brought in refresh token. In the oauth2.0, authorization code obtained the token and the default validity period is 1 hour (authorization code is disposable, once used and it will be invalid), so to use the refresh token, when we acquire... Read more

Using Azure Automation to Manage local resources | Part I : Get started on Hybrid Runbook Worker

Microsoft Azure Automation provides a way for users to automate the manual, long-running, error-prone, and frequently repeated tasks that are commonly performed in a cloud and enterprise environment. In this article, I will introduce how to install hybrid runbook worker, then we can manage our on-premise resources via azure automation later. Introduction The Hybrid Runbook Worker feature of Azure Automation allows you to run runbooks directly on the computer hosting the role and against resources in the environment to manage those local resources. Runbooks are stored and managed in Azure Automation and then delivered to one or more designated computers.... Read more

Using Azure Automation to Manage local resources | Part II : Schedule file copies from a local machine to an Azure Blob

In the Part I, we have learned how to manage local resources via azure automation hybrid runbook worker. In this article, I will show you how to schedule file copies from a local machine to an azure blob storage container. Steps Create a runbook using following code. <#PSScriptInfo .VERSION 1.0 .GUID 3a796b9a-623d-499d-86c8-c249f10a6986 .AUTHOR Azure Automation Team .COMPANYNAME Microsoft .COPYRIGHT .TAGS Azure Automation .LICENSEURI .PROJECTURI .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES #> <#  .SYNOPSIS  Exports the Run As certificate from an Azure Automation account to a hybrid worker in that account. .DESCRIPTION  This runbook exports the Run As certificate from an Azure... Read more

Develop with Azure Service Bus (3): Topic and Subscription

In this article, I will introduce you how to use “Azure Service Bus Client for Java” to work with topics and subscriptions in Service Bus. The architecture is showed as below: In contrast to queues, in which each message is processed by a single consumer, topics and subscriptions provide a one-to-many form of communication, in a publish/subscribe pattern. You can create multiple subscriptions for one topic. When sending messages to the topic, every subscription will be able to process the message. Next I will demonstrate the features with two pieces of code. To try it by yourself, you need the prerequisites below: The connection string of Service... Read more

Develop with Azure Service Bus (2): Queue

In this part, I will show you how to use Azure Service Bus through java sdk. It has undergone major changes that the Azure Service Bus Client for Java updated to 1.0.0 version , relative to the past  0.9.7 version. Here I provide 2 snippet code to show how to use the latest SDK to send/received messages in queue. Prerequisites The connection string of Service Bus. And its shared access policy should have “Send” and “Listen” permission enabled. Java Runtime Environment Java IDE (Optional) 1, Configuration Create a Maven project, and add the following dependency: <dependency> <groupId></groupId> <artifactId>azure-servicebus</artifactId> <version>1.0.0</version> </dependency> 2, Send message ... Read more

Develop with Azure Service Bus (1): Manage Service Bus

Microsoft Azure Service Bus is a reliable information delivery service. The purpose of this service is to make communication easier and implement the decoupling between modules. On the Azure service bus introduction, I will not repeat here, please refer to the official description: Azure service bus. To achieve the full operation of this article, you need to have the following prerequisites: An active Azure subscription Java Runtime Environment  Java IDE, Eclipse (Optional) This article will introduce how to use Azure portal / Java SDK to manage Azure Service Bus. 1. Create a Namespace To begin using Service Bus queues in Azure, you... Read more

Manage the Document DB via Powershell

Document DB is one kind of database service in azure (which has been integrated into the Cosmos DB), it is distributed, high scalable and high available. At present, many partners have said they have a demand for batch management of Azure services. While Azure offers a variety of options for managing Azure resources, each option has its advantages and disadvantages. Such as directly to manage Document DB via Azure Portal, although it is easy to use, but it is impossible to use to execute batch management tasks; Moreover, although the Rest API can achieve batch management, for the IT administrators, coding is still a more challenging... Read more