Best way to host Microsoft R Server in Azure
Today I was asked whether it was better to run Microsoft R Server on a Virtual Machine / Azure Container Instance or DevTest Labs. The requirement was for a 6 core 32Gb RAM for a developer image. My initial thought was to have a R Server created from the gallery and then use DevTest extension to automatically shut it down at 8pm if we had forgotten. So I set about seeing how this would work.
DevTest labs allow base images to be created and have some access control around them, allow them to be auto shut down, and have extensions auto deployed on them. However, when looking in DevTest Lab, they was no Microsoft R Server base image, so one would have to be created as a custom image.
Next I looked at creating a VM from the gallery and using the Auto Shut Down feature from DevTest Labs as an extension to a VM. This would provide a basic framework to have a powerful machine, that shuts down at the end of the day. This was relatively simple to provision and can be seen in the GitHub repo below.
I wanted to see if this same option could be applied to the new Azure Container Instances (PREVIEW) as this would be a neat way of avoiding the Operating System choice. However, after investigation I found the following problems with Azure Container Instances as it is in Preview.
- Although UK South was available in the drop down list, it does not pass the validation when you deploy it
- I could not go above 2 cores
- I could not go above 4Gb RAM
After this investigation, I would use a Virtual Machine if you want to provision a server powerful enough to run R Server. To deploy your R server, click the Deploy to Azure button in Option 1. (https://github.com/ross-p-smith/ARM-Examples#r-server-comparison). This could change when Azure Container Instance is Generally Available. I will update this post when this happens.
An alternative is to use the Data Science VM that has already been created with all the popular tools pre-installed.