Freigeben über


11 ways to deploy R Server on HDInsight Cluster

In this article, we will discuss 11 possible ways to deploy R Server on HDInsight Cluster. Some of these ways will help in automating the cluster creation (using scripts). Majority of them are related to deployment using Azure Resource Manager Templates. ARM Templates are very useful and can be deployed in several ways. Here are the 11 ways :

  1. Azure Portal
  2. .NET SDK
  3. ARM Template + Azure Portal
  4. ARM Template + Powershell
  5. ARM Template + Azure CLI 1.0
  6. ARM Template + Azure CLI 2.0
  7. ARM Template + Ruby
  8. ARM Template + C#
  9. ARM Template + Visual Studio
  10. ARM Template + REST API
  11. AzureSMR package

Let us discuss the above ways. I am not going into detailed description of all the ways - have provided guidance links and required code snippet wherever possible.

Azure Portal

Basic way is to use Azure Portal. Here is an extensive guide : Create the cluster

.NET SDK

Using the Nuget Package Microsoft.Azure.Management.HDInsight. The C# program is provided below. Replace with appropriate values for variables and run it. This program will create a Resource Group, a Storage Account and R Server on HDInsight Cluster.

ARM Template

We will be using the following template.json and parameters.json for #3 to #10. Save the following 2 json files in your local disk. Replace values in parameters.json with your own values.

ARM Template + Azure Portal

Using Template Deployment.  More information here : Deploy resources with Resource Manager templates and Azure portal.

ARM Template + Powershell

Save the following powershell code in the same location as template.json and parameters.json. Run the powershell script as administrator.

ARM Template + Azure CLI 1.0

Install the Azure CLI 1.0

Save the following bash script in the same location as template.json and parameters.json and run the bash script.

ARM Template + Azure CLI 2.0

Install the Azure CLI 2.0

Save the following bash script in the same location as template.json and parameters.json and run the bash script.

ARM Template + Ruby

Using the Microsoft Azure Resource Management Client Library for Ruby. Save the following ruby script in the same location as template.json and parameters.json and run the ruby script. More information : azure_mgmt_resources.

ARM Template + C#

Using the Nuget Package Microsoft.Azure.Management.ResourceManager

ARM Template + Visual Studio

Using Azure Resource Group Project. Visual Studio gives you a nice UI experience to invoke the script and provide some parameter values. More help here : Azure Resource Group for Visual Studio

ARM Template + REST API

Use this guide : Deploy with the REST API

AzureSMR package

This method lets you deploy a R Server HDInsight Cluster from your R session.

Using AzureSMR package, you can either deploy the above provided ARM templates using azureDeployTemplate() function (OR) create HDI cluster directly using azureCreateHDI() function.

More details here: Introducing the AzureSMR package: Manage Azure services from your R session.

Here is the code using azureCreateHDI() function :

 

I will update this document as when I find more new ways to create R Server on HDInsight Cluster. Please use the comments section to report any issues (OR) provide feedback on the above ways.

Comments

  • Anonymous
    March 27, 2017
    Detailed post! Nice!