Machine Learning Server Guide
Machine Learning Server Guide
Microsoft Machine Learning Server is your flexible enterprise platform for analyzing data at scale, building
intelligent apps, and discovering valuable insights across your business with full support for Python and R.
Machine Learning Server meets the needs of all constituents of the process – from data engineers and data
scientists to line-of-business programmers and IT professionals. It offers a choice of languages and features
algorithmic innovation that brings the best of open-source and proprietary worlds together.
R support is built on a legacy of Microsoft R Server 9.x and Revolution R Enterprise products. Significant
machine learning and AI capabilities enhancements have been made in every release. Python support was
added in the previous release. Machine Learning Server supports the full data science lifecycle of your
Python-based analytics.
Additionally, Machine Learning Server enables operationalization support so you can deploy your models
to a scalable grid for both batch and real-time scoring.
Pre-trained models For visual analysis and text sentiment analysis, ready to
score data you provide.
Deploy and consume Operationalize your server and deploy solutions as a web
service.
scale out on premises Clustered topologies for Spark on Hadoop, and Windows
or Linux using the operationalization capability built into
Machine Learning Server.
Next steps
Install Machine Learning Server on a supported platform.
Choose a quickstart to test-drive capabilities in 10 minutes or less. Move on to tutorials for in-depth
exploration.
NOTE
You can use any R or Python IDE to write code using libraries from Machine Learning Server. Microsoft offers Python
for Visual Studio and R for Visual Studio. To use Jupyter Notebook, see How to configure Jupyter Notebooks.
See also
What's new in Machine Learning Server
Learning Resources
What's new in Machine Learning Server 9.3
4/13/2018 • 3 minutes to read • Edit Online
Machine Learning Server provides powerful R and Python function libraries for data science and machine
learning on small-to-massive data sets, in parallel on local or distributed systems, with modern algorithms for
predictive analytics, supervised learning, and data mining.
Functionality is delivered through proprietary R and Python packages, internal computational engines built on
open-source R and Python, tools, solutions, and samples.
In this article, learn about the new capabilities introduced in the latest packages and tools. If you develop in R,
you might also want to review feature announcements from recent past releases.
NOTE
For updates to R Client, see What's New for Microsoft R Client. For known issues and workarounds, see Known issues in
9.3.
Announced in 9.3
The 9.3 release marks the beginning of a faster release cadence, with fewer features delivered more frequently.
New capabilities introduced in 9.3 are listed in the following table.
Announced in 9.2.1
The 9.2.1 release was the first release of Machine Learning Server - based on R Server - expanded with Python
libraries for developers and analysts who code in Python.
The following table summarizes the Python and R features that were introduced in the 9.2.1 release. For more
information, see release announcement for Machine Learning Server 9.2.1.
Standard web service support Python Contains Python code, models, and
model assets. Accepts specific inputs
and provides specific outputs for
integration with other services and
applications.
Realtime web service support Python A fully encapsulated web service with
no inputs or outputs (operates on
dataframes).
Role-based access control (RBAC) Both RBAC was extended with a new explicit
Reader role.
Python development
In Machine Learning Server, Python libraries used in script execute locally, or remotely in either Spark over
Hadoop Distributed File System (HDFS ) or in a SQL Server compute context. Libraries are built on Anaconda
4.2 over Python 3.5. You can run any 3.5-compatible library on a Python interpreter included in Machine
Learning Server.
NOTE
Remote execution is not available for Python scripts. For information about to do this in R, see Remote execution in R.
R development
R function libraries are built on Microsoft R Open (MRO ), Microsoft's distribution of open source R 3.4.1.
The last several releases of R Server added substantial capability for R developers. To review recent additions to
R functionality, see feature announcements for previous versions.
Previous versions
Visit Feature announcements in R Server version 9.1 and earlier, for descriptions of features added in recent
past releases.
See Also
Welcome to Machine Learning Server
Install Machine Learning Server on Windows
Install Machine Learning Server on Linux
Install Machine Learning Server on Hadoop
Configure Machine Learning Server to operationalize your analytics
Microsoft R Server is now Microsoft Machine
Learning Server
4/13/2018 • 2 minutes to read • Edit Online
In September 2017, Microsoft R Server was released under the new name of Microsoft Machine Learning
Server. In version 9.2.1, Machine Learning Server added support for the full data science lifecycle of Python-based
analytics to its list of machine learning and AI capabilities enhancements. The R capabilities were also enhanced. In
the latest 9.3 version, Machine Learning Server improves operationalization and deployment of web services
containing R or Python code.
Read the What's new in this release to learn more.
NOTE
Note that Microsoft R Server 9.1 for Teradata was the last release and will not have a Machine Learning Server equivalent.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio Dev
Essentials. Developer edition has the
same features as Enterprise, except it is
licensed for development scenarios.
Volume Licensing Service Center (VLSC) Enterprise Sign in, search for R Server. Choose the
right version for your OS.
Machine Learning Server is available on a number of platforms. Looking for earlier versions? See Installation
guides for earlier releases for links.
Choose a configuration
This section covers topology configurations from single to multi-machine topologies.
Standalone deployments
Standalone servers describe a working experience where script development and execution occur on the same
Windows or Linux machine. If you install the free developer edition on either Windows or Linux, a standalone
server is the likely configuration. You could also install the server on a virtual machine accessed by multiple users
in turn.
Begin installation
The following links provide installation and configuration instructions.
Install on Windows
Install on Linux
Install on Hadoop
Configure server to operationalize (deploy/consume) analytics
Add pre-trained models
Provision on the cloud
Local Tools
Microsoft R Client
Link Python tools and IDES to the MLServer Python interpreter
Python interpreter & libraries on Windows
Supported platforms for Machine Learning Server
and Microsoft R Server
9/10/2018 • 6 minutes to read • Edit Online
Machine Learning Server runs on-premises on Windows, Linux, Hadoop Spark, and SQL Server. It is also in
multiple cloud offerings, such as Azure Machine Learning Server VMs, SQL Server VMs, Data Science VMs,
and on Azure HDInsight for Hadoop and Spark. In Public Preview, you can get Machine Learning Server on
Azure SQL DB, Azure Machine Learning, and Azure Data Lake Analytics.
This article specifies the operating systems and platforms for on-premises installations of Machine Learning
Server and Microsoft R Server.
NOTE
64-bit operating systems with x86-compatible Intel architecture (commonly known as AMD64, Intel64, x86-64, IA-
32e, EM64T, or x64 chips) are required on all platforms. Itanium-architecture chips (also known as IA-64) are not
supported. Multiple-core chips are recommended.
OPERATING SYSTEM OR
PLATFORM SKU OPERATIONALIZATION? MICROSOFTML FOR R?
Hortonworks HDP 2.4-2.6 Machine Learning Server Edge nodes only All nodes
for Hadoop
MapR 5.0-5.2 Machine Learning Server Edge nodes only All nodes
for Hadoop
You can install Machine Learning Server on open-source Apache Hadoop from http://hadoop.apache.org but
we can only offer support for commercial distributions.
SKU PLATFORMS
Machine Learning Red Hat Enterprise Linux and CentOS 6.x 1 and 7.x
Server for Linux SUSE Linux Enterprise Server 11 1
Ubuntu 14.04 and 16.04
Machine Learning Windows 7 SP1 1,2, Windows 8.1 1,2, Windows 10 1,2
Server for Windows Windows Server 2012 R2, Windows Server 2016
1 .NET Core 1.1 platform dependency: Certain features like the machine learning algorithms in the
MicrosoftML R package and configuring to operationalize your analytics are NOT supported on the marked
(1) platforms since they require .NET Core.
2 Use a server OS for operationalizing analytics. We do NOT recommend that you operationalize your
analytics on non-server platforms such as these marked (2). While some might work, only server platforms
are supported. See the full list of supported platforms for operationalizing here.
R Server for Linux Red Hat Enterprise Linux (RHEL) and CentOS 6.x(4 ) and 7.x
SLES11(4 )
Ubuntu 14.04 and 16.04
R Server for Teradata Teradata Database 14.10, 15.00, 15.10 on SUSE Linux
Enterprise Server 11(4 )
Hardware and software requirements for SQL Server Machine Learning Services and R Server (Standalone)
in SQL Server can be found in SQL Server production documentation.
1 You can install RServer for Hadoop on open-source Apache Hadoop from http://hadoop.apache.org but
we can only offer support for R Server on CDH, HDP, or MapR.
2 Cloudera installation using the built-in parcel generator
script for 9.1 requires CentOS/RHEL 7.0 as the
operating system. The parcel generator excludes any R Server features that it cannot install. For more
information, see Install R Server 9.1 on CDH.
3 Spark integration is supported only through a Hadoop distribution on CDH, HDP, or MapR. Not all
supported versions of Hadoop include a supported level of Spark. Specifically, HDP must be at least 2.3.4 to
get a supported level of Spark.
4.NET Core 1.1 platform dependency: Several features in R Server have a .NET Core dependency. These
features include Overview of MicrosoftML algorithms bundled in the MicrosoftML package as well as the
ability to configure R Server to operationalize your R analytics. Due to the .Net Core dependency, these
features are NOT available on these platforms.
5To operationalize your analytics or use the MicrosoftML package on R Server for Hadoop, you must deploy
on edge nodes in a Hadoop cluster, if the underlying operating system is CentOS/RHEL 7.x or Ubuntu 14.04.
It is not supported on SUSE SLES11.
NOTE
R Server operationalization is not available on Windows if you use the SQL Server installer. You must use the
standalone Windows installer to get operationalization functionality.
System requirements
Operating system must be a supported version of 64-bit Windows.
Operationalization features (administrator utility, web service deployment, remote sessions (R ), web and
compute node designations) are supported on Windows Server 2012 R2 or 2016. This functionality is
not available on a Windows client.
Memory must be a minimum of 2 GB of RAM is required; 8 GB or more are recommended. Disk space
must be a minimum of 500 MB.
.NET Framework 4.5.2 or later. The installer checks for this version of the .NET Framework and provides
a download link if it's missing. A computer restart is required after a .NET Framework installation.
The following additional components are included in Setup and required for Machine Learning Server on
Windows.
Microsoft R Open 3.4.3 (if you add R )
Anaconda 4.2 with Python 3.5 (if you add Python)
Azure CLI
Microsoft Visual C++ 2015 Redistributable
Microsoft MPI 8.1
AS OLE DB (SQL Server 2016) provider
Licensing
Machine Learning Server is licensed as a SQL Server supplemental feature. On development workstations,
you can install the developer edition at no charge.
On production servers, the enterprise edition of Machine Learning Server for Windows is licensed by the core.
Enterprise licenses are sold in 2-core packs, and you must have a license for every core on the machine. For
example, on an 8-core server, you would need four 2-core packs. For more information, start with the SQL
Server pricing page.
NOTE
When you purchase an enterprise license of Machine Learning Server for Windows, you can install Machine Learning
Server for Hadoop for free (5 nodes for each core licensed under enterprise licensing).
Volume Licensing Service Center Enterprise Sign in, search for "SQL Server 2017",
(VLSC) and then choose a per-core licensing
option. A selection for Machine
Learning Server 9.3 is provided on
this site.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio
Dev Essentials. Developer edition has
the same features as Enterprise,
except it is licensed for development
scenarios.
How to install
This section walks you through a Machine Learning Server deployment using the standalone Windows
installer.
Run Setup
The setup wizard installs, upgrades, and uninstalls all in one workflow.
1. Extract the contents of the zipped file. On your computer, go to the Downloads folder, right-click
en_machine_learning_server_for_windows_x64_.zip to extract the contents.
2. Double-click ServerSetup.exe to start the wizard.
3. In Configure installation, choose components to install. Clearing a checkbox removes the component.
Selecting a checkbox adds or upgrades a component.
Core components are listed for visibility, but are not configurable. Core components are required.
R adds R Open and the R libraries.
Python adds Anaconda and the Python libraries.
Pre-trained Models are used for image classification and sentiment detection. You can install the
models with R or Python, but not as a standalone component.
4. Accept the license agreement for Machine Learning Server, as well as the license agreements for
Microsoft R Open and Anaconda.
5. At the end of the wizard, click Install to run setup.
NOTE
By default, telemetry data is collected during your usage of Machine Learning Server. To turn this feature on or off, see
Opting out of data collection.
import os
import revoscalepy
sample_data_path = revoscalepy.RxOptions.get_option("sampleDataDir")
ds = revoscalepy.RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
summary = revoscalepy.rx_summary("ArrDelay+DayOfWeek", ds)
print(summary)
Output from the sample dataset should look similar to the following:
Counts
DayOfWeek
1 97975.0
2 77725.0
3 78875.0
4 81304.0
5 82987.0
6 86159.0
7 94975.0
To quit the program, type quit() at the command line with no arguments.
NOTE
Python support is new and there are a few limitations in remote computing scenarios. Remote execution is not
supported on Windows or Linux in Python code. Additionally, you cannot set a remote compute context to HadoopMR
in Python.
What's installed
An installation of Machine Learning Server includes some or all of the following components.
COMPONENT DESCRIPTION
R proprietary libraries and script engine Proprietary libraries are co-located with R base libraries in
the <install-directory>\library folder. Libraries include
RevoScaleR, MicrosoftML, mrsdeploy, olapR, RevoPemaR,
and others listed in R Package Reference.
Python proprietary libraries Proprietary packages provide modules of class objects and
static functions. Python libraries are in the
<install-directory>\lib\site-packages folder. Libraries
include revoscalepy, microsoftml, and azureml-model-
management-sdk.
Admin CLI Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.
Consider adding a development tool on the server to build script or solutions using R Server features:
Visual Studio 2017 followed by the R Tools for Visual Studio (RTVS ) add-in and the Python for Visual
Studio (PTVS ).
Next steps
We recommend starting with any Quickstart tutorial listed in the contents pane.
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
R Function Reference
Python Function Reference
Offline installation for Machine Learning Server for
Windows
6/18/2018 • 3 minutes to read • Edit Online
9.3.0 Downloads
On an internet-connected computer, download all of the following files.
Machine Learning Server setup Get Machine Learning Server for R Server
Windows
(en_machine_learning_server_for_wind
ows_x64_.zip) from one of these sites:
9.2.1 Downloads
If you require the previous version, use these links instead.
Machine Learning Server setup Get Machine Learning Server for R Server
Windows
(en_machine_learning_server_for_wind
ows_x64_.zip) from one of these sites:
TIP
On the offline server, run ServerSetup.exe /offline from the command line to get links for the .cab files used during
installation. The list of .cab files appears in the installation wizard, after you select which components to install.
Run setup
After files are placed, use the wizard or run setup from the command line:
Install Machine Learning Server > How to install > Run setup
Commandline installation
For Python
Python runs when you execute a .py script or run commands in a Python console window.
1. Go to C:\Program Files\Microsoft\ML Server\PYTHON_SERVER.
2. Double-click Python.exe.
3. At the command line, type help() to open interactive help.
4. Type revoscalepy at the help prompt, followed by microsoftml to print the function list for each module.
5. Paste in the following revoscalepy script to return summary statistics from the built-in AirlineDemo
demo data:
import os
import revoscalepy
sample_data_path = revoscalepy.RxOptions.get_option("sampleDataDir")
ds = revoscalepy.RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
summary = revoscalepy.rx_summary("ArrDelay+DayOfWeek", ds)
print(summary)
Output from the sample dataset should look similar to the following:
Counts
DayOfWeek
1 97975.0
2 77725.0
3 78875.0
4 81304.0
5 82987.0
6 86159.0
7 94975.0
Next steps
We recommend starting with any Quickstart tutorial listed in the contents pane.
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Command line install for Machine Learning Server
for Windows
6/18/2018 • 3 minutes to read • Edit Online
PARAMETER DESCRIPTION
Install Modes
PARAMETER DESCRIPTION
Install Options
PARAMETER DESCRIPTION
/python Install just the Python feature. Use with /install . Applies to
version 9.3 only.
/offline Instructs setup to find .cab files on the local system in the
mediadir location. This option requires that the server is
disconnected from the internet.
/cachedir="" A download location for the .cab files. By default, setup uses
%temp% for the local admin user. Assuming an online
installation scenario, you can set this parameter to have setup
download the .cabs to the folder you specify.
/mediadir="" The .cab file location setup uses to find .cab files in an offline
installation. By default, setup uses %temp% for local admin.
Default installation
A default installation includes R and Python, but not the pre-trained models. You must explicitly add /models to an
installation to add this feature.
The command line equivalent of a double-click invocation of ServerSetup.exe is serversetup.exe /install /full .
Examples
1. Run setup in unattended mode with no prompts or user interaction, to install everything. For version 9.2.1,
both R Server and Python Server are included in every installation; the pre-trained models are optional and
have to be explicitly specified to include them in the installation. For version 9.3 only, you can set flags to
install individual components: R, Python, pre-trained models:
serversetup.exe /quiet /r
serversetup.exe /quiet /python
serversetup.exe /quiet /models
2. Add the pre-trained machine learning models to an existing installation. You cannot install them as a
standalone component. The models require R or Python. During installation, the pre-trained models are
inserted into the MicrosoftML (R ) and microsoftml (Python) libraries, or both if you add both languages.
Once installed, you cannot incrementally remove them. Removal will require uninstall and reinstall of
Python or R Server.
serversetup.exe /install /models
4. Unattended offline install requires .cab files that provide open-source distributions and other dependencies.
The /offline parameter instructs setup to look for the .cab files on the local system. By default, setup looks
for the .cab files in the %temp% directory of local admin, but you could also set the media directory if the
.cab files are in a different folder. For more information and .cab download links, see Offline installation.
serversetup.exe /quiet /offline /mediadir="D:/Public/CABS
Next steps
We recommend continuing with any Quickstart tutorial listed in the contents pane.
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Uninstall Machine Learning Server for Windows
4/13/2018 • 3 minutes to read • Edit Online
Manual uninstall
If Setup fails to install all of the components, you can run a VB Script that forces uninstall and cleans up residual
components.
1. Run a script that produces a list of all installed products and saves it in a log.
2. Review log output for Microsoft Machine Learning Server, Microsoft R Server, or Microsoft R Client.
3. For either product, find the value for LocalPackage . For example: C:\windows\Installer\222d19.msi
4. Run the package at an elevated command prompt with this syntax:
Msiexec /x {LocalPackage.msi} /L*v uninstall.log , where local package is the value from the previous step.
5. Review the uninstall log to confirm the software was removed. You can repeat steps 1 and 2 for further
verification.
If the script contains no evidence of the program, but the program folder still exists, you can safely delete it.
Program files are located at \Program Files\Microsoft .
Dim s
s = vbNewLine & vbNewLine & "===========================================" & vbNewLine
s = s & "InstalledProductCode: " & vbTab & objInstaller.ProductInfo(objProd, "InstalledProductCode") &
vbNewLine
s = s & "InstalledProductName: " & vbTab & objInstaller.ProductInfo(objProd, "InstalledProductName") &
vbNewLine
s = s & "===========================================" & vbNewLine
s = s & "ProductInfo for: " & vbTab & objProd & vbNewLine
s = s & "VersionString: " & vbTab & objInstaller.ProductInfo(objProd, "VersionString") & vbNewLine
s = s & "HelpLink: " & vbTab & objInstaller.ProductInfo(objProd, "HelpLink") & vbNewLine
s = s & "HelpTelephone: " & vbTab & objInstaller.ProductInfo(objProd, "HelpTelephone") & vbNewLine
s = s & "InstallLocation: " & vbTab & objInstaller.ProductInfo(objProd, "InstallLocation") & vbNewLine
s = s & "InstallSource: " & vbTab & objInstaller.ProductInfo(objProd, "InstallSource") & vbNewLine
s = s & "InstallDate: " & vbTab & objInstaller.ProductInfo(objProd, "InstallDate") & vbNewLine
s = s & "Publisher: " & vbTab & objInstaller.ProductInfo(objProd, "Publisher") & vbNewLine
s = s & "LocalPackage: " & vbTab & objInstaller.ProductInfo(objProd, "LocalPackage") & vbNewLine
s = s & "URLInfoAbout: " & vbTab & objInstaller.ProductInfo(objProd, "URLInfoAbout") & vbNewLine
s = s & "URLUpdateInfo: " & vbTab & objInstaller.ProductInfo(objProd, "URLUpdateInfo") & vbNewLine
s = s & "VersionMinor: " & vbTab & objInstaller.ProductInfo(objProd, "VersionMinor") & vbNewLine
s = s & "VersionMajor: " & vbTab & objInstaller.ProductInfo(objProd, "VersionMajor") & vbNewLine
s = s & vbNewLine
s = s & "Transforms: " & vbTab & objInstaller.ProductInfo(objProd, "Transforms") & vbNewLine
s = s & "Language: " & vbTab & objInstaller.ProductInfo(objProd, "Language") & vbNewLine
s = s & "ProductName: " & vbTab & objInstaller.ProductInfo(objProd, "ProductName") & vbNewLine
s = s & "AssignmentType: " & vbTab & objInstaller.ProductInfo(objProd, "AssignmentType") & vbNewLine
s = s & "PackageCode: " & vbTab & objInstaller.ProductInfo(objProd, "PackageCode") & vbNewLine
s = s & "Version: " & vbTab & objInstaller.ProductInfo(objProd, "Version") & vbNewLine
s = s & "ProductIcon: " & vbTab & objInstaller.ProductInfo(objProd, "ProductIcon") & vbNewLine
Wscript.StdOut.WriteLine(s)
Next
Wscript.Quit 0
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
How to add or remove R and Python packages on
Machine Learning Server for Windows
7/31/2018 • 2 minutes to read • Edit Online
Version requirements
Product-specific packages like RevoScaleR and revoscalepy are built on base libraries of R and Python respectively.
Any new packages that you add must be compatible with the base libraries installed with the product.
Upgrading or downgrading the base R or Python libraries installed by setup is not supported. Microsoft's
proprietary packages are built on specific distributions and versions of the base libraries. Substituting different
versions of those libraries could destabilize your installation.
Base R is distributed through Microsoft R Open, as installed by Machine Learning Server or R Server. Python is
distributed though Anaconda, also installed by Machine Learning server.
To verify the base library versions on your system, start a command line tool and check the version information
displayed when the tool starts.
1. For R, start R.exe from \Program Files\Microsoft\ML Server\R_SERVER\bin\x64.
Loading the R execution environment displays base R version information, similar to this output.
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree" Copyright (C) 2017 The R Foundation for Statistical
Computing Platform: x86_64-w64-mingw32/x64 (64-bit)
Package location
On Linux, packages installed and used by Machine Learning Server can be found at these locations:
For R: C:\Program Files\Microsoft\ML Server\R_SERVER\library
For Python: C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Lib\site-packages
# Add a package
cd C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Scripts
pip install <packagename>
# Remove a package
cd C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Scripts
pip uninstall <packagename>
Using conda
# Add a package
cd C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Scripts
conda install <packagename>
# Remove a package
cd C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Scripts
conda uninstall <packagename>
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Install Machine Learning Server for Linux
9/10/2018 • 10 minutes to read • Edit Online
NOTE
These instructions use package managers to connect to Microsoft sites, download the distributions, and install the
server. If you know and prefer working with gzip files on a local machine, you can download
en_machine_learning_server_9.2.1_for_linux_x64_100352967.gz from Visual Studio Dev Essentials.
Licensing
Machine Learning Server is licensed as a SQL Server supplemental feature. On development workstations,
you can install the developer edition at no charge.
On production servers, the enterprise edition of Machine Learning Server for Linux is licensed by the core.
Enterprise licenses are sold in 2-core packs, and you must have a license for every core on the machine. For
example, on an 8-core server, you would need four 2-core packs. For more information, start with the SQL
Server pricing page.
NOTE
When you purchase an enterprise license of Machine Learning Server for Linux, you can install Machine Learning Server
for Hadoop for free (5 nodes for each core licensed under enterprise licensing).
Package managers
Setup is through package managers that retrieve distributions from Microsoft web sites and install the
software. Unlike previous releases, there is no install.sh script. You must have one of these package managers
to install Machine Learning Server for Linux.
zypper SUSE
The package manager downloads packages from the packages.microsoft.com repo, determines dependencies,
retrieves additional packages, sets the installation order, and installs the software. For example syntax on
linking to the repo, see Linux Software Repository for Microsoft Products.
Machine Learning Server activation is a separate step not performed by the package manager. If you forget to
activate, the server works, but the following error appears when you call an API: "Express Edition will continue
to be enforced."
Installation paths
After installation completes, software can be found at the following paths:
Install root: /opt/microsoft/mlserver/9.3.0
Microsoft R Open root: /opt/microsoft/ropen/3.4.3
Executables like Revo64 and mlserver-python are at /usr/bin
Install on Ubuntu
Follow these instructions for Machine Learning Server for Linux on Ubuntu (14.04 - 16.04 only).
# Install as root
sudo su
# Optionally, if your system does not have the https apt transport option
apt-get install apt-transport-https
# Set the location of the package repo the "prod" directory containing the distribution.
# This example specifies 16.04. Replace with 14.04 if you want that version
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
Install on SUSE
Follow these instructions for Machine Learning Server for Linux on SUSE (SLES11 only).
# Install as root
sudo su
# Set the location of the package repo at the "prod" directory containing the distribution
# This example is for SLES11, the only supported version of SUSE in Machine Learning Server
zypper ar -f https://packages.microsoft.com/sles/11/prod packages-microsoft-com
# Review and accept the license agreements for MRO, Anaconda, and Machine Learning Server.
y
Start Revo64
As another verification step, run the Revo64 program. By default, Revo64 is installed in the /usr/bin directory,
available to any user who can log in to the machine:
1. From /Home or any other working directory:
[<path>] $ Revo64
2. Run a RevoScaleR function, such as rxSummary on a dataset. Many sample datasets, such as the iris
dataset, are ready to use because they are installed with the software:
> rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
To quit the program, type q() at the command line with no arguments.
Start Python
1. From Home or any other user directory:
[<path>] $ mlserver-python
2. Run a revoscalepy function, such as rx_Summary on a dataset. Many sample datasets are built in. At
the Python command prompt, paste the following script:
import os
import revoscalepy
sample_data_path = revoscalepy.RxOptions.get_option("sampleDataDir")
ds = revoscalepy.RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
summary = revoscalepy.rx_summary("ArrDelay+DayOfWeek", ds)
print(summary)
Output from the sample dataset should look similar to the following:
Summary Statistics Results for: ArrDelay+DayOfWeek
File name:
/opt/microsoft/mlserver/9.3.0/libraries/PythonServer/revoscalepy/data/sample_data/AirlineDemoSmall.x
df
Number of valid observations: 600000.0
Counts
DayOfWeek
1 97975.0
2 77725.0
3 78875.0
4 81304.0
5 82987.0
6 86159.0
7 94975.0
To quit the program, type quit() at the command line with no arguments.
What's installed
An installation of Machine Learning Server includes some or all of the following components.
COMPONENT DESCRIPTION
R proprietary libraries and script engine Properietary R libraries are co-located with R base libraries.
Libraries include RevoScaleR, MicrosoftML, mrsdeploy, olapR,
RevoPemaR, and others listed in R Package Reference.
Python proprietary libraries Proprietary packages provide modules of class objects and
static functions. Libraries include revoscalepy, microsoftml,
and azureml-model-management-sdk.
Admin CLI Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.
Consider adding a development tool on the server to build script or solutions using R Server features:
Visual Studio 2017 followed by the R Tools for Visual Studio (RTVS ) add-in and the Python for Visual
Studio (PTVS ).
Package list
The following packages comprise a full Machine Learning Server installation:
microsoft-mlserver-packages-r-9.3.0 ** core
microsoft-mlserver-python-9.3.0 ** core
microsoft-mlserver-packages-py-9.3.0 ** core
microsoft-mlserver-mml-r-9.3.0 ** microsoftml for R (optional)
microsoft-mlserver-mml-py-9.3.0 ** microsoftml for Python (optional)
microsoft-mlserver-mlm-r-9.3.0 ** pre-trained models (requires mml)
microsoft-mlserver-mlm-py-9.3.0 ** pre-trained models (requires mml)
microsoft-mlserver-hadoop-9.3.0 ** hadoop (required for hadoop)
microsoft-mlserver-adminutil-9.3 ** operationalization (optional)
microsoft-mlserver-computenode-9.3 ** operationalization (optional)
microsoft-mlserver-config-rserve-9.3 ** operationalization (optional)
microsoft-mlserver-dotnet-9.3 ** operationalization (optional)
microsoft-mlserver-webnode-9.3 ** operationalization (optional)
azure-cli-2.0.25-1.el7.x86_64 ** operationalization (optional)
The microsoft-mlserver-python-9.3.0 package provides Anaconda 4.2 with Python 3.5, executing as mlserver-
python, found in /opt/microsoft/mlserver/9.3.0/bin/python/python
Microsoft R Open is required for R execution:
microsoft-r-open-foreachiterators-3.4.3
microsoft-r-open-mkl-3.4.3
microsoft-r-open-mro-3.4.3
Microsoft .NET Core 2.0, used for operationalization, must be added to Ubuntu:
dotnet-host-2.0.0
dotnet-hostfxr-2.0.0
dotnet-runtime-2.0.0
Additional open-source packages are installed if a package is required but not found on the system. This list
varies for each installation. Refer to offline installation for an example list.
Next steps
We recommend starting with any Quickstart tutorial listed in the contents pane.
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Offline installation Machine Learning Server for
Linux
7/31/2018 • 4 minutes to read • Edit Online
NOTE
These instructions use package managers to connect to Microsoft sites, download the distributions, and install the server.
If you know and prefer working with gzip files on a local machine, you can download
en_machine_learning_server_9.2.1_for_linux_x64_100352967.gz from Visual Studio Dev Essentials.
Package managers
In contrast with previous releases, there is no install.sh script. Package managers are used for installation.
zypper SUSE
Package location
Packages for all supported versions of Linux can be found at packages.microsoft.com.
https://packages.microsoft.com/rhel/6/prod/ (centos 6)
https://packages.microsoft.com/rhel/7/prod/ (centos 7)
https://packages.microsoft.com/sles/11/prod/ (sles 11)
https://packages.microsoft.com/ubuntu/14.04/prod/pool/main/m/ (Ubuntu 14.04)
https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/ (Ubuntu 16.04)
Package list
The following packages comprise a full Machine Learning Server installation:
microsoft-mlserver-packages-r-9.3.0 ** core
microsoft-mlserver-python-9.3.0 ** core
microsoft-mlserver-packages-py-9.3.0 ** core
microsoft-mlserver-mml-r-9.3.0 ** microsoftml for R (optional)
microsoft-mlserver-mml-py-9.3.0 ** microsoftml for Python (optional)
microsoft-mlserver-mlm-r-9.3.0 ** pre-trained models (requires mml)
microsoft-mlserver-mlm-py-9.3.0 ** pre-trained models (requires mml)
microsoft-mlserver-hadoop-9.3.0 ** hadoop (required for hadoop)
microsoft-mlserver-adminutil-9.3 ** operationalization (optional)
microsoft-mlserver-computenode-9.3 ** operationalization (optional)
microsoft-mlserver-config-rserve-9.3 ** operationalization (optional)
microsoft-mlserver-webnode-9.3 ** operationalization (optional)
azure-cli-2.0.25-1.el7.x86_64 ** operationalization (optional)
The microsoft-mlserver-python-9.3.0 package provides Anaconda 4.2 with Python 3.5, executing as mlserver-
python, found in /opt/microsoft/mlserver/9.3.0/bin/python/python
Microsoft R Open is required for R execution:
microsoft-r-open-foreachiterators-3.4.3
microsoft-r-open-mkl-3.4.3
microsoft-r-open-mro-3.4.3
Microsoft .NET Core 2.0, used for operationalization, must be added to Ubuntu:
dotnet-host-2.0.0
dotnet-hostfxr-2.0.0
dotnet-runtime-2.0.0
Additional open-source packages must be installed if a package is required but not found on the system. This
list varies for each installation. Here is one example of the additional packages that were added to a clean RHEL
image during a connected (online) setup:
cairo
fontconfig
fontpackages-filesystem
graphite2
harfbuzz
libICE
libSM
libXdamage
libXext
libXfixes
libXft
libXrender
libXt
libXxf86vm
libicu
libpng12
libthai
libunwind
libxshmfence
mesa-libEGL
mesa-libGL
mesa-libgbm
mesa-libglapi
pango
paratype-pt-sans-caption-fonts
pixman
Download packages
If your system provides a graphical user interface, you can click a file to download it. Otherwise, use wget . We
recommend downloading all packages to a single directory so that you can install all of them in a single
command. By default, wget uses the working directory, but you can specify an alternative path using the
-outfile parameter.
The following example is for the first package. Each command references the version number of the platform.
Remember to change the number if your version is different. For more information, see Linux Software
Repository for Microsoft Products.
Download to CentOS or RHEL:
wget https://packages.microsoft.com/rhel/7/prod/microsoft-mlserver-packages-r-9.3.0.rpm
Download to Ubuntu 16.04:
wget https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/microsoft-mlserver-packages-r-
9.3.0/microsoft-mlserver-packages-r-9.3.0.deb
Download to SUSE:
wget https://packages.microsoft.com/sles/11/prod/microsoft-mlserver-packages-r-9.3.0.rpm
Install packages
The package manager determines the installation order. Assuming all packages are in the same folder:
Install on CentOS or RHEL: yum install *.rpm
Install on Ubuntu: dpkg -i *.deb
Install on SUSE: zypper install *.rpm
This step completes installation.
Start Revo64
As another verification step, run the Revo64 program. By default, Revo64 is linked to the /usr/bin directory,
available to any user who can log in to the machine:
1. From /Home or any other working directory:
[<path>] $ Revo64
2. Run a RevoScaleR function, such as rxSummary on a dataset. Many sample datasets, such as the iris
dataset, are ready to use because they are installed with the software:
> rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
To quit the program, type q() at the command line with no arguments.
Start Python
1. From Home or any other user directory:
[<path>] $ mlserver-python
2. Run a revoscalepy function, such as rx_Summary on a dataset. Many sample datasets are built in. At the
Python command prompt, paste the following script:
import os
import revoscalepy
sample_data_path = revoscalepy.RxOptions.get_option("sampleDataDir")
ds = revoscalepy.RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
summary = revoscalepy.rx_summary("ArrDelay+DayOfWeek", ds)
print(summary)
Output from the sample dataset should look similar to the following:
Counts
DayOfWeek
1 97975.0
2 77725.0
3 78875.0
4 81304.0
5 82987.0
6 86159.0
7 94975.0
To quit the program, type quit() at the command line with no arguments.
Next steps
We recommend starting with any Quickstart tutorial listed in the contents pane.
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Uninstall Machine Learning Server for Linux
9/10/2018 • 2 minutes to read • Edit Online
NOTE
For upgrade purposes, uninstall is not necessary unless the existing version is 8.x. Upgrading from 9.x is an in-place upgrade
that overwrites the previous version. Upgrading from 8.x requires that you uninstall R Server 8.x first.
Gather information
Uninstall reverses the installation steps, including uninstalling any package dependencies used only by the server.
Start by collecting information about your installation.
1. List the packages from Microsoft.
On RHEL: yum list \*microsoft\*
On Ubuntu: apt list --installed | grep microsoft
On SUSE: zypper search \*microsoft-r\*
2. Get package version information. On a 9.3.0 installation, you should see about 17 packages. Since multiple
major versions can coexist, the package list could be much longer. Given a list of packages, you can get
verbose version information for particular packages in the list. The following examples are for Microsoft R
Open version 3.4.3:
On RHEL: rpm -qi microsoft-r-open-mro-3.4.3
On Ubuntu: dpkg --status microsoft-r-open-mro-3.4.3
On SUSE: zypper info microsoft-r-open-mro-3.4.3
Uninstall 9.3.0
1. On root@, uninstall Microsoft R Open (MRO ) first. This action removes any dependent packages used only
by MRO, which includes packages like microsoft-mlserver-packages-r.
On RHEL: yum erase microsoft-r-open-mro-3.4.3
On Ubuntu: apt-get purge microsoft-r-open-mro-3.4.3
On SUSE: zypper remove microsoft-r-open-mro-3.4.3
2. Remove the Machine Learning Server Python packages:
On RHEL: yum erase microsoft-mlserver-python-9.3.0
On Ubuntu: apt-get purge microsoft-mlserver-python-9.3.0
On SUSE: zypper remove microsoft-mlserver-python-9.3.0
3. Remove the Hadoop package:
On RHEL: yum erase microsoft-mlserver-hadoop-9.3.0
On Ubuntu: apt-get purge microsoft-mlserver-hadoop-9.3.0
On SUSE: zypper remove microsoft-mlserver-hadoop-9.3.0
4. You have additional packages if you installed the operationalization feature. On a 9.3.0 installation, this is
the On a 9.3.0 installation, this is the azureml-model-management library or mrsdeploy, which you can
uninstall using the syntax from the previous step. Multiple packages provide the feature. Uninstall each one
in the following order:
microsoft-mlserver-adminutil-9.3
microsoft-mlserver-webnode-9.3
microsoft-mlserver-computenode-9.3
5. Re-list the packages from Microsoft to check for remaining files:
On RHEL: yum list \*microsoft\*
On Ubuntu: apt list --installed | grep microsoft
On SUSE: zypper search \*microsoft-r\*
On Ubuntu, you have dotnet-runtime-2.0.0 . NET Core is a cross-platform, general purpose development
platform maintained by Microsoft and the .NET community on GitHub. This package could be providing
infrastructure to other applications on your computer. If Machine learning Server is the only Microsoft
software you have, you can remove it now.
6. After packages are uninstalled, remove remaining files. On root@, determine whether additional files still
exist:
$ ls /opt/microsoft/mlserver/9.3.0/
7. Remove the entire directory:
$ rm -fr /opt/microsoft/mlserver/9.3.0/
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under
microsoft/mlserver. This command is destructive and irrevocable, so be sure you have the correct directory before
you press Enter.
Package list
Machine Learning Server for Linux adds the following packages at a minimum. When uninstalling software, refer
to this list when searching for packages to remove.
dotnet-host-2.0.0
dotnet-hostfxr-2.0.0
dotnet-runtime-2.0.0
microsoft-mlserver-adminutil-9.3
microsoft-mlserver-all-9.3.0
microsoft-mlserver-computenode-9.3
microsoft-mlserver-config-rserve-9.3
microsoft-mlserver-hadoop-9.3.0
microsoft-mlserver-mlm-py-9.3.0
microsoft-mlserver-mlm-r-9.3.0
microsoft-mlserver-mml-py-9.3.0
microsoft-mlserver-mml-r-9.3.0
microsoft-mlserver-packages-py-9.3.0
microsoft-mlserver-packages-r-9.3.0
microsoft-mlserver-python-9.3.0
microsoft-mlserver-webnode-9.3
microsoft-r-open-foreachiterators-3.4.3
microsoft-r-open-mkl-3.4.3
microsoft-r-open-mro-3.4.3
azure-cli-2.0.25-1.el7.x86_64
See also
Install Machine Learning Server
Supported platforms
Known Issues
How to add or remove R and Python packages on
Machine Learning Server for Linux
7/31/2018 • 2 minutes to read • Edit Online
Version requirements
Product-specific packages like RevoScaleR and revoscalepy are built on base libraries of R and Python respectively.
Any new packages that you add must be compatible with the base libraries installed with the product.
Upgrading or downgrading the base R or Python libraries installed by setup is not supported. Microsoft's
proprietary packages are built on specific distributions and versions of the base libraries. Substituting different
versions of those libraries could destabilize your installation.
Base R is distributed through Microsoft R Open, as installed by Machine Learning Server or R Server. Python is
distributed though Anaconda, also installed by Machine Learning server.
To verify the base library versions on your system, start a command line tool and check the version information
displayed when the tool starts.
For R, from /Home or any other working directory: [<path>] $ Revo64
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree" Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:53:06) [GCC 4.4.7 20120313] on linux Type
"help", "copyright", "credits" or "license" for more information.
Package location
On Linux, packages installed and used by Machine Learning Server can be found at these locations:
For R: /opt/microsoft/mlserver/9.3.0/runtime/R/library
# Add a package
cd /opt/microsoft/mlserver/9.3.0/runtime/python/bin/
pip install <packagename>
# Remove a package
cd /opt/microsoft/mlserver/9.3.0/runtime/python/bin/
pip uninstall <packagename>
Using conda
# Add a package
cd /opt/microsoft/mlserver/9.3.0/runtime/python/bin/
conda install <packagename>
# Remove a package
cd /opt/microsoft/mlserver/9.3.0/runtime/python/bin/
conda uninstall <packagename>
See also
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Install Machine Learning Server using Cloudera
Manager
4/13/2018 • 6 minutes to read • Edit Online
Platform requirements
You can create a parcel generation script on any supported version of Linux, but execution requires CentOS or
RHEL 7.0 as the native file system.
The parcel generator excludes any R Server features that it cannot install, such as operationalization.
If parcel installation is too restrictive, follow the instructions for a generic Hadoop installation instead.
install.sh Script for installing Machine Learning Server. Do not use this
for a parcel install.
NOTE
The parcel generator file name includes a placeholder for the distribution. Remember to replace it with a valid value before
executing the copy commands.
2. On the left, find and select MLServer-9.3.0 in the parcel list. If you don't see it, check the parcel-repo folder.
3. On the right, in the parcel details page, MLServer-9.3.0 should have a status of Downloaded with an
option to Distribute. Click Distribute to roll out Machine Learning Server on available nodes.
4. Status changes to distributed. Click Activate on the button to make Machine Learning Server operational
in the cluster.
You are finished with this task when status is "distributed, activated" and the next available action is Deactivate.
2. Find and select MLServer-9.3.0 and click Continue to start a wizard for adding services.
3. In the next page, add role assignments on all nodes used to run the service, both edge and data nodes. Click
Continue.
4. On the last page, click Finish to start the service.
Machine Learning Server should now be deployed in the cluster.
Rollback a deployment
You have the option of rolling back the active deployment in Cloudera Manager, perhaps to use an older version.
You can have multiple versions in Cloudera, but only can be active at any given time.
1. In Cloudera Manager, click the Parcel icon to open the parcel list.
2. Find MLServer-9.3.0 and click Deactivate.
The parcel still exists, but Machine Learning Server is not operational in the cluster.
The above steps apply to 9.3.0. If you have R Server (either 9.1 or 9.0.1), see Install R Server 9.1 on CDH and
Install R Server 9.0.1 on CDH for release-specific documentation.
Next steps
We recommend starting with How to use RevoScaleR with Spark or How to use RevoScaleR with Hadoop
MapReduce.
For a list of functions that utilize Yarn and Hadoop infrastructure to process in parallel across the cluster, see
Running a distributed analysis using RevoScaleR functions.
R solutions that execute on the cluster can call functions from any R package. To add new R packages, you can use
any of these approaches:
Use a parcel and create new parcel using generate_mlserver_parcel.sh script.
Use the RevoScaleR rxExec function to add new packages.
Manually run install.packages() on all nodes in Hadoop cluster (using distributed shell or some other
mechanism).
See also
Install on Linux
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Install Machine Learning Server for Hadoop
6/18/2018 • 4 minutes to read • Edit Online
NOTE
These instructions use package managers to connect to Microsoft sites, download the distributions, and install the
server. If you know and prefer working with gzip files on a local machine, you can download
en_machine_learning_server_9.2.1_for_hadoop_x64_100353069.gz from Visual Studio Dev Essentials.
Package managers
Installation is through package managers. Unlike previous releases, there is no install.sh script.
zypper SUSE
Installation paths
After installation completes, software can be found at the following paths:
Install root: /opt/microsoft/mlserver/9.3
Microsoft R Open root: /opt/microsoft/ropen/3.4.3
Executables such as Revo64 and mlserver-python are at /usr/bin
NOTE
You cannot use operationalization on data nodes. Operationalization does not support Yarn queues and cannot run in a
distributed manner.
2. Refer to the annotated package list and download individual packages from the package repo
corresponding to your platform:
https://packages.microsoft.com/ubuntu/14.04/prod/
https://packages.microsoft.com/ubuntu/16.04/prod/
https://packages.microsoft.com/rhel/7/prod/
https://packages.microsoft.com/sles/11/prod/
3. Make a directory to contain your packages: hadoop fs -mkdir /tmp/mlsdatanode
6. Install the packages using the tool and syntax for your platform:
On Ubuntu online: apt-get install *.rpm
On Ubuntu offline: dpkg -i *.deb
On CentOS and RHEL: yum install *.rpm
7. Activate the server: /opt/microsoft/mlserver/9.3.0/bin/R/activate.sh
Packages list
The following packages comprise a full Machine Learning Server installation:
microsoft-mlserver-packages-r-9.3.0 ** core
microsoft-mlserver-python-9.3.0 ** core
microsoft-mlserver-packages-py-9.3.0 ** core
microsoft-mlserver-hadoop-9.3.0 ** hadoop (required for hadoop)
microsoft-mlserver-mml-r-9.3.0 ** microsoftml for R (optional)
microsoft-mlserver-mml-py-9.3.0 ** microsoftml for Python (optional)
microsoft-mlserver-mlm-r-9.3.0 ** pre-trained models (requires mml)
microsoft-mlserver-mlm-py-9.3.0 ** pre-trained models (requires mml)
microsoft-mlserver-adminutil-9.3 ** operationalization (optional)
microsoft-mlserver-computenode-9.3 ** operationalization (optional)
microsoft-mlserver-config-rserve-9.3 ** operationalization (optional)
microsoft-mlserver-dotnet-9.3 ** operationalization (optional)
microsoft-mlserver-webnode-9.3 ** operationalization (optional)
azure-cli-2.0.25-1.el7.x86_64 ** operationalization (optional)
The microsoft-mlserver-python-9.3.0 package provides Anaconda 4.2 with Python 3.5, executing as mlserver-
python, found in /opt/microsoft/mlserver/9.3.0/bin/python/python
Microsoft R Open is required for R execution:
microsoft-r-open-foreachiterators-3.4.3
microsoft-r-open-mkl-3.4.3
microsoft-r-open-mro-3.4.3
Microsoft .NET Core 2.0, used for operationalization, must be added to Ubuntu:
dotnet-host-2.0.0
dotnet-hostfxr-2.0.0
dotnet-runtime-2.0.0
Additional open-source packages could be required. The potential list of packages varies for each computer.
Refer to offline installation for an example list.
Next steps
We recommend starting with How to use RevoScaleR with Spark or How to use RevoScaleR with Hadoop
MapReduce.
For a list of functions that utilize Yarn and Hadoop infrastructure to process in parallel across the cluster, see
Running a distributed analysis using RevoScaleR functions.
R solutions that execute on the cluster can call functions from any R package. To add new R packages, you can
use any of these approaches:
Use the RevoScaleR rxExec function to add new packages.
Manually run install.packages() on all nodes in Hadoop cluster (using distributed shell or some other
mechanism).
See also
Install on Linux
Install Machine Learning Server
What's new in Machine Learning Server
Supported platforms
Known Issues
Configure Machine Learning Server to operationalize your analytics
Uninstall Machine Learning Server for Hadoop
6/18/2018 • 2 minutes to read • Edit Online
On Ubunute
apt-get purge microsoft-mlserver-adminutil-9.3
apt-get purge microsoft-mlserver-webnode-9.3
apt-get purge microsoft-mlserver-computenode-9.3
On SUSE
zypper remove microsoft-mlserver-adminutil-9.3
zypper remove microsoft-mlserver-webnode-9.3
zypper remove microsoft-mlserver-computenode-9.3
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under
microsoft/mlserver. This command is destructive and irrevocable, so be sure you have the correct directory before
you press Enter.
Package list
Machine Learning Server for Hadoop adds the following packages at a minimum. When uninstalling software,
refer to this list when searching for packages to remove.
dotnet-host-2.0.0
dotnet-hostfxr-2.0.0
dotnet-runtime-2.0.0
microsoft-mlserver-adminutil-9.3
microsoft-mlserver-all-9.3.0
microsoft-mlserver-computenode-9.3
microsoft-mlserver-config-rserve-9.3
microsoft-mlserver-hadoop-9.3.0
microsoft-mlserver-mlm-py-9.3.0
microsoft-mlserver-mlm-r-9.3.0
microsoft-mlserver-mml-py-9.3.0
microsoft-mlserver-mml-r-9.3.0
microsoft-mlserver-packages-py-9.3.0
microsoft-mlserver-packages-r-9.3.0
microsoft-mlserver-python-9.3.0
microsoft-mlserver-webnode-9.3
microsoft-r-open-foreachiterators-3.4.3
microsoft-r-open-mkl-3.4.3
microsoft-r-open-mro-3.4.3
azure-cli-2.0.25-1.el7.x86_64
See also
Install Machine Learning Server
Supported platforms
Known Issues
Operationalize analytics with Machine
Learning Server
4/13/2018 • 3 minutes to read • Edit Online
Video introduction
https://www.youtube.com/embed/7i19-s9mxJU
Configuration
To benefit from Machine Learning Server’s web service deployment and remote execution features,
you must first configure the server after installation to act as a deployment server and host analytic
web services.
Learn how to configure Machine Learning Server to operationalize analytics.
Learn more
This section provides a quick summary of useful links for data scientists operationalizing R and
Python analytics with Machine Learning Server.
Key Documents
What are web services?
For R users:
Quickstart: Deploying an R model as a web service
Functions in mrsdeploy package
Connecting to R Server from mrsdeploy
Working with web services in R
Asynchronous batch execution of web services in R
Execute on a remote Machine Learning Server
For Python users:
Quickstart: Deploying an Python model as a web service
Functions in azureml-model-management-sdk package
Connecting to Machine Learning Server in Python
Working with web services in Python
How to consume web services in Python synchronously (request/response)
How to consume web services in Python asynchronously (batch)
What's new in Machine Learning Server
The differences between DeployR and R Server 9.x Operationalization.
How to integrate web services and authentication into your application
Get started for Administrators
User Forum
Manage and configure Machine Learning Server for
operationalization
9/10/2018 • 7 minutes to read • Edit Online
You can configure Machine Learning Server after installation to act as a deployment server and host analytic
web services as well as to execute code remotely. For a general introduction to operationalization, read the
About topic.
This guide is for system administrators. If you are responsible for configuring or maintaining Machine Learning
Server, then this guide is for you.
As an administrator, your key responsibilities are to ensure Machine Learning Server is properly provisioned and
configured to meet the demands of your user community. In this context, the following policies are of central
importance:
Server security policies, which include user authentication and authorization
Server R package management policies
Server runtime policies, which affect availability, scalability, and throughput
Whenever your policies fail to deliver the expected runtime behavior or performance, you need to troubleshoot
your deployment. For that we provide diagnostic tools and numerous recommendations.
Configure web & compute nodes for analytic deployment and remote
execution
To benefit from Machine Learning Server’s web service deployment and remote execution features, you must first
configure the server after installation to act as a deployment server and host analytic web services.
Configuration components
All configurations have at least a single web node, single compute node, and a database.
Web nodes act as HTTP REST endpoints with which users can interact directly to make API calls. These
nodes also access the data in the database and send requests to the compute node for processing. Web
nodes are stateless, and therefore, session persistence ("stickiness") is not required. A single web node can
route multiple requests simultaneously. However, you must have more than one web node to ensure high
availability and avoid a single point of failure.
Compute nodes are used to execute R and Python code as a session or service. Each compute node has
its own pool of R and python shells and can therefore execute multiple requests at the same time. Scaling
out compute nodes enables you to have more R and Python execution shells and benefit from load
balancing across these compute nodes.
The database. An SQLite 3.7+ database is installed by default, but you can, and in some cases must, use a
SQL Server or PostgreSQL database instead.
One -box vs. Enterprise configurations
These nodes can be installed in one of two configurations:
One-box
As the name suggests, a one-box configuration involves one web node and one compute node run on a single
machine. Set-up is a breeze. This configuration is useful when you want to explore what it is to operationalize R
and Python analytics using Machine Learning Server. It is perfect for testing, proof-of-concepts, and small-scale
prototyping, but might not be appropriate for production usage. This configuration is covered in this article. Learn
more in this One-box configuration article.
Enterprise
A enterprise configuration where multiple nodes are configured on multiple machines along with other enterprise
features. This configuration can be scaled out or in by adding or removing nodes. Learn more about this setup in
the enterprise configuration article. For added security, you can configure SSL and authenticate against Active
Directory (LDAP ) or Azure Active Directory in this configuration.
Supported platforms
The web nodes and compute nodes are supported on these operating systems
WINDOWS LINUX
Security policies
Machine Learning Server has many features that support the creation of secure applications. Common security
considerations, such as data theft or vandalism, apply regardless of the version of Machine Learning Server you
are using. Data integrity should also be considered as a security issue. If data is not protected, it is possible that it
could become worthless if improvised data manipulation is permitted and the data is inadvertently or maliciously
modified. In addition, there are often legal requirements that must be adhered to, such as the correct storage of
confidential information.
User access to the Machine Learning Server and the operationalization services offered on its API are entirely
under your control as the server administrator. Machine Learning Server offers seamless integration with popular
enterprise security solutions like Active Directory LDAP or Azure Active Directory. You can configure Machine
Learning Server to authenticate using these methods to establish a trust relationship between your user
community and the operationalization engine for Machine Learning Server. Your users can then supply simple
username and password credentials in order to verify their identity. A token is issued to an authenticated user.
In addition to authentication, you can add other enterprise security around Machine Learning Server such as:
Secured connections using SSL/TLS 1.2. For security reasons, we strongly recommend that you enable
SSL/TLS 1.2 in all production environments.
Cross-Origin Resource Sharing to allow restricted resources on a web page to be requested from another
domain outside the originating domain.
Role-based access control over web services in Machine Learning Server.
Additionally, we recommend that you review the following Security Considerations:
R package policies
The primary function of the operationalization feature is to support the execution of R code on behalf of client
applications. One of your key objectives as an administrator is to ensure a reliable, consistent execution
environment for that code.
The R code developed and deployed by data scientists within your community frequently depends on one or
more R packages. Those R packages may be hosted on CRAN, MRAN, github, in your own local CRAN
repository or elsewhere.
Making sure that these R package dependencies are available to the code executing on Machine Learning
Server's operationalization feature requires active participation from you, the administrator. There are several R
package management policies you can adopt for your deployment, which are detailed in this R Package
Management guide.
Runtime policies
The operationalization feature supports a wide range of runtime policies that affect many aspects of the server
runtime environment. As an administrator, you can select the preferred policies that best reflect the needs of your
user community.
General
The external configuration file, <node-install-path>\appsettings.json defines a number of policies used when
deploying and operationalizing web services with Machine Learning Server. There is one appsettings.json file on
each web node and on each compute node. This file contains a wide range of policy configuration options for each
node.
The location of this file depends on the server version, operating system, and the node. Learn more in this article:
"Default installation paths for compute and web nodes".
On the web node, this configuration file governs authentication, SSL, CORS support, service logging,
database connections, token signing, and more.
On the compute node, this configuration file governs SSL, logging, shell pool size, execution ports, and
more.
Asynchronous batch sizes
Your users can perform speedy realtime and batch scoring. To reduce the risk of resource exhaustion by a single
user, you can set the maximum number of operations that a single caller can execute in parallel during a specific
asynchronous batch job.
This value is defined in "MaxNumberOfThreadsPerBatchExecution" property in the appsettings.json on the web node.
If you have multiple web nodes, we recommend you set the same values on every machine.
Availability
Machine Learning Server consists of web and compute nodes that combine to deliver the full capabilities of this R
and Python operationalization server. Each component can be configured for Active-Active High Availability to
deliver a robust, reliable runtime environment.
You can configure Machine Learning Server to use multiple Web Nodes for Active-Active backup / recovery using
a load balancer.
For data storage high availability, you can leverage the high availability capabilities found in enterprise grade
databases (SQL Server or PostgreSQL ). Learn how to use one of those databases, here.
Scalability & throughput
In the context of a discussion on runtime policies, the topics of scalability and throughput are closely related.
Some of the most common questions that arise when planning the configuration and provisioning of Machine
Learning Server for operationalization are:
How many users can I support?
How web nodes and compute nodes do I need?
What throughput can I expect?
The answer to these questions ultimately depends on the configuration and node resources allocated to your
deployment.
To evaluate and simulate the capacity of a configuration, use the Evaluate Capacity tool. You can also adjust the
pool size of available R shells for concurrent operations.
Troubleshooting
There is no doubt that, as an administrator, you have experienced failures with servers, networks, and systems.
Likewise, your chosen runtime policies may sometime fail to deliver the runtime behavior or performance needed
by your community of users.
When those failures occur in the operationalization environment, we recommend you first turn to the diagnostic
testing tool to attempt to identify the underlying cause of the problem.
Beyond the diagnostics tool, the Troubleshooting documentation offers suggestions and recommendations for
common problems with known solutions.
More resources
This section provides a quick summary of useful links for administrators working with Machine Learning Server's
operationalization feature.
Use the table of contents to find all of the guides and documentation needed by the administrator.
Key Documents
About Operationalization
Configuration
R Package Management
What are web services?
Diagnostic Testing & Troubleshooting
Capacity Evaluation
Comparison between 8.x and 9.x
Other Getting Started Guides
How to integrate web services and authentication into your application
Support Channel
Forum
Configure Machine Learning Server 9.3 to
operationalize analytics on a single machine (One-
box)
7/31/2018 • 5 minutes to read • Edit Online
Applies to: Machine Learning Server 9.3 For older versions: ML Server 9.2.1 | R Server 9.x
You can configure Microsoft Learning Server after installation to act as a deployment server and to host analytic
web services for operationalization. Machine Learning Server offers two types of configuration for operationalizing
analytics and remote execution: One-box and Enterprise. This article describes the one-box configuration. For
more on enterprise configurations, see here.
A one-box configuration, as the name suggests, involves a single web node and compute node run on a single
machine along with a database. Set-up is a breeze. This configuration is useful when you want to explore what it is
to operationalize R and Python analytics using Machine Learning Server. It is perfect for testing, proof-of-concepts,
and small-scale prototyping, but might not be appropriate for production usage.
How to configure
IMPORTANT
You can create a ready-to-use server with just a few clicks using Azure Marketplace VM Machine Learning Server
Operationalization. Navigate to the virtual machine listing on Azure portal, select the Create button at the bottom, provide
necessary inputs to create the Operationalization Server.
Azure Resource Management templates are also provided in GitHub. This blog post provides more information.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
3. If on Linux and using the IPTABLES firewall or equivalent service, then use the iptables command (or the
equivalent) to open port 12800 to the public IP of the web node so that remote machines can access it.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
You are now ready to begin operationalizing your R and Python analytics with Machine Learning Server.
How to upgrade
Carefully review the following steps.
1. Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade
process.
2. R Server 9.x users only: If you used the default SQLite database, deployrdb_9.0.0.db or deployrdb_9.1.0.db
in R Server and want to persist the data, then you must back up the SQLite database before
uninstalling Microsoft R Server. Make a copy of the database file and put it outside of the Microsoft R
Server directory structure.
(If you are using a SQL Server or PostgreSQL database, you can skip this step.)
WARNING
If you skip this SQLite database backup step, your database data will be lost.
3. Uninstall the old version. The uninstall process stashes away a copy of your configuration files for a
seamlessly upgrade to Machine Learning Server 9.3.
For Machine Learning Server 9.2.1, read these instructions: Windows | Linux.
For Microsoft R Server 9.x, read this Uninstall Microsoft R Server to upgrade to a newer version.
4. If you are using a SQL Server or PostgreSQL database, you can skip this step. If you backed up a SQLite
database in Step 1, manually move the .db file under this directory so it can be found during the upgrade:
Windows: C:\Users\Default\AppData\Local\DeployR\current\frontend
Linux: /etc/deployr/current/frontend
5. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the parent
path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft SQL
Server\140).
6. In a command line window or terminal that was launched with administrator (Windows) or root/sudo
(Linux) privileges, run CLI commands to:
Set up a web node and compute node on the same machine.
Define a password for the default 'admin' account. Replace with a password of your choice. The admin
password must be 8-16 characters long and contain 1+ uppercase character, 1+ lowercase character, 1+
one number, and 1+ special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .
Authenticate with Machine Learning Server.
Test the configuration.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
7. If on Linux and using the IPTABLES firewall or equivalent service, then use the iptables command (or the
equivalent) to open port 12800 to the public IP of the web node so that remote machines can access it.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
You are now ready to begin operationalizing your R and Python analytics with Machine Learning Server.
WARNING
The entities created by users, specifically web services, and snapshots, are tied to their usernames. For this reason, you must
be careful to prevent changes to the user identifier over time. Otherwise, pre-existing web services and snapshots cannot be
mapped to the users who created them. For this reason, we strongly recommend that you DO NOT change the unique LDAP
identifier in appsettings.json once users start publishing service or creating snapshots.
Configure Machine Learning Server 9.3 to
operationalize analytics on a single machine (One-
box)
7/31/2018 • 5 minutes to read • Edit Online
Applies to: Machine Learning Server 9.3 For older versions: ML Server 9.2.1 | R Server 9.x
You can configure Microsoft Learning Server after installation to act as a deployment server and to host analytic
web services for operationalization. Machine Learning Server offers two types of configuration for
operationalizing analytics and remote execution: One-box and Enterprise. This article describes the one-box
configuration. For more on enterprise configurations, see here.
A one-box configuration, as the name suggests, involves a single web node and compute node run on a single
machine along with a database. Set-up is a breeze. This configuration is useful when you want to explore what it
is to operationalize R and Python analytics using Machine Learning Server. It is perfect for testing, proof-of-
concepts, and small-scale prototyping, but might not be appropriate for production usage.
How to configure
IMPORTANT
You can create a ready-to-use server with just a few clicks using Azure Marketplace VM Machine Learning Server
Operationalization. Navigate to the virtual machine listing on Azure portal, select the Create button at the bottom,
provide necessary inputs to create the Operationalization Server.
Azure Resource Management templates are also provided in GitHub. This blog post provides more information.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
3. If on Linux and using the IPTABLES firewall or equivalent service, then use the iptables command (or
the equivalent) to open port 12800 to the public IP of the web node so that remote machines can access
it.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
You are now ready to begin operationalizing your R and Python analytics with Machine Learning Server.
How to upgrade
Carefully review the following steps.
1. Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade
process.
2. R Server 9.x users only: If you used the default SQLite database, deployrdb_9.0.0.db or
deployrdb_9.1.0.db in R Server and want to persist the data, then you must back up the SQLite
database before uninstalling Microsoft R Server. Make a copy of the database file and put it outside
of the Microsoft R Server directory structure.
(If you are using a SQL Server or PostgreSQL database, you can skip this step.)
WARNING
If you skip this SQLite database backup step, your database data will be lost.
3. Uninstall the old version. The uninstall process stashes away a copy of your configuration files for a
seamlessly upgrade to Machine Learning Server 9.3.
For Machine Learning Server 9.2.1, read these instructions: Windows | Linux.
For Microsoft R Server 9.x, read this Uninstall Microsoft R Server to upgrade to a newer version.
4. If you are using a SQL Server or PostgreSQL database, you can skip this step. If you backed up a SQLite
database in Step 1, manually move the .db file under this directory so it can be found during the upgrade:
Windows: C:\Users\Default\AppData\Local\DeployR\current\frontend
Linux: /etc/deployr/current/frontend
5. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for
this configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program
Files\Microsoft SQL Server\140).
6. In a command line window or terminal that was launched with administrator (Windows) or root/sudo
(Linux) privileges, run CLI commands to:
Set up a web node and compute node on the same machine.
Define a password for the default 'admin' account. Replace with a password of your choice. The admin
password must be 8-16 characters long and contain 1+ uppercase character, 1+ lowercase character,
1+ one number, and 1+ special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .
Authenticate with Machine Learning Server.
Test the configuration.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
7. If on Linux and using the IPTABLES firewall or equivalent service, then use the iptables command (or
the equivalent) to open port 12800 to the public IP of the web node so that remote machines can access
it.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
You are now ready to begin operationalizing your R and Python analytics with Machine Learning Server.
WARNING
The entities created by users, specifically web services, and snapshots, are tied to their usernames. For this reason, you
must be careful to prevent changes to the user identifier over time. Otherwise, pre-existing web services and snapshots
cannot be mapped to the users who created them. For this reason, we strongly recommend that you DO NOT change the
unique LDAP identifier in appsettings.json once users start publishing service or creating snapshots.
Configure Machine Learning Server 9.2.1 to
operationalize analytics (One-box)
4/13/2018 • 4 minutes to read • Edit Online
Applies to: Machine Learning Server 9.2.1 (See instructions for latest release.)
You can configure Microsoft Learning Server after installation to act as a deployment server and to host analytic
web services for operationalization. Machine Learning Server offers two types of configuration for
operationalizing analytics and remote execution: One-box and Enterprise. This article describes the one-box
configuration. For more on enterprise configurations, see here.
A one-box configuration, as the name suggests, involves a single web node and compute node run on a single
machine along with a database. Set-up is a breeze. This configuration is useful when you want to explore what it is
to operationalize R and Python analytics using Machine Learning Server. It is perfect for testing, proof-of-
concepts, and small-scale prototyping, but might not be appropriate for production usage.
How to configure
IMPORTANT
For a speedy setup in Azure, try one of our Azure Resource Management templates stored in GitHub. This blog post explains
how.
cd /opt/microsoft/mlserver/9.2.1/o16n
sudo dotnet Microsoft.MLServer.Utils.AdminUtil/Microsoft.MLServer.Utils.AdminUtil.dll
NOTE
To bypass the interactive configuration steps, specify the following argument and 'admin' password when launching
the utility: -silentoneboxinstall myPassword. If you choose this method, you can skip the next three substeps. Learn
more about command-line switches for this script, here.
IMPORTANT
Do not choose the suboptions Configure a web node or Configure a compute node unless you intend to have
them on separate machines. This multi-machine configuration is described as an Enterprise configuration.
5. When prompted, provide a password for the built-in, local operationalization administrator account called
'admin'.
6. Return to the main menu of the utility when the configuration ends.
7. Run a diagnostic test of the configuration.
8. If on Linux and using the IPTABLES firewall or equivalent service, then use the iptables command (or the
equivalent) to open port 12800 to the public IP of the web node so that remote machines can access it.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
You are now ready to begin operationalizing your R analytics with Machine Learning Server.
How to upgrade
Carefully review the following steps.
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. If you used the default SQLite database, deployrdb_9.0.0.db or deployrdb_9.1.0.db in R Server and want
to persist the data, then you must back up the SQLite database before uninstalling Microsoft R
Server. Make a copy of the database file and put it outside of the Microsoft R Server directory structure.
(If you are using a SQL Server or PostgreSQL database, you can skip this step.)
WARNING
If you skip this SQLite database backup step and uninstall Microsoft R Server 9.x first, you cannot retrieve your
database data.
2. Uninstall Microsoft R Server 9.0 or 9.1 using the instructions in the article Uninstall Microsoft R Server to
upgrade to a newer version. The uninstall process stashes away a copy of your 9.0 or 9.1 configuration files
under this directory so you can seamlessly upgrade to Machine Learning Server 9.2.1 in the next step:
Windows: C:\Users\Default\AppData\Local\DeployR\current
Linux: /etc/deployr/current
3. If you backed up a SQLite database in Step 1, manually move the .db file under this directory so it can be
found during the upgrade:
Windows: C:\Users\Default\AppData\Local\DeployR\current\frontend
Linux: /etc/deployr/current/frontend
(If you are using a SQL Server or PostgreSQL database, you can skip this step.)
4. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 1.1 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft
SQL Server\140).
Linux instructions: Installation steps | Offline steps
5. Launch the administration utility with administrator/root/sudo privileges. The utility checks to see if any
configuration files from past releases are present under the current folder mentioned previously.
Windows instructions: launch the administration utility AS AN ADMINISTRATOR (right-click) using
the shortcut in the Start menu called Administration Utility.
Linux instructions:
cd /opt/microsoft/mlserver/9.2.1/o16n
sudo dotnet Microsoft.MLServer.Utils.AdminUtil/Microsoft.MLServer.Utils.AdminUtil.dll
6. From the menus, choose Configure server and then choose Configure for one box. The configuration
script begins.
7. When the script asks you if you'd like to upgrade, enter y . The nodes are automatically set up using the
configuration you had for R Server 9.x. Note: You can safely ignore the Python warning during upgrade.
8. From the main menu, choose the option to Run Diagnostic Tests to test the configuration.
9. Exit the utility. Your web and compute nodes are now upgraded and configured as they were in version 9.0.
WARNING
The entities created by users, specifically web services, and snapshots, are tied to their usernames. For this reason, you must
be careful to prevent changes to the user identifier over time. Otherwise, pre-existing web services and snapshots cannot be
mapped to the users who created them. For this reason, we strongly recommend that you DO NOT change the unique
LDAP identifier in appsettings.json once users start publishing service or creating snapshots.
Configuring R Server to operationalize analytics
with a one-box configuration
6/18/2018 • 6 minutes to read • Edit Online
Applies to: Microsoft R Server 9.x (Looking for the Machine Learning Server article)
To benefit from Microsoft R Server’s deployment and operationalization features, you can configure R Server
after installation to act as a deployment server and host analytic web services.
2. Enterprise configuration: a configuration where multiple nodes are configured on multiple machines
along with other enterprise features. This configuration can be scaled up or down by adding or removing
nodes. Learn more about this setup in the enterprise configuration article.
For added security, you can configure SSL and authenticate against Active Directory (LDAP ) or Azure Active
Directory.
Supported platforms
The web nodes and compute nodes are supported on:
Windows Server 2012 R2, Windows Server 2016
Ubuntu 14.04, Ubuntu 16.04,
CentOS/RHEL 7.x
IMPORTANT
Before you begin, back up the appsettings.json file on each node you can restore in the event of an upgrade issue.
1. If you used the default SQLite database, deployrdb_9.0.0.db in R Server 9.0 and want to persist the data,
then you must back up the SQLite database before uninstalling Microsoft R Server. Make a copy
of the database file and put it outside of the Microsoft R Server directory structure.
(If you are using a SQL Server or PostgreSQL database, you can skip this step.)
WARNING
If you skip this SQLite database backup step and uninstall Microsoft R Server 9.0 first, you cannot retrieve your
database data.
2. Uninstall Microsoft R Server 9.0 using the instructions in the article Uninstall Microsoft R Server to
upgrade to a newer version. The uninstall process stashes away a copy of your 9.0 configuration files
under this directory so you can seamlessly upgrade to R Server 9.1 in the next step:
On Windows: C:\Users\Default\AppData\Local\DeployR\current
On Linux: /etc/deployr/current
3. If you backed up a SQLite database in Step 1, manually move deployrdb_9.0.0.db under this directory
so it can be found during the upgrade:
Windows: C:\Users\Default\AppData\Local\DeployR\current\frontend
Linux: /etc/deployr/current/frontend
(If you are using a SQL Server or PostgreSQL database, you can skip this step.)
4. Install Microsoft R Server:
On Windows: follow these instructions Installation steps | Offline steps
IMPORTANT
For SQL Server Machine Learning Services, you must also:
1. Add a registry key called H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path with a value of the parent
path to the R_SERVER folder (for example, C:\Program Files\Microsoft SQL Server\140 ).
2. Manually install .NET Core 2.0
WARNING
The entities created by users, specifically web services and snapshots, are tied to their usernames. For this reason,
you must be careful to prevent changes to the user identifier over time. Otherwise, pre-existing web services and
snapshots cannot be mapped to the users who created them. For this reason, we strongly recommend that you
DO NOT change the unique LDAP identifier in appsettings.json once users start publishing service or creating
snapshots.
Note: If there are issues with starting the compute node, see here.
2. Launch the administration utility with administrator privileges (Windows) or root / sudo privileges
(Linux) so you can begin to configure a one-box setup.
NOTE
Bypass the interactive configuration steps using the argument -silentoneboxinstall and specifying a
password for the local 'admin' account when you launch the administration utility. If you choose this method, you
can skip the next three substeps. For R Server 9.1 on Windows, for example, the syntax might be:
dotnet Microsoft.RServer.Utils.AdminUtil\Microsoft.RServer.Utils.AdminUtil.dll -
silentoneboxinstall my-password
. Learn about all command line switches for this script, here.
a. Choose the option to Configure server (or in previously releases, Configure R Server for
Operationalization).
b. Choose the option to Configure for one box to set up the web node and compute node onto the
same machine.
IMPORTANT
Do not choose the suboptions Configure a web node or Configure a compute node unless you
intend to have them on separate machines. This multi-machine configuration is described as an
Enterprise configuration.
c. When prompted, provide a password for the built-in, local operationalization administrator
account called 'admin'.
d. Return to the main menu of the utility when the configuration ends.
e. Run a diagnostic test of the configuration.
3. If on Linux and using the IPTABLES firewall or equivalent service, then use the iptables command (or
the equivalent) to open port 12800 to the public IP of the web node so that remote machines can access
it.
IMPORTANT
R Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your application to
the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
You are now ready to begin operationalizing your R analytics with R Server.
Configure Machine Learning Server 9.3 to
operationalize analytics (Enterprise)
7/31/2018 • 9 minutes to read • Edit Online
Applies to: Machine Learning Server 9.3 For older versions: ML Server 9.2.1 | R Server 9.x
You can configure Microsoft Learning Server after installation to act as a deployment server and to host analytic
web services for operationalization. Machine Learning Server offers two types of configuration for operationalizing
analytics and remote execution: One-box and Enterprise. This article describes the enterprise configuration. For
more on one-box configurations, see here.
An enterprise configuration involves multiple web and compute nodes that are configured on multiple machines
along with other enterprise features. These nodes can be scaled independently. Scaling out web nodes enables an
active-active configuration that allows you to load balance the incoming API requests. Additionally, with multiple
web nodes, you must use a SQL Server or PostgreSQL database to share data and web services across web node
services. The web nodes are stateless therefore there is no need for session stickiness if you use a load balancer.
For added security, you can configure SSL and authenticate against Active Directory (LDAP ) or Azure Active
Directory in this configuration.
How to configure
IMPORTANT
For a speedy setup in Azure, try one of our Azure Resource Management templates stored in GitHub. This blog post explains
how.
1. Configure a database
While the web node configuration sets up a local SQLite database by default, you must use a SQL Server or
PostgreSQL database if any of the following situations apply:
You intend to set up multiple web nodes (so data can be shared across web nodes)
You want to achieve higher availability
You need a remote database for your web node
To configure that database, follow these instructions.
WARNING
Configure your database now before moving on. If you configure a different database later, all data in the current database is
lost.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
3. If you plan to configure SSL/TLS and install the necessary certificates on the compute node, do so now.
4. Open the port 12805 on every compute node. If you plan to configure SSL/TLS, do so BEFORE opening this
port.
On Windows: Add a firewall exception to open the port number.
On Linux: Use 'iptables' or the equivalent command to open the port number.
You can now repeat these steps for each compute node you want to add.
3. Configure web nodes
In an enterprise configuration, you can set up one or more web nodes. It is possible to run the web node service
from within IIS.
1. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the parent
path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft SQL
Server\140).
2. In a command line window or terminal launched with administrator (Windows) or root/sudo (Linux)
privileges, run CLI commands to:
Set up the web node.
Define a password for the default 'admin' account. Replace with a password of your choice. The admin
password must be 8-16 characters long and contain 1+ uppercase character, 1+ lowercase character, 1+
one number, and 1+ special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .
Declare the IP address of each compute node. Separate each URI with a comma. For multiple compute
nodes, separate each URI with a comma. The following example shows a single URI and a range of IPs
(1.0.1.1, 1.0.1.2, 1.0.2.1, 1.0.2.2, 1.0.3.1, 1.0.3.2):
--uri http://1.1.1.1:12805,http://1.0.1-3.1-2:12805
3. In the same CLI, test the configuration. Learn more about diagnostic tests. For the full test of the
configuration, enter the following in the CLI:
4. If you plan on configuring SSL/TLS and install the necessary certificates on the compute node, do so now.
5. Open the port 12800 on every web node. If you plan to configure SSL/TLS, you must do so BEFORE
opening this port.
On Windows: Add a firewall exception to open the port number.
On Linux: Use 'iptables' or the equivalent command to open the port number.
You can now repeat these steps for each web node you want to add.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
4. Setup enterprise -grade security
In production environments, we strongly recommend the following approaches:
1. Configure SSL/TLS and install the necessary certificates.
2. Authenticate against Active Directory (LDAP ) or Azure Active Directory.
3. For added security, restrict the list of IPs that can access the machine hosting the compute node.
Important! For proper access token signing and verification across your configuration, ensure that the JWT
certificate settings are exactly the same for every web node. These JWT settings are defined on each web node in
the configuration file, appsetting.json. Learn more...
5. Provision on the cloud
If you are provisioning on a cloud service, then you must also create inbound security rule for port 12800 in Azure
or open the port through the AWS console. This endpoint allows clients to communicate with the Machine
Learning Server's operationalization server.
6. Set up a load balancer
You can set up the load balancer of your choosing. Keep in mind that web nodes are stateless. Therefore, session
persistence ("stickiness") is NOT required.
7. Post configuration steps
1. Update service ports , if needed.
2. Using the CLI, you can test the configuration. Learn more about diagnostic tests. For the full test of the
configuration, enter the following in the CLI:
# Run test
az ml admin diagnostic run
How to upgrade
To replace an older version, you can uninstall the older distribution before installing the new version (there is no in-
place upgrade).
Carefully review the steps in the following sections.
Upgrade a compute node
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. Uninstall the old version. The uninstall process stashes away a copy of your configuration files for a
seamlessly upgrade to Machine Learning Server 9.3.
For Machine Learning Server 9.2.1, read these instructions: Windows | Linux.
For Microsoft R Server 9.x, read this Uninstall Microsoft R Server to upgrade to a newer version.
2. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the parent
path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft SQL
Server\140).
3. In a command line window or terminal launched with administrator (Windows) or root/sudo (Linux)
privileges, run CLI commands to configure a compute node.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
You can now repeat these steps for each compute node.
Upgrade a web node
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. Uninstall the old version. The uninstall process stashes away a copy of your configuration files for a
seamlessly upgrade to Machine Learning Server 9.3.
For Machine Learning Server 9.2.1, read these instructions: Windows | Linux.
For Microsoft R Server 9.x, read this Uninstall Microsoft R Server to upgrade to a newer version.
2. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the parent
path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft SQL
Server\140).
3. In a command line window or terminal launched with administrator (Windows) or root/sudo (Linux)
privileges, run CLI commands to:
Set up the web node.
Define a password for the default 'admin' account. Replace with a password of your choice. The admin
password must be 8-16 characters long and contain 1+ uppercase character, 1+ lowercase character, 1+
one number, and 1+ special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .
Declare the IP address of each compute node. Separate each URI with a comma. For multiple compute
nodes, separate each URI with a comma. The following example shows a single URI and a range of IPs
(1.0.1.1, 1.0.1.2, 1.0.2.1, 1.0.2.2, 1.0.3.1, 1.0.3.2):
--uri http://1.1.1.1:12805, http://1.0.1-3.1-2:12805
az ml admin node setup --webnode --admin-password <Password> --confirm-password <Password> --uri <URI1>,
<URI2>
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
Applies to: Machine Learning Server 9.3 For older versions: ML Server 9.2.1 | R Server 9.x
You can configure Microsoft Learning Server after installation to act as a deployment server and to host
analytic web services for operationalization. Machine Learning Server offers two types of configuration for
operationalizing analytics and remote execution: One-box and Enterprise. This article describes the enterprise
configuration. For more on one-box configurations, see here.
An enterprise configuration involves multiple web and compute nodes that are configured on multiple
machines along with other enterprise features. These nodes can be scaled independently. Scaling out web
nodes enables an active-active configuration that allows you to load balance the incoming API requests.
Additionally, with multiple web nodes, you must use a SQL Server or PostgreSQL database to share data and
web services across web node services. The web nodes are stateless therefore there is no need for session
stickiness if you use a load balancer.
For added security, you can configure SSL and authenticate against Active Directory (LDAP ) or Azure Active
Directory in this configuration.
How to configure
IMPORTANT
For a speedy setup in Azure, try one of our Azure Resource Management templates stored in GitHub. This blog post
explains how.
1. Configure a database
While the web node configuration sets up a local SQLite database by default, you must use a SQL Server or
PostgreSQL database if any of the following situations apply:
You intend to set up multiple web nodes (so data can be shared across web nodes)
You want to achieve higher availability
You need a remote database for your web node
To configure that database, follow these instructions.
WARNING
Configure your database now before moving on. If you configure a different database later, all data in the current
database is lost.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
3. If you plan to configure SSL/TLS and install the necessary certificates on the compute node, do so now.
4. Open the port 12805 on every compute node. If you plan to configure SSL/TLS, do so BEFORE opening
this port.
On Windows: Add a firewall exception to open the port number.
On Linux: Use 'iptables' or the equivalent command to open the port number.
You can now repeat these steps for each compute node you want to add.
3. Configure web nodes
In an enterprise configuration, you can set up one or more web nodes. It is possible to run the web node service
from within IIS.
1. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for
this configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add
a registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program
Files\Microsoft SQL Server\140).
2. In a command line window or terminal launched with administrator (Windows) or root/sudo (Linux)
privileges, run CLI commands to:
Set up the web node.
Define a password for the default 'admin' account. Replace with a password of your choice. The
admin password must be 8-16 characters long and contain 1+ uppercase character, 1+ lowercase
character, 1+ one number, and 1+ special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .
Declare the IP address of each compute node. Separate each URI with a comma. For multiple
compute nodes, separate each URI with a comma. The following example shows a single URI and a
range of IPs (1.0.1.1, 1.0.1.2, 1.0.2.1, 1.0.2.2, 1.0.3.1, 1.0.3.2):
--uri http://1.1.1.1:12805,http://1.0.1-3.1-2:12805
3. In the same CLI, test the configuration. Learn more about diagnostic tests. For the full test of the
configuration, enter the following in the CLI:
4. If you plan on configuring SSL/TLS and install the necessary certificates on the compute node, do so
now.
5. Open the port 12800 on every web node. If you plan to configure SSL/TLS, you must do so BEFORE
opening this port.
On Windows: Add a firewall exception to open the port number.
On Linux: Use 'iptables' or the equivalent command to open the port number.
You can now repeat these steps for each web node you want to add.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose
your application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
# Run test
az ml admin diagnostic run
How to upgrade
To replace an older version, you can uninstall the older distribution before installing the new version (there is no
in-place upgrade).
Carefully review the steps in the following sections.
Upgrade a compute node
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. Uninstall the old version. The uninstall process stashes away a copy of your configuration files for a
seamlessly upgrade to Machine Learning Server 9.3.
For Machine Learning Server 9.2.1, read these instructions: Windows | Linux.
For Microsoft R Server 9.x, read this Uninstall Microsoft R Server to upgrade to a newer version.
2. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for
this configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add
a registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program
Files\Microsoft SQL Server\140).
3. In a command line window or terminal launched with administrator (Windows) or root/sudo (Linux)
privileges, run CLI commands to configure a compute node.
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
You can now repeat these steps for each compute node.
Upgrade a web node
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. Uninstall the old version. The uninstall process stashes away a copy of your configuration files for a
seamlessly upgrade to Machine Learning Server 9.3.
For Machine Learning Server 9.2.1, read these instructions: Windows | Linux.
For Microsoft R Server 9.x, read this Uninstall Microsoft R Server to upgrade to a newer version.
2. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for
this configuration.
Linux instructions: Installation steps | Offline steps
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 2.0 and add
a registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program
Files\Microsoft SQL Server\140).
3. In a command line window or terminal launched with administrator (Windows) or root/sudo (Linux)
privileges, run CLI commands to:
Set up the web node.
Define a password for the default 'admin' account. Replace with a password of your choice. The
admin password must be 8-16 characters long and contain 1+ uppercase character, 1+ lowercase
character, 1+ one number, and 1+ special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .
Declare the IP address of each compute node. Separate each URI with a comma. For multiple
compute nodes, separate each URI with a comma. The following example shows a single URI and a
range of IPs (1.0.1.1, 1.0.1.2, 1.0.2.1, 1.0.2.2, 1.0.3.1, 1.0.3.2):
--uri http://1.1.1.1:12805, http://1.0.1-3.1-2:12805
You can always configure the server to authenticate against Active Directory (LDAP ) or Azure Active
Directory later.
If you need help with CLI commands, run the command but add --help to the end.
Applies to: Machine Learning Server 9.2.1 (See instructions for latest release.)
You can configure Microsoft Learning Server after installation to act as a deployment server and to host analytic
web services for operationalization. Machine Learning Server offers two types of configuration for
operationalizing analytics and remote execution: One-box and Enterprise. This article describes the enterprise
configuration. For more on one-box configurations, see here.
An enterprise configuration involves multiple web and compute nodes that are configured on multiple machines
along with other enterprise features. These nodes can be scaled independently. Scaling out web nodes enables an
active-active configuration that allows you to load balance the incoming API requests. Additionally, with multiple
web nodes, you must use a SQL Server or PostgreSQL database to share data and web services across web node
services. The web nodes are stateless therefore there is no need for session stickiness if you use a load balancer.
For added security, you can configure SSL and authenticate against Active Directory (LDAP ) or Azure Active
Directory in this configuration.
How to configure
IMPORTANT
For a speedy setup in Azure, try one of our Azure Resource Management templates stored in GitHub. This blog post explains
how.
1. Configure a database
While the web node configuration sets up a local SQLite database by default, you must use a SQL Server or
PostgreSQL database for this configuration for any of the following situations:
Have multiple web nodes (so data can be shared across web nodes)
Want to achieve higher availability
Need a remote database for your web node
To configure that database, follow these instructions.
WARNING
Choose and configure your database now. If you configure a different database later, all data in your current database is lost.
NOTE
In the Enterprise configuration, side-by-side installations of a web and compute node are not supported.
1. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 1.1 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft
SQL Server\140).
Linux instructions: Installation steps | Offline steps
2. Launch the administration utility with administrator privileges.
3. From the main utility menu, choose Configure server and then choose Configure a compute node from
the submenu.
4. If you plan on configuring SSL/TLS and install the necessary certificates on the compute node, do so now.
5. Open the port 12805 on every compute node. If you plan to configure SSL/TLS, you must do so BEFORE
opening this port.
On Windows: Add a firewall exception to open the port number.
On Linux: Use 'iptables' or the equivalent command to open the port number.
You can now repeat these steps for each compute node you want to add.
3. Configure web nodes
In an enterprise configuration, you can set up one or more web nodes. It is possible to run the web node service
from within IIS.
1. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 1.1 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft
SQL Server\140).
Linux instructions: Installation steps | Offline steps
2. Launch the administration utility with administrator privileges to configure a web node:
NOTE
Bypass these interactive steps to install the node and set an admin password using these command-line switches: -
silentwebnodeinstall mypassword uri1,uri2 Learn more about command-line switches for this utility here.
a. From the main menu, choose Configure server. Then, choose Configure a web node from the
submenu.
b. When prompted, provide a password for the built-in, local operationalization administrator account
called 'admin'. Later, you can configure the server to authenticate against Active Directory (LDAP ) or
Azure Active Directory.
c. When prompted, enter the IP address of each compute node you configured. You can specify a
specific URI or specify IP ranges. For multiple compute nodes, separate each URI with a comma.
For example: http://1.1.1.1:12805, http://1.0.1-3.1-2:12805
In this example, the range represents six IP values: 1.0.1.1, 1.0.1.2, 1.0.2.1, 1.0.2.2, 1.0.3.1, 1.0.3.2.
d. Return the main menu of the utility.
IMPORTANT
When configuring your web node, you might see the following message: "Web Node was not able to start because it
is not configured." Typically, this is not really an issue since the web node is automatically restarted within 5 minutes
by an auto-recovery mechanism.
3. In the same utility, test the configuration. From the main utility menu, choose Run Diagnostic Tests and
choose a diagnostic test.
4. Exit the utility.
5. If you plan on configuring SSL/TLS and install the necessary certificates on the compute node, do so now.
6. Open the port 12800 on every web node. If you plan to configure SSL/TLS, you must do so BEFORE
opening this port.
On Windows: Add a firewall exception to open the port number.
On Linux: Use 'iptables' or the equivalent command to open the port number.
You can now repeat these steps for each web node you want to add.
IMPORTANT
Machine Learning Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your
application to the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
How to upgrade
To replace an older version, you can uninstall the older distribution before installing the new version (there is no
in-place upgrade).
Carefully review the steps in the following sections.
Upgrade a compute node
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. Uninstall Microsoft R Server 9.0 or 9.1 using the instructions in the article Uninstall Microsoft R Server to
upgrade to a newer version. The uninstall process stashes away a copy of your 9.0 or 9.1 configuration files
under this directory so you can seamlessly upgrade to Machine Learning Server 9.2.1 in the next step:
Windows: C:\Users\Default\AppData\Local\DeployR\current
Linux: /etc/deployr/current
2. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 1.1 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft
SQL Server\140).
Linux instructions: Installation steps | Offline steps
3. Launch the administration utility with administrator/root/sudo privileges. The utility checks to see if any
configuration files from past releases are present under the current folder mentioned previously.
4. Choose Configure server from the menu and then Configure a compute node from the submenu.
5. When the script asks you if you want to upgrade, enter y . The node is automatically set up using the
configuration you had for R Server 9.0 or 9.1.
You can now repeat these steps for each compute node.
Upgrade a web node
IMPORTANT
Before you begin, back up the appsettings.json file on each node in case of an issue during the upgrade process.
1. Uninstall Microsoft R Server 9.0 or 9.1 using the instructions in the article Uninstall Microsoft R Server to
upgrade to a newer version. The uninstall process stashes away a copy of your 9.0 or 9.1 configuration files
under this directory so you can seamlessly upgrade to Machine Learning Server 9.2.1 in the next step:
Windows: C:\Users\Default\AppData\Local\DeployR\current
Linux: /etc/deployr/current
2. Install Machine Learning Server and its dependencies as follows. Learn about supported platforms for this
configuration.
Windows instructions: Installation steps | Offline steps
For SQL Server Machine Learning Services, you must also manually install .NET Core 1.1 and add a
registry key called 'H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path' with a value of the
parent path to the R_SERVER or PYTHON_SERVER folder (for example, C:\Program Files\Microsoft
SQL Server\140).
Linux instructions: Installation steps | Offline steps
3. Launch the administration utility with administrator/root/sudo privileges. The utility checks to see if any
configuration files from past releases are present under the current folder mentioned previously.
4. Choose Configure server from the menu and then Configure a web node from the submenu.
5. When the script asks you if you'd like to upgrade, enter y . The node is automatically set up using the
configuration you had for R Server 9.0 or 9.1.
6. From the main menu, choose the option to Run Diagnostic Tests to test the configuration.
You can now repeat these steps for each node.
Configure R Server to operationalize analytics
(Enterprise)
6/18/2018 • 11 minutes to read • Edit Online
Applies to: Microsoft R Server 9.x (Looking for the Machine Learning Server article)
This article explains how to configure R Server after installation to act as a deployment server and to host
analytic web services for operationalization. This article describes how to perform an enterprise configuration of
these features.
With an enterprise configuration, you can work with your production-grade data within a scalable, multi-
machine setup, and benefit from enterprise-grade security.
Enterprise architecture
This configuration includes one or more web nodes, one or more compute nodes, and a database.
Web nodes act as HTTP REST endpoints with which users can interact directly to make API calls. These
nodes also access the data in the database and send requests to the compute node for processing. Web
nodes are stateless, and therefore, session persistence ("stickiness") is not required. A single web node can
route multiple requests simultaneously. However, you must have multiple web nodes to load balance your
requests across multiple compute nodes.
Compute nodes are used to execute R code as a session or service. Each compute node has its own pool
of R shells and can therefore execute multiple requests at the same time. Scaling up compute nodes
enables you to have more R execution shells and benefit from load balancing across these compute
nodes.
The database. While an SQLite 3.7+ database is installed by default, we strongly recommend that you set
up a SQL Server (Windows) or PostgreSQL (Linux) database instead.
In an enterprise configuration, these nodes can be scaled independently. Scaling up web nodes enables an active-
active configuration that allows you to load balance the incoming API requests. Additionally, if you have multiple
web nodes, you must use a SQL Server or PostgreSQL database to share data and web services across web
node services.
For added security, you can configure SSL and authenticate against Active Directory (LDAP ) or Azure Active
Directory.
Another configuration, referred to as "one-box", consists of a single web node and a single compute node
installed on the same machine. Learn more about this configuration, here.
Supported platforms
The web nodes and compute nodes are supported on:
Windows Server 2012 R2, Windows Server 2016
Ubuntu 14.04, Ubuntu 16.04,
CentOS/RHEL 7.x
How to upgrade
To replace an older version, you can uninstall the older distribution before installing the new version (there is no
in-place upgrade). Carefully review the following steps:
Upgrade a compute node
IMPORTANT
Before you begin, back up the appsettings.json file on each node. You can use this backup if there is an issue during the
upgrade.
1. Uninstall Microsoft R Server 9.0 using the instructions in the article Uninstall Microsoft R Server to
upgrade to a newer version. The uninstall process stashes away a copy of your 9.0 configuration files
under this directory so you can seamlessly upgrade to R Server 9.1 in the next step:
On Windows: C:\Users\Default\AppData\Local\DeployR\current
On Linux: /etc/deployr/current
IMPORTANT
Before you begin, back up the appsettings.json file on each node. You can use this backup if there is an issue during the
upgrade.
1. Uninstall Microsoft R Server 9.0 using the instructions in the article Uninstall Microsoft R Server to
upgrade to a newer version. The uninstall process stashes away a copy of your 9.0 configuration files
under this directory so you can seamlessly upgrade to R Server 9.1 in the next step:
On Windows: C:\Users\Default\AppData\Local\DeployR\current
On Linux: /etc/deployr/current
IMPORTANT
For SQL Server Machine Learning Services, manually install .NET Core 2.0 and add a registry key called
H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path with a value of the parent path to the R_SERVER folder,
such as C:\Program Files\Microsoft SQL Server\140 .
1. Configure a database
By default, the web node configuration sets up a local SQLite database. We strongly recommend that you use a
SQL Server or PostgreSQL database for this configuration to achieve higher availability. In fact, you cannot use
SQLite database at all if you have multiple web nodes or need a remote database.
To configure that database, follow these instructions.
If you intend to configure multiple web nodes, then you must set up a SQL Server or PostgreSQL database so
that data can be shared across web node services.
WARNING
Choose and configure your database now. If you configure a different database later, all data in your current database is
lost.
NOTE
Side-by-side installations of R Server web nodes and compute nodes are not supported.
IMPORTANT
We highly recommend that you configure each node (compute or web) on its own machine for higher availability.
On Linux
Follow these instructions: R Server installation steps | Offline steps
Additional dependencies for R Server on Linux 9.0.1. If you have installed R Server 9.0.1 on Linux, you
must add a few symlinks:
R SERVER 9.0.1
LINUX CENTOS 7.X UBUNTU 14.04 UBUNTU 16.04
Note: If there are issues with starting the compute node, see here.
NOTE
You can bypass the interactive configuration steps of the node using the argument -silentcomputenodeinstall
when launching the administration utility. If you choose this method, you can skip the next two steps. For R Server
9.1 on Windows, for example, the syntax might be:
dotnet Microsoft.RServer.Utils.AdminUtil\Microsoft.RServer.Utils.AdminUtil.dll -
silentcomputenodeinstall
. Learn about all command-line switches for this script, here.
3. From the main menu, choose the option to Configure R Server for Operationalization.
4. From the submenu, choose the option to Configure a compute node.
5. When the configuration utility is finished, open port 12805:
On Windows: Add an exception to your firewall to open port 12805. And, for additional security,
you can also restrict communication for a private network or domain using a profile.
On Linux: If using IPTABLES or equivalent firewall service on Linux, then open port 12805 using
iptables or the equivalent command.
6. From the main utility menu, choose the option Stop and start services and restart the compute node to
define it as a service.
The compute node is now configured. Repeat these steps for each compute node you want to add.
3. Configure web nodes
In an enterprise configuration, you can set up one or more web nodes. Note that it is possible to run the web
node service from within IIS.
IMPORTANT
We highly recommend that you configure each node (compute or web) on its own machine for higher availability.
1. On each machine, install the same R Server version you installed on the compute node.
On Windows: follow these instructions Installation steps | Offline steps
IMPORTANT
For SQL Server Machine Learning Services, you must also:
1. Manually install .NET Core 2.0.
2. Add a registry key called H_KEY_LOCAL_MACHINE\SOFTWARE\R Server\Path with a value of the parent
path to the R_SERVER folder (for example, C:\Program Files\Microsoft SQL Server\140 ).
For example, both of the following snippets result in the same specification of four compute
nodes:
"Uris": {
"Values": [
“http://10.1.1.1:12805”,
“http://10.0.0.1:12805”,
“http://10.0.0.2:12805”,
“http://10.0.0.3:12805”
]
}
"Uris": {
"Values": [“http://10.1.1.1:12805”],
"Ranges": [“http://10.0.0.1-3:12805”]
}
In R Server 9.0, you must specify the Uri for each compute node individually using the
Values property. For example, this snippet results in four compute nodes:
"Uris": {
"Values": [
“http://10.1.1.1:12805”,
“http://10.0.0.1:12805”,
“http://10.0.0.2:12805”,
“http://10.0.0.3:12805”
]
}
Do not update any other properties in this file at this point. These other properties are updated
during the compute node configuration.
NOTE
You can bypass the interactive configuration steps of the node using the argument -silentwebnodeinstall and
by defining a password for the local 'admin' account when you launch the administration utility. If you choose this
method, you can skip the next three steps. For R Server 9.1 on Windows, for example, the syntax might be:
dotnet Microsoft.RServer.Utils.AdminUtil\Microsoft.RServer.Utils.AdminUtil.dll -
silentwebnodeinstall my-password
. Learn about all command-line switches for this script, here.
a. From the main menu, choose the option to Configure R Server for Operationalization.
b. From the submenu, choose the option to Configure a web node.
c. When prompted, provide a password for the built-in, local operationalization administrator account
called 'admin'. Later, you can configure R Server to authenticate against Active Directory (LDAP ) or
Azure Active Directory.
d. From the main menu, choose the option to Run Diagnostic Tests. Verify the configuration by
running diagnostic test on each web node.
e. From the main utility menu, choose the option Stop and start services and restart the web node
to define it as a service.
f. Exit the utility.
4. For IPTABLES firewall or equivalent service on Linux, allow remote machines to access the web node's
public IP using iptables (or the equivalent command) to open port 12800.
Your web node is now configured. Repeat these steps for each web node you want to add.
IMPORTANT
R Server uses Kestrel as the web server for its operationalization web nodes. Therefore, if you expose your application to
the Internet, we recommend that you review the guidelines for Kestrel regarding reverse proxy setup.
IMPORTANT
You do not need an Azure subscription to use this CLI.
This CLI is installed with Machine Learning Server and runs locally.
1. Launch a DOS command line, powershell window, or terminal window with administrator
privileges.
2. Call the help function to verify that Administration CLI is working properly. At the commmand
prompt, enter:
You must first set up your nodes before running any other admin extension commands in the CLI. For a
speedy setup of a one-box configuration, use az ml admin bootstrap .
NOTE
If the default powershell execution policy for your organization is "Restricted", the shortcut may not work.
To get around this issue, either change the execution policy to "Unrestricted", or run the following in a
command-line window with administrator privileges:
cd C:\Program Files\Microsoft\ML Server\R_SERVER\o16n
dotnet Microsoft.MLServer.Utils.AdminUtil\Microsoft.MLServer.Utils.AdminUtil.dll
cd /opt/microsoft/mlserver/9.2.1/o16n
sudo dotnet Microsoft.MLServer.Utils.AdminUtil/Microsoft.MLServer.Utils.AdminUtil.dll
NOTE
If the default powershell execution policy for your organization is "Restricted", the shortcut may not work.
To get around this issue, either change the execution policy to "Unrestricted", or run the following in a
command-line window with administrator privileges:
cd <r-home>\deployr
dotnet Microsoft.RServer.Utils.AdminUtil\Microsoft.RServer.Utils.AdminUtil.dll
Find r-home by running normalizePath(R.home()) in the R console.
cd /usr/lib64/microsoft-r/rserver/o16n/9.1.0/
sudo dotnet Microsoft.RServer.Utils.AdminUtil/Microsoft.RServer.Utils.AdminUtil.dll
NOTE
If the default powershell execution policy for your organization is "Restricted", the shortcut may not work.
To get around this issue, either change the execution policy to "Unrestricted", or run the following in a
command-line window with administrator privileges:
cd <r-home>\deployr
dotnet Microsoft.DeployR.Utils.AdminUtil\Microsoft.DeployR.Utils.AdminUtil.dll
Find r-home by running normalizePath(R.home()) in the R console.
cd /usr/lib64/microsoft-r/rserver/o16n/9.0.1/
sudo dotnet Microsoft.DeployR.Utils.AdminUtil/Microsoft.DeployR.Utils.AdminUtil.dll
Command-line switches
The following command-line switches are available for the administration utility installed with R Server
9.0 - 9.1 and Machine Learning Server 9.2.1.
-silentinstall myPass123
http://1.1.1.1:12805,http://1.0.1.1-
3:12805
-silentwebnodeinstall myPass123
http://1.1.1.1:12805,http://1.0.1.1-
3:12805
-silentcomputenodeinstall
-setpassword myPass123
SWITCH DESCRIPTION INTRODUCED IN VERSION
-preparedbmigration <web-node-
dir>/appsettings.json
WARNING
If you enable Azure Active Directory or Active Directory/LDAP authentication, this 'admin' account can no longer be
used to authenticate with Machine Learning Server.
WARNING
You cannot have both Azure Active Directory and Active Directory/LDAP enabled at the same time. If one is set to
"Enabled": true , then the other must be set to "Enabled": false .
c. Enable this section and update the properties so that they match the values in your Active
Directory Service Interfaces Editor.
For better security, we recommend you encrypt the password before adding the
information to appsettings.json.
UniqueUserIdentifierAttributeName (Version 9.1) The attribute name that stores the unique
user id for each user. If you are configuring roles, you
must ensure that the username returned for this value
matches the username returned by SearchFilter. For
example, if "SearchFilter": "cn={0}" and
"UniqueUserIdentifierAttributeName":
"userPrincipalName", then the values for cn and
userPrincipalName must match.
DisplayNameAttributeName (Version 9.1) The attribute name that stores the display
name for each user.
EmailAttributeName (Version 9.1) The attribute name that stores the email
address for each user.
IMPORTANT
The entities created by the users, specifically web services and session snapshots, are tied to their usernames.
For this reason, you must be careful to prevent changes to the user identifier over time. Otherwise, pre-existing
web services and snapshots cannot be mapped to the users who created them.
For this reason, we strongly recommend that you DO NOT change the unique LDAP identifier in
appsettings.json once users start publishing service or creating snapshots.
Similarly, if your organization changes its usernames, those users can no longer access the web services and
snapshots they created unless they are assigned to the Owner role.
WARNING
For 9.0.1 Users! The unique identifier is always set to the userPrincipalName in version 9.0.1. Therefore,
make sure that a value is defined for the userPrincipalName in the Active Directory Service Interfaces Editor
or the authentication may fail. In the Explorer, connect to the domain controller, find the user to authorize, and
then make sure that the value for the UserPrincipalName (UPN) property is not null.
"LDAP": {
"Enabled": true,
"Host": "<host_ip>",
"Port": "<port_number>"
"UseLDAPS": "True",
"QueryUserDn": "CN=deployradmin,CN=DeployR,DC=TEST,DC=COM",
"QueryUserPasswordEncrypted": true,
"QueryUserPassword": "ABCD00000123400000000000mnop00000000WXYZ",
"SearchBase": "CN=DeployR,DC=TEST,DC=COM",
"SearchFilter": "cn={0}"
"UniqueUserIdentifierAttributeName": "userPrincipalName",
"DisplayNameAttributeName": "name",
"EmailAttributeName": "mail"
}
NOTE
Need help figuring out your Active Directory/LDAP settings? Check out your LDAP settings using the
ldp.exe tool and compare them to what you’ve declared in appsettings.json. You can also consult with any
Active Directory experts in your organization to identify the correct parameters.
2. To set different levels of permissions for users interacting with web services, assign them roles.
3. If using a certificate for access token signing, you must:
IMPORTANT
You must use a certificate for access token signing whenever you have multiple web nodes so the tokens are
signed consistently by every web node in your configuration.
In production environments, we recommend that you use a certificate with a private key to sign the user
access tokens between the web node and the LDAP server.
Tokens are useful to the application developers who use them to identify and authenticate users who are
sending API calls within their application. Learn more...
Every web node must have the same values.
a. On each machine hosting the Web node, install the trusted, signed access token signing
certificate with a private key in the certificate store. Take note of the Subject name of the
certificate as you need this information later. Read this blog post to learn how to use a self-
signed certificate in Linux for access token signing. Self-signed certificates are NOT
recommended for production usage.
b. In the appsettings.json file, search for the section starting with "JWTSigningCertificate": {
c. Enable this section and update the properties so that they match the values for your token
signing certificate:
"JWTSigningCertificate": {
"Enabled": true,
"StoreName": "My",
"StoreLocation": "CurrentUser",
"SubjectName": "CN=<subject name>"
"Thumbprint": "<certificate-thumbprint>"
}
NOTE
Use "Thumbprint" to ensure that the correct certificate is loaded if there are multiple certificates on
the same system with same name used for different purposes such as IPsec, TLS Web Server
Authentication, Client Authentication, Server Authentication, and so on. If you do not have multiple
certificates with same name, you can leave the Thumbprint field empty.
IMPORTANT
If you run into connection issues when configuring for Active Directory/LDAP, try the ldp.exe tool to search the
LDAP settings and compare them to what you declared in appsettings.json. To identify the correct parameters,
consult with any Active Directory experts in your organization.
4. Select App registrations tab at the top. The application list appears. You may not have any
applications yet.
2. Enter a Name for your application, such as Machine Learning Server Web app .
3. For the Application type, select the Web app / API.
4. In the Sign-on URL box, enter http://localhost:12800. This is the port that R Client and R Server listen
on.
5. Select Create to create the new web application.
IMPORTANT
Take note of this key as it is needed to configure roles to give web services permissions to certain users.
12. Also, take note of the application's tenant ID. The tenant ID is the domain of the Azure Active Directory
account, for example, myMLServer.contoso.com .
4. Enter a Name for your application, such as Machine Learning Server native app .
urn:ietf:wg:oauth:2.0:oob
"AzureActiveDirectory": {
"Enabled": false,
WARNING
You cannot have both Azure Active Directory and Active Directory/LDAP enabled at the same time. If one is set
to "Enabled": true , then the other must be set to "Enabled": false .
3. Enable Azure Active Directory as the authentication method: "Enabled": true,
4. Update the other properties in that section so that they match the values in the Azure portal.
Properties include:
Audience Use the Application ID value for the WEB app you
created in the Azure portal.
ClientId Use the Application ID value for the NATIVE app you
created in the Azure portal.
Key This is the key for the WEB application you took note of
before.
For example:
"AzureActiveDirectory": {
"Enabled": true,
"Authority": "https://login.windows.net/myMLServer.contoso.com",
"Audience": "00000000-0000-0000-0000-000000000000",
"ClientId": "00000000-0000-0000-0000-000000000000",
"Key": "ABCD000000000000000000000000WXYZ",
"KeyEncrypted": true
}
5. To set different levels of permissions for users interacting with web services, assign them roles.
6. Restart the web node for the changes to take effect.
7. Authorize this machine for Azure Active Directory Test by running a diagnostic test of the
configuration.
IMPORTANT
You must run the diagnostic tests once on each web node to authorize this device for Azure Active Directory.
You will not be able to log in using AAD until this has been done.
IMPORTANT
Learn how to authenticate with AAD using the remoteLoginAAD() function in the mrsdeploy R package as described in
this article: "Connecting to Machine Learning Server with mrsdeploy."
See also
Blog article: Step-by-step setup for LDAPS on Windows Server
Enable SSL or TLS for Connection Security in
Machine Learning Server
4/13/2018 • 10 minutes to read • Edit Online
For security reasons, we strongly recommend that SSL/TLS 1.2 be enabled in all production
environments. Since we cannot ship certificates for you, these protocols are disabled by default.
You can use HTTPS within a connection encrypted by SSL/TLS 1.2. To enable SSL/TLS, you need some or
all of these certificates.
Compute node certificate Encrypts the traffic No Yes, with private key
between the web node
and compute node. You
can use a unique
certificate for each
compute node, or you can
use one common Multi-
Domain (SAN) certificate
for all compute nodes.
Note: If a compute node is
inside the web node's trust
boundary, then this
certificate is not needed.
This certificate works for
enterprise setups.
This section walks you through the steps for securing the connections between the client application and the
web node. Doing so encrypts the communication between client and web node to prevent traffic from being
modified or read.
Windows: Using Your Default ASP .NET Core Web Server to Encrypt Traffic
1. On each machine hosting the web node, install and configure the certificate in the certificate store.
For example, if you launch "Manage Computer Certificates" from your Windows Start menu, you can:
a. Install the trusted, signed API HTTPS certificate with a private key in the certificate store.
b. Make sure the name of the certificate matches the domain name of the web node URL.
c. Set the private key permissions.
a. Right click on the certificate and choose Manage private certificate from the menu.
b. Add a group called NETWORK SERVICE and give that group Read access.
d. Take note of the Subject name of the certificate as you need this info later.
2. Open the configuration file, <web-node-install-path>/appsettings.json. You can configure the HTTPS
port for the web node in this file.
3. In that file, search for the section starting with: "Kestrel": {
4. Update and add properties in the Kestrel section to match the values for the API certificate. The
Subject name can be found as a property of your certificate in the certificate store.
{
"Kestrel": {
"Port": 443,
"HttpsEnabled": true,
"HttpsCertificate": {
"Enabled": true,
"StoreName": "My",
"StoreLocation": "LocalMachine",
"SubjectName": "CN=<certificate-subject-name>"
"Thumbprint": "<certificate-thumbprint>"
}
},
NOTE
Use "Thumbprint" to ensure that the correct certificate is loaded if there are multiple certificates on the
same system with same name used for different purposes such as IPsec, TLS Web Server Authentication,
Client Authentication, Server Authentication, and so on. If you do not have multiple certificates with same
name, you can leave the Thumbprint field empty.
Make sure the name of the certificate matches the domain name of the web node URL.
1. Launch IIS.
a. In the Connections pane on the left, expand the Sites folder and select the website.
b. Click on Bindings under the Actions pane on the right.
c. Click on Add.
d. Choose HTTPS as the type and enter the Port, which is 443 by default. Take note of the port
number.
e. Select the SSL certificate you installed previously.
f. Click OK to create the new HTTPS binding.
g. Back in the Connections pane, select the website name.
h. Click the SSL Settings icon in the center of the screen to open the dialog.
i. Select the checkbox to Require SSL and require a client certificate.
2. Create a firewall rule to open port 443 to the public IP of the web node so that remote machines can
access it.
3. Run the diagnostic tool to send a test HTTPs request.
4. Restart the node or just run 'iisreset' on the command-line.
5. Repeat on every web node.
If satisfied with the new HTTPS binding, consider removing the "HTTP" binding to prevent any access
via HTTP.
Make sure the name of the certificate matches the domain name of the web node URL.
server
{
listen 443;
ssl on;
server_name <webnode-server-name>;
ssl_certificate <certificate-location>;
ssl_certificate_key <certificate-key-location>;
5. In the same server code block, forward the traffic from port 443 to the web node's port 12800 (or
another port if you changed it). Add the following lines after ssl_certificate_key .
location /
{
proxy_pass http://127.0.0.1:<web-node-port>;
}
}
If a compute node is inside the web node's trust boundary, then encryption of this piece is not needed.
However, if the compute node resides outside of the trust boundary, consider using the compute node
certificate to encrypt the traffic between the web node and compute node.
When encrypting, you have the choice of using one of the following compute node HTTPS certificates:
One unique certificate per machine hosting a compute node.
One common Multi-Domain (SAN ) certificate with all compute node names declared in the single
certificate
Windows: Using Your Default ASP .NET Core Web Server to Encrypt
1. On each machine hosting a compute node, install the trusted, signed compute node HTTPS
certificate with a private key in the certificate store.
Make sure the name of the certificate matches the domain name of the compute node URL.
Also, take note of the Subject name of the certificate as you need this info later.
For non production environments, this blog post demonstrates how to use a self-signed
certificate in Linux. However, self-signed certificates are NOT recommended for production
usage.
2. Update the external JSON configuration file, appsettings.json to configure the HTTPS port for the
compute node:
a. Open the configuration file, <compute-node-install-path>/appsettings.json.
b. In that file, search for the section starting with: "Kestrel": {
c. Update and add properties in that section to match the values for the compute node
certificate. The Subject name can be found as a property of your certificate in the certificate
store.
{
"Kestrel": {
"Port": <https-port-number>,
"HttpsEnabled": true,
"HttpsCertificate": {
"Enabled": true,
"StoreName": "My",
"StoreLocation": "LocalMachine",
"SubjectName": "CN=<certificate-subject-name>"
"Thumbprint": "<certificate-thumbprint>"
}
},
NOTE
Use "Thumbprint" to ensure that the correct certificate is loaded if there are multiple certificates on
the same system with same name used for different purposes such as IPsec, TLS Web Server
Authentication, Client Authentication, Server Authentication, and so on. If you do not have multiple
certificates with same name, you can leave the Thumbprint field empty.
Make sure the name of the certificate matches the domain name of the compute node URL.
Make sure the name of the certificate matches the domain name of the web node URL.
server
{
listen 443;
ssl on;
server_name <compute-node-server-name>;
ssl_certificate <certificate-location>;
ssl_certificate_key <certificate-key-location>;
e. In the same server code block, forward all the traffic ( location / ) from port 443 to the
compute node's port 12805 (or another port if you changed it). Add the following lines after
ssl_certificate_key .
location /
{
proxy_pass http://127.0.0.1:<web-node-port>;
}
}
"Uris": {
"Values": [
"https://<IP-ADDRESS-OF-COMPUTE-NODE-1>",
"https://<IP-ADDRESS-OF-COMPUTE-NODE-2>",
"https://<IP-ADDRESS-OF-COMPUTE-NODE-3>"
]
}
If a compute node is inside the web node's trust boundary, then this certificate is not needed. However, if
the compute node resides outside of the trust boundary, consider using the compute node certificate to
encrypt the traffic between the web node and compute node.
Take note of the Subject name of the certificate as you need this info later.
"BackEndConfiguration": {
"ClientCertificate": {
"Enabled": false,
"StoreName": "My",
"StoreLocation": "LocalMachine",
"SubjectName": "<name-of-certificate-subject>"
"Thumbprint": "<certificate-thumbprint>"
NOTE
Use "Thumbprint" to ensure that the correct certificate is loaded if there are multiple certificates on
the same system with same name used for different purposes such as IPsec, TLS Web Server
Authentication, Client Authentication, Server Authentication, and so on. If you do not have multiple
certificates with same name, you can leave the Thumbprint field empty.
These steps assume the trusted, signed HTTPS authentication certificate is already installed on
the machine hosting the web node with a private key.
# Run diagnostics
az ml admin diagnostic run
LEVEL DESCRIPTION
3. Set the logging level for "Default" , which captures Machine Learning Server default events. For
debugging support, use the 'Debug' level.
4. Set the logging level for "System" , which captures Machine Learning Server .NET core events. For
debugging support, use the 'Debug' level. Use the same value as for "Default" .
5. Save the file.
6. Restart the node services.
7. Repeat these changes on every compute node and every web node.
Each node should have the same appsettings.json properties.
8. Repeat the same operation(s) that were running when the error(s) occurred.
9. Collect the log files from each node for debugging.
"LogLevel": {
"Default": "Information"
}
Now consider a user action flow in which a user logs in, creates a session, and deletes that session.
Corresponding log entries for these actions might look as follows:
2018-01-23 22:21:21.770 +00:00 [Information] {"CorrelationId":"d6587885-e729-4b12-a5aa-
3352b4500b0d","Subject":
{"Operation":"Login","UserPrincipalName":"azureuser","RemoteIpAddress":"x.x.x.x","LoginSessionId":"A58
0CF7A1ED5587BDFD2E63E26103A672DE53C6AF9929F17E6311C4405950F1408F53E9451476B7B370C621FF7F6CE5E622183B44
63C2CFEEA3A9838938A5EA2"}}
Correlating the above logs using LoginSessionId value, you can determine that the user "azureuser"
logged in, created a session, and then deleted that session during the time period range from 2018-01-23
22:21 to 2018-01-23 22:28. We can also obtain other information like the machine IP address from which
"azureuser" performed these actions (RemoteIpAddress) and whether the requests succeeded or failed
(StatusCode). In the second entry, notice that the Request and Response for each user action can be
correlated using the CorrelationId.
Troubleshooting
This section contains pointers to help you troubleshoot some problems that can occur.
IMPORTANT
1. In addition to the info below, review the issues listed in the Known Issues article as well.
2. If this section does not help solve your issue, file a ticket with technical support or post in our forum.
mkdir /var/RevoShare/rserve2
chmod 777 /var/RevoShare/rserve2
rxSparkConnect(reset = TRUE)
When 'reset = TRUE', all cached Spark Data Frames are freed and all existing Spark applications
belonging to the current user are shut down.
Compute Node Failed / HTTP status 503 on APIs (9.0.1 - Linux Only)
If you get an HTTP status 503 (Service Unavailable) response when using the Rest APIs or encounter a
failure for the compute node during diagnostic testing, then one or more of the symlinks needed by
deployr-rserve are missing. deployr-rserve is the R execution component for the compute node,
1. Launch a command window with administrator privileges with root/sudo privileges.
2. Run a diagnostic test of the system on the machine hosting the compute node.
3. If the test reveals that the compute node test has failed, type pgrep -u rserve2 at a command
prompt.
4. If no process ID is returned, then the R execution component is not running and we need to check
which symlinks are missing.
5. At the command prompt, type tail -f /opt/deployr/9.0.1/rserve/R/log . The symlinks are revealed.
6. Compare these symlinks to the symlinks listed in the configuration article.
7. Add a few symlinks using the commands in the configuration article.
8. Restart the compute node services.
9. Run the diagnostic test or try the APIs again.
Unauthorized / HTTP status 401
If you configured Machine Learning Server to authenticate against LDAP/AD, and you experience
connection issues or a 401 error, verify the LDAP settings you declared in appsettings.json. Use the
ldp.exe tool to search the correct LDAP settings and compare them to what you have declared. You can
also consult with any Active Directory experts in your organization to identify the correct parameters.
Configuration did not restore after upgrade
If you followed the upgrade instructions but your configuration did not persist, then put the backup of the
appsettings.json file under the following directories and reinstall Machine Learning Server again:
On Windows: C:\Users\Default\AppData\Local\DeployR\current
On Linux: /etc/deployr/current
Alphanumeric error message when consuming service
If you get an error similar to Message: b55088c4-e563-459a-8c41-dd2c625e891d when consuming a web
service, search compute node's log file for the alphanumeric error code to read the full error message.
Failed code execution with “ServiceBusyException” in the log
If a code execution fails and returns a ServiceBusyException error in the Web node log file, then a proxy
issue may be blocking the execution.
The workaround is to:
1. Open the R initialization file <install folder>\R_SERVER\etc\Rprofile.site.
2. Add the following code as a new line in Rprofile.site:
utils::setInternet2(TRUE)
If you encounter this error, you can re-add the extension as such:
Windows:
Linux:
IMPORTANT
These roles are not the same as RBAC in Azure Active Directory. While the default roles described here-in bear the
same names as the roles you can define in Azure, it is not possible to inherit the Azure roles. If you want role-based
access control over web services and APIs, you must set up roles again in Machine learning server.
What do I need?
To assign groups of users in your Active Directory to Machine Learning Server roles, you must have:
An instance of Machine Learning Server that is configured to operationalize analytics
Authentication for this instance must be via Active Directory/LDAP (AD/LADP ) or Azure Active Directory
(AAD ) and already configured
The names of the groups that contain the users to whom you want to give special permissions
WARNING
Security group names must be unique across your LDAP/AAD configuration in order to be assigned to a Machine
Learning Server role. If a group in LDAP or AAD bears the same name as another group in that LDAP or AAD directory,
then it cannot be assigned to a role in Machine Learning Server or R Server.
In Machine Learning Server, the administrator can assign one or more Active Directory groups to one or more
of the following roles: 'Owner', 'Contributor', and 'Reader'. Roles give specific permissions related to deploying
and interacting with web services and other APIs.
- Owner (highest permissions)
- Contributor
- Reader
Owner These users can manage Web service APIs: No API restrictions
any service and call any API, ✔ Publish any service
including centralized ✔ Update any service
configuration APIs. ✔ Delete any service
✔ List any service
✔ Consume any service
Other APIs:
✔ Call any other API
MACHINE LEARNING SE
EXAMPLE USER USER'S RVER USER'S
/ PERSONA LDAP GROUPS RBAC CONFIGURATION ROLE
Python developer
NOTE
If only the default local administrator account is defined for Machine Learning Server (or R Server), then roles are not
needed. In this case, the 'admin' user is implicitly assigned to the Owner role (can call any API).
3. In that section, add only the roles you need. Then, map the security groups to each role you want to
define such as:
"Authorization": {
"Owner": [ "Administrators" ],
"Contributor": [ "RProgrammers", "Quality" ],
"Reader": [ "App developers" ],
"CacheLifeTimeInMinutes": 60
}
The 'CacheLifeTimeInMinutes' attribute was added in Machine Learning Server 9.2.1. It indicates the
length of time that Machine Learning Server caches the information received from LDAP or AAD
regarding user group membership. After the cache lifetime elapses, the roles and users are checked
again. The changes you make to the groups in your LDAP or AAD configuration are not reflected in
Machine Learning Server until the cache lifetime expires and the configuration is checked again.
IMPORTANT
Defining a Reader role might affect web service consumption latency as roles are being validated on each call to
the web service.
WARNING
For AD/LDAP authentications:
1. Be careful not to use the 'CN=' portion of the distinguished names. For example, if the distinguished name
appears as 'CN=Administrators', enter only 'Administrators' here.
2. Ensure that the username returned for the value of 'UniqueUserIdentifierAttributeName' matches the
username returned by 'SearchFilter'. For example, if "SearchFilter": "cn={0}" and
"UniqueUserIdentifierAttributeName": "userPrincipalName" , then the values for cn and
userPrincipalName must match.
3. For R Server 9.1 users: If you specify LDAP Root as the SearchBase in web node's appsettings.json, a search
of the roles returns LDAP referrals and throws a 'LDAPReferralException'. A workaround is to change the
LDAP port in web node's appsettings.json from 389 to Global Catalog Port 3268. Or, for LDAPS, change
Port to 3269 instead of 636. Global Catalogs do not return LDAP referrals in LDAP Search Results.
IMPORTANT
For more security, we recommend you encrypt the key before adding the information to appsettings.json.
NOTE
If a user belongs to more groups than allowed in AAD, AAD provides an overage claim in the token it returns. This
claim along with the key you provide here allows Machine Learning Server to retrieve the group memberships for
the user.
For Active Directory/LDAP: In appsettings.json, find the "LDAP" section. The server verifies that the
groups you have declared are valid in AD/LDAP using the QueryUserDn and QueryUserPassword
values in the "LDAP" section. See the following example: These settings allow Machine Learning Server
to verify that each declared group is, in fact, a valid, existing group in AD. Learn more about configuring
Machine Learning Server to authenticate with Active Directory/LDAP.
With AD/LDAP, you can restrict which users can log in and call APIs by declaring the groups with
permissions in the 'SearchFilter' LDAP property. Then, users in other groups are not able to call any
APIs. In this example, only members of the 'mrsreaders', 'mrsowners', and 'mrscontributors' groups can
call APIs after logging in.
"SearchFilter": "(&(sAMAccountName={0})(|
(memberOf=CN=mrsreaders,OU=Readers,OU=AA,DC=pseudorandom,DC=cloud)
(memberOf=CN=mrsowners,OU=Owner,OU=AA,DC=pseudorandom,DC=cloud)
(memberOf=CN=mrscontributors,OU=Contributor,OU=AA,DC=pseudorandom,DC=cloud)))",
"UniqueUserIdentifierAttributeName": "sAMAccountName",
Example
Here is an example of roles declared for AD/LDAP in appsettings.json on the web node:
Authentication: {
"AzureActiveDirectory": {
"Enabled": false,
"Authority": "https://login.windows.net/rserver.contoso.com",
"Audience": "00000000-0000-0000-0000-000000000000",
"Key": "ABCD000000000000000000000000WXYZ"
},
"LDAP": {
"Enabled": true,
"Host": "<host_ip>",
"UseLDAPS": "True",
"BindFilter": "CN={0},CN=DeployR,DC=TEST,DC=COM",
"QueryUserDn": "CN=deployradmin,CN=DeployR,DC=TEST,DC=COM",
"QueryUserPasswordEncrypted": true,
"QueryUserPassword":
"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHI
JKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQR",
"SearchBase": "CN=DeployR,DC=TEST,DC=COM",
"SearchFilter": "cn={0}"
}
}
"Authorization": {
"Owner": ["Administrators"],
"Contributor": ["RProgrammers", "Quality"]
}
See Also
How to publish and manage web services in R
How to interact with and consume web services in R
Authentication options for Machine Learning Server when operationalizing analytics
Blog article: Role Based Access Control With MRS 9.1.0
Configuring an SQL Server or PostgreSQL
database for Machine Learning Server
4/13/2018 • 2 minutes to read • Edit Online
Consider the size of the machine hosting this database carefully to ensure that database performance does
not degrade overall performance and throughput.
This feature uses a SQLite 3.7+ database by default, but can be configured to use:
SQL Server (Windows) Professional, Standard, or Express Version 2008 or greater
SQL Server (Linux)
Azure SQL DB
Azure Database for PostgreSQL
PostgreSQL 9.2 or greater (Linux)
IMPORTANT
Any data that was saved in the default local SQLite database will not be migrated to a different DB, if you configure one.
IMPORTANT
These steps assume that you have already set up SQL Server or PostgreSQL as described for that product.
Create this database and register it in the configuration file below BEFORE the service for the control node is started.
For example:
"ConnectionStrings": {
"sqlserver": {
"Enabled": true,
...
},
For SQL Server Database (SQL authentication), use your string properties similar to:
f. For better security, we recommend you encrypt the connection string for this database before
adding the information to appsettings.json.
a. Encrypt the connection string.
b. Copy the encrypted string returned by the administration utility into
"ConnectionStrings": { property block and set "Encrypted": to true . For example:
"ConnectionStrings": {
"sqlserver": {
"Enabled": true,
"Encrypted": true,
"Connection":
"eyJ0IjoiNzJFNDg5QUQ1RDQ4MEM1NURCMDRDMjM1MkQ1OTVEQ0I2RkQzQzE3QiIsInMiOiJFWkNhNUdJMUNSRFV0bXZHV
EIxcmNRcmxXTE9QM2ZTOGtTWFVTRk5QSk9vVXRWVzRSTlh1THcvcDd0bCtQdFN3QVRFRjUvL2ZJMjB4K2xTME00VHRKZDd
kcUhKb294aENOQURyZFY1KzZ0bUgzWG1TOWNVUkdwdjl3TGdTaUQ0Z0tUV0QrUDNZdEVMMCtrOStzdHB"
},
...
},
IMPORTANT
You must first set up your nodes before doing anything else with the admin extension of the CLI.
You do not need an Azure subscription to use this CLI. It is installed as part of Machine Learning Server and runs
locally.
1. On the machine hosting the node, launch a command line window or terminal with administrator
(Windows) or root/sudo (Linux) privileges.
2. Run the command to either monitor, stop, or start a node.
# Monitor nodes
az ml admin node list
IMPORTANT
1. If the 'owner' role is defined, then the administrator must belong to the 'Owner' role in order to manage compute
nodes.
2. If you declared URIs in R Server and have upgraded to Machine Learning Server, the URIs are copied from the old
appsettings.json to the database so they can be shared across all web nodes. If you remove a URI with the utility, it
is deleted from the appsettings.json file as well for consistency.
NOTE
You must first set up your compute nodes before doing anything else with the admin extension of the CLI.
You do not need an Azure subscription to use this CLI. It is installed as part of Machine Learning Server and runs locally.
1. On the machine hosting the node, launch a command line window or terminal with administrator
(Windows) or root/sudo (Linux) privileges.
2. If you are not yet authenticated in the CLI, do so now. This is an administrator task only, so you must have
the Owner role to declare or manage URIs. The account name is admin unless LDAP or AAD is
configured.
3. Use the CLI to declare the IP address of each compute node you configured. You can specify a single URI,
several URIs, or even an IP range:
# Declare one or more compute node URIs
az ml admin compute-node-uri add --uri <uris>
For multiple compute nodes, separate each URI with a comma. The following example shows a single URI
and a range of IPs (1.0.1.1, 1.0.1.2, 1.0.2.1, 1.0.2.2, 1.0.3.1, 1.0.3.2):
http://1.1.1.1:12805, http://1.0.1-3.1-2:12805
# For example:
# [
# "A. DC=Windows Azure CRP Certificate Generator (private key)"
# ]
# Encrypt a secret
az ml admin credentials set ---cert-store-name <CERT_STORE_NAME> --cert-store-location
<CERT_STORE_LOCATION> --cert-subject_name <CERT_SUBJECT_NAME> --secret <secret>
NOTE
You can bypass script interface using the argument '-encryptsecret encryptSecret encryptSecretCertificateStoreName
encryptSecretCertificateStoreLocation encryptSecretCertificateSubjectName'. See the table at the end of this topic, here.
Set or update the local administrator password
7/31/2018 • 2 minutes to read • Edit Online
IMPORTANT
This password is set while you are first configuring your nodes.
You do not need an Azure subscription to use this CLI. It is installed as part of Machine Learning Server and runs
locally.
NOTE
You can bypass script interface using the argument '-setpassword '. Learn about all command-line switches for this script,
here. For example:
dotnet Microsoft.MLServer.Utils.AdminUtil\Microsoft.MLServer.Utils.AdminUtil.dll -setpassword my-
password
Update port values
7/31/2018 • 2 minutes to read • Edit Online
IMPORTANT
This password is set while you are first configuring your nodes.
You do not need an Azure subscription to use this CLI. It is installed as part of Machine Learning Server and runs locally.
The port number will be updated the next time the service is restarted.
Evaluate the load balancing capacity of your
configuration
7/31/2018 • 7 minutes to read • Edit Online
IMPORTANT
Web nodes are stateless, and therefore, session persistence ("stickiness") is not required. For proper access token signing
and verification across your configuration, ensure that the JWT certificate settings are exactly the same for every web node.
These JWT settings are defined on each web node in the configuration file, appsetting.json. Learn more...
IMPORTANT
You must first set up your nodes before doing anything else with the admin extension of the CLI.
You do not need an Azure subscription to use this CLI. It is installed as part of Machine Learning Server and runs locally.
1. On the machine hosting the node, launch a command line window or terminal with administrator
(Windows) or root/sudo (Linux) privileges.
2. Define and run the capacity evaluation. For help, run az ml admin capacity --help
Chart Report
The test results are divided into request processing stages to enable you to see if any configuration changes are
warranted, such as adding more web or compute nodes, increase the pool size, and so on.
Web Node Request Time for the request from the web node's controller to go all
the way to deployr-rserve/JupyterKernel and back.
Initialize Shell Time to load the data (model or snapshot) into the session
prior to execution
Web Node to Compute Node Time for a request from the web node to reach the compute
node
Compute Node Request Time for a request from the compute node to reach deployr-
rserve/JupyterKernel and return to the node
You can also explore the results visually in a break-down graph using the URL that is returned to the console.
Session Pools
When using Machine Learning Server for operationalization, code is executed in a session or as a service on a
compute node. In order to optimize load-balancing performance, Machine Learning Server is capable of
establishing and maintaining a pool of R and Python sessions for code execution.
There is a cost to creating a session both in time and memory. So having a pool of existing sessions awaiting
code execution requests means no time is lost on session creation at runtime thereby shortening the processing
time. Instead, the time needed to create sessions for the pool occurs whenever the compute node is restarted. For
this reason, the larger the defined initial pool size (InitialSize), the longer it takes to start up the compute node.
New sessions are added to the pool as needed to execute in parallel. However, after a request is handled and the
session is idle, the ssession is closed if the number of shells exceeds the maximum pool size (MaxSize).
However, during simulation test, the test continues until the test threshold is met (maximum threads or latency).
If the number of shells needed to run the test exceeds the number of sessions in the pool, a new session is
created on-demand when the request is made and the time it takes to execute the code is longer since time is
spent creating the session itself.
The size of this pool can be adjusted in the external configuration file, appsettings.json, found on each compute
node.
"Pool": {
"InitialSize": 5,
"MaxSize": 80
},
Since each compute node has its own thread pool for sessions, configuring multiple compute nodes means that
more pooled sessions are available to your users.
IMPORTANT
If Machine Learning Server is configured for Python only, then only a pool of Python sessions is created. If the server is
configured only for R, then only a pool of R sessions is created. And if it configured for both R and Python, then two
separate pools are created, each with the same initial size and maximum size.
3. Set the InitialSize. This value is the number of R and/or Python sessions that are pre-created for your
users each time the compute node is restarted.
4. Set the MaxSize. This is the maximum number of R and/or Python sessions that can be pre-created and
held in memory for processing code execution requests.
5. Save the file.
6. Restart the compute node services.
7. Repeat these changes on every compute node.
NOTE
Each compute node should have the same appsettings.json properties.
Cross-Origin Resource Sharing
6/18/2018 • 2 minutes to read • Edit Online
b. Enter a comma-separated list of allowed "Origins" for your policy. In this example, the policy allows
cross-origin requests from "http://www.contoso.com", "http://www.microsoft.com", and no other
origins.
"CORS": {
"Enabled": true,
"Origins": ["http://www.contoso.com", "http://www.microsoft.com"]
}
You can create a local R package repository of the R packages you need using the R package miniCRAN . You can
then copy this repository to all compute nodes and then install directly from this repository.
This production-safe approach provides an excellent way to:
Keep a standard, sanctioned library of R packages for production use
Allow packages to be installed in an offline environment
To use the miniCRAN method:
1. On the machine with Internet access:
a. Launch your preferred R IDE or an R tool such as Rgui.exe.
b. At the R prompt, install the miniCRAN package on a computer that has Internet access.
if(!require("miniCRAN")) install.packages("miniCRAN")
if(!require("igraph")) install.packages("igraph")
library(miniCRAN)
c. To point to a different snapshot, set the CRAN_mirror value. By default, the CRAN mirror specified
by your version of Microsoft R Open is used. For example, for Machine Learning Server 9.2.1 that
date is 2017-09-01.
d. Create a miniCRAN repository in which the packages are downloaded and installed. This repository
creates the folder structure that you need to copy the packages to each compute node later.
NOTE
If you aren't sure which packages to list, consider using a list of the top “n” (e.g. 500) packages by
download/popularity as a starting point. Then, extend with additional packages as needed over time. For
Mac and Windows binaries, it is possible to look at the particular bin/contrib repo you’re interested in, for
example: https://cran.microsoft.com/snapshot/2018-01-16/bin/windows/contrib/3.4/PACKAGES
It is also possible to create your own mirror to get ALL packages instead of using miniCRAN; however, this
would be very large and grow stale quickly requiring regular updates.
install.packages(pkgs_needed,
repos = file.path("file://", normalizePath(local_repo, winslash = "/")),
dependencies = TRUE
)
e. Run the following R command and reviewing the list of installed packages:
installed.packages()
As we mentioned before, it is imperative that the right set of R package versions are installed and accessible to all
users. Option 2 makes use of a master R script containing the list of specific package versions to install across the
configuration on behalf of your users. Using a master script ensures that the same packages (along with all its
required package dependency) are installed each time.
To produce the list of packages, consider which R packages (and versions) are needed and sanctioned for
production. Also consider requests from users to add new R packages or update package versions.
This production-safe approach provides an excellent way to
Keep a standard (and sanctioned) library of R packages for production use.
Manage R package dependencies and package versions.
Schedule timely updates to R packages.
This option does require the machines hosting the compute node have access to the Internet to install the
packages.
To use a master script to install packages:
1. Create the master list of packages (and versions) in an R script format. For example:
install.packages("Package-A")
install.packages("Package-B")
install.packages("Package-C")
install.packages("Package-...")
Update and manually rerun this script on each compute node each time a new package or version is needed
in the server environment.
To avoid issues where a locally tested script fails in the Machine Learning Server environment due to missing
package dependencies, install the R packages into the workspace of a remote R session yourself.
This remote execution and snapshot approach provides an excellent way to:
Try out new package or package versions without posing any risks to a stable production environment
Install packages without requiring any intervention from the administrator
The packages you install using this method do not 'contaminate' the production environment for other users
since they are only available in the context of the given R session. Those packages remain installed for the
lifecycle of the R session. You can prolong this lifecycle by saving the session workspace and working directory
into a snapshot. Then, whenever you want to access the workspace, the installed R packages, and the working
directory files as they were, you can recall the snapshot using its ID.
Learn more about snapshots and remote execution...
IMPORTANT
For optimal performance, consider the size of the snapshot carefully especially when publishing a service. Before creating a
snapshot, ensure that keep only those workspace objects you need and purge the rest.
Note: After you've sufficiently tested the packages as described in this section, you can request that the
administrator install a package across the configuration for all users.
To install packages within an R session:
1. Develop and test your code locally.
2. Load the mrsdeploy package.
> library(mrsdeploy)
3. Authenticate to create the remote session. Learn more about the authentication functions and their
arguments in the article: "Connecting to Machine Learning Server from mrsdeploy. "
For example, for Azure Active Directory:
> remoteLoginAAD("http://localhost:12800",
authuri = "https://login.windows.net",
tenantid = "myMRSServer.contoso.com",
clientid = "00000000-0000-0000-0000-000000000000",
resource = "00000000-0000-0000-0000-000000000000",
session=FALSE,
diff=TRUE,
commandline=FALSE)
REMOTE>
> remoteLogin("https://localhost:12800",
session=TRUE,
diff=TRUE,
commandline=TRUE)
REMOTE>
b. Pause the remote session and execute your R scripts to test the code and newly installed packages
in the remote environment.
REMOTE> pause()
> remoteScript("my-script.R")
5. To allow the workspace and working directory to be reused later, create a session snapshot. A snapshot is a
prepared environment image of an R session saved to Machine Learning Server, which includes the
session's R packages, R objects and data files. This snapshot can be loaded into any subsequent remote R
session for the user who created it. Learn more about snapshots.
REMOTE>pause()
>create_snapshot>snapshotId<-createSnapshot("my-snapshot-name")
$snapshotId
[1] "123456789-abcdef-123456789"
> loadSnapshot("123456789-abcdef-123456789")
You can ask your administrator to install a package across the configuration for all users once you've sufficiently
tested the package as described in this section.
WARNING
R Server 9.0 users! When loading a library for the REMOTE session, set lib.loc=getwd() as such:
library("<packagename>", lib.loc=getwd())
Default install paths to key log and configuration
files on compute and web nodes
6/18/2018 • 2 minutes to read • Edit Online
OS <SERVER-DIRECTORY>
Linux /opt/microsoft/mlserver/9.3.0/o16n
OS PATH
Linux /opt/microsoft/mlserver/9.2.1/o16n
OS PATH
Windows <r-home>\deployr
(Run 'normalizePath(R.home())' in the R console for R
home.)
Linux /usr/lib64/microsoft-r/rserver/o16n/9.1.0/<node-
directory>
OS PATH
Windows <r-home>\deployr
(Run 'normalizePath(R.home())' in the R console for R
home.)
Linux /usr/lib64/microsoft-r/rserver/o16n/9.0.1/<node-
directory>
Machine Learning Server, formerly known as Microsoft R Server, is a broadly deployed enterprise-class analytics
platform for R and Python on-premises computing.
It's also available in the cloud on Azure virtual machines (VM ), and through Azure services that have integrated the
R and Python libraries. This article explains your options for accessing Machine Learning Server functionality in
Azure.
Data science VM
Azure also offers a data science VM that has a full toolset, where the R and Python packages in Machine Learning
Server are just one component. For more information, see Machine Learning Server on the Microsoft Data Science
Virtual Machine.
Azure services
The following Azure services include R and Python packages:
R Server on Azure HDInsight
Machine Learning Server in the Cloud
5/2/2018 • 2 minutes to read • Edit Online
Machine Learning Server, formerly known as Microsoft R Server, is a broadly deployed enterprise-class analytics
platform for R and Python on-premises computing.
It's also available in the cloud on Azure virtual machines (VM ), and through Azure services that have integrated
the R and Python libraries. This article explains your options for accessing Machine Learning Server functionality
in Azure.
Data science VM
Azure also offers a data science VM that has a full toolset, where the R and Python packages in Machine Learning
Server are just one component. For more information, see Machine Learning Server on the Microsoft Data
Science Virtual Machine.
Azure services
The following Azure services include R and Python packages:
R Server on Azure HDInsight
ML Server on the Data Science Virtual Machine
4/13/2018 • 2 minutes to read • Edit Online
The Microsoft Data Science Virtual Machine is an Azure virtual machine (VM ) image pre-configured with several
popular tools, including Machine Learning Server on the Linux VM and both Machine Learning Server and SQL
Server Machine Learning Services on the Windows. Machine Learning Server (Developer Edition) includes the
complete R distribution from CRAN and a Python interpreter, python distribution from Anaconda, plus additional
data-analysis functions with big-data capabilities, and the operationalization framework for integrating R and
Python into applications as web services. The developer edition is identical to the Enterprise Machine Learning
Server edition, but licensed for development/test use.
Through Azure’s worldwide cloud infrastructure, you now have on-demand access to a data science development
environment in which you can rapidly derive insights from your data, build predictive models and advanced
analytics solutions for deployment to the cloud, on-premises or in a hybrid environment.
The Microsoft Data Science Virtual Machine jump starts your analytics project by saving you the trouble of having
to discover and install these tools individually. Hosting the data science machine on Azure gains you high
availability and a consistent set of tools used across your data science team. It enables you to work on tasks in a
variety of languages including R and Python. Visual Studio provides an IDE to develop and test your code that is
easy to use. The Azure SDK included in the VM allows you to build your applications using various services on
Microsoft’s cloud platform.
We encourage you to try the Microsoft Data Science Virtual Machine to jumpstart your analytics project.
Billing for the VM image includes all of the software installed on the machine. More details on the compute
fees can be found here.
Learn More
Overview of Data Science Virtual Machine
Provision the Data Science Virtual Machine - Windows | Linux
Use the Data Science Virtual Machine - Windows | Linux
Try the virtual machine for free via a 30-day Azure free trial
Machine Learning Server on Azure Virtual Machines
7/31/2018 • 6 minutes to read • Edit Online
Machine Learning Server, formerly known as R Server, is pre-installed on Azure virtual machines (VM ) images
running either a Windows or Linux operating system.
An excellent alternative to selecting an existing VM image is to provision a VM yourself using a resource template.
The template includes extra configuration steps for both the VM and Machine Learning Server itself, resulting in a
VM that is ready-to-use with no additional work on your part.
VM images on Azure
The following procedure explains how to use the Azure portal to view the full range of VM images that provide
Machine Learning Server.
1. Sign in to the Azure portal.
2. Click Create a resource.
3. Search for Machine Learning Server. The following list shows partial search results. VM images include
current and previous versions of Machine Learning Server on several common Linux operating systems as
well as Windows Server 2016.
VM images include the custom R packages and Python libraries from Machine Learning Server that offer machine
learning algorithms, R and Python helpers for deploying analytics, and portable, scalable, and distributable data
analysis functions.
Launch R Server
On Linux, simple type R at the command prompt to invoke the R interpreter, or Revo64 to run R Server in a
console session.
On Windows, open an R console session by entering RGUI in the Cortana search bar.
Configure an R IDE
With Machine Learning Server installed, you can configure your favorite R integrated development environment
(IDE ) to point to the Machine Learning Server R executable. This way, whenever you execute your R code, you do
so using Machine Learning Server and benefit from its proprietary packages. Machine Learning Server works well
with popular IDEs such as RStudio Desktop or Server.
Configure RStudio for Machine Learning Server
1. Launch RStudio.
2. Update the path to R.
3. When you launch RStudio, Machine Learning Server is now the default R engine.
Open Ports needed to Use RStudio Server
RStudio Server uses port 8787. The default configuration for the Azure VM does not open this port. To do that,
you must go to the Azure portal and elect the proper Network Security Group. Select the All Settings option and
choose Inbound security rules. Add a new rule for RStudio. Name the rule, choose Any for the Protocol, and
add port 8787 to the destination port range. Click OK to save your changes. You should now be able to access
RStudio using a browser.
Assign a Fully Qualified Domain Name to the VM for Accessing RStudio Server
No cloud service is created to contain the public resources for the VM so there is no fully qualified domain name
assigned to the dynamic public IP by default. One can be created and added to the image after deployment using
the Azure PowerShell. The format of the hostname is domainnamelabel; region;.cloudapp.azure.com .
For example, to add a public hostname using PowerShell for a VM named rservercloudvm with resource group
rservercloudrg and desired hostname of rservercloud .
After adding access to port TCP/8787 to the inbound security rules, RStudio Server can be accessed at
http://rservercloud.southcentralus.cloudapp.azure.com:8787/
Some related articles are:
Azure Compute, Network, and Storage Providers for Windows applications under Azure Resource Manager
deployment model
Creating Azure VMs with Azure Resource Manager PowerShell cmdlets
Operationalize R and Python Analytics with Machine Learning Server
on the VM
In order to operationalize your analytics with Machine Learning Server, you can configure Machine Learning
Server after installation to act as a deployment server and host analytic web services.
Microsoft R Client is a free, community-supported, data science tool for high performance analytics. R Client is
built on top of Microsoft R Open so you can use any open-source R package to build your analytics.
Additionally, R Client includes the powerful RevoScaleR technology and its proprietary functions to benefit
from parallelization and remote computing.
R Client allows you to work with production data locally using the full set of RevoScaleR functions, but there
are some constraints. Data must fit in local memory, and processing is limited to two threads for RevoScaleR
functions. To work with larger data sets or offload heavy processing, you can access a remote production
instance of Machine Learning Server from the command line or push the compute context to the remote
server. Learn more about its compatibility.
https://channel9.msdn.com/blogs/MicrosoftR/Microsoft-Introduces-new -free-Microsoft-R -Client/player
After you configure the IDE, a message appears in the console signaling that the Microsoft R Client packages
were loaded.
IMPORTANT
You can connect remotely from your local IDE to an Machine Learning Server instance using functions from the
mrsdeploy package. Then, the R code you enter at the remote command line executes on the remote server. This is very
convenient when you need to offload heavy processing on server or to test your analytics during their development.
Your Machine Learning Server administrator must configure Machine Learning Server for this functionality.
Learn More
You can learn more with these guides:
Quickstart: Running R code in Microsoft R (example)
Compatibility with Machine Learning Server
How -to guides in Machine Learning Server
RevoScaleR R package reference
MicrosoftML R package reference
mrsdeploy R package reference
Execute R code on remote Machine Learning Server
Install Microsoft R Client on Windows
9/25/2018 • 5 minutes to read • Edit Online
Microsoft R Client is a free, data science tool for high-performance analytics that you can install on Windows client
operating systems. R Client is built on top of Microsoft R Open so you can use any open-source R packages to
build your analytics, and includes the R function libraries from Microsoft that execute locally on R Client or
remotely on a more powerful Machine Learning Server.
R Client allows you to work with production data locally using the full set of RevoScaleR functions, with these
constraints: data must fit in local memory, and processing is capped at two threads for RevoScaleR functions.
For information about the current release, see What's new in R Client..
System Requirements
.NET Framework 4.5.2 Framework component must be installed to run setup. Use
the link provided in the setup wizard. Installing this
component requires a computer restart.
Setup Requirements
On the machine onto which you are installing, follow this guidance before you begin installing:
1. Always install Microsoft R Client to a local drive on your computer.
2. You may need to disable your antivirus software. If you do, be sure to turn it back on immediately after
installing.
3. Close any other programs running on the system.
IMPORTANT
Review the recommendations in Package Management for instructions on how to set up a local package repository using
MRAN or miniCRAN.
NOTE
By default, telemetry data is collected during your usage of R Client. To turn off this feature, use the RevoScaleR package
function rxPrivacyControl(FALSE) . To turn it back on, change the setting to TRUE .
How to uninstall
Remove Microsoft R Client like other applications using the Add/Remove dialog on Windows.
Alternately, you can use the same setup file used to install R Client to remove the program by specifying the
/uninstall option on the command line such as: RClientSetup.exe /uninstall
Learn More
You can learn more with these guides:
Overview of Microsoft R Client
Quickstart: Running R code in Microsoft R (example)
How -to guides in Machine Learning Server
RevoScaleR R package reference
MicrosoftML R package reference
mrsdeploy R package reference
Execute code on remote Machine Learning Server
Install Microsoft R Client on Linux
6/18/2018 • 7 minutes to read • Edit Online
Microsoft R Client is a free, data science tool for high-performance analytics that you can install on popular Linux
operating systems, including CentOS, Red Hat, and Ubuntu. R Client is built on top of Microsoft R Open so you
can use any open-source R packages to build your analytics, and includes the R function libraries from Microsoft
that execute locally on R Client or remotely on a more powerful ]Machine Learning Server.
R Client allows you to work with production data locally using the full set of RevoScaleR functions, with these
constraints: data must fit in local memory, and processing is capped at two threads for RevoScaleR functions.
For information about the current release, see What's new in R Client.
System Requirements
Also included and required for R Client setup is Microsoft R Open 3.4.3. Microsoft R Open is a requirement of
Microsoft R Client. In offline scenarios when no internet connection is available on the target machine, you must
manually download the R Open installer. Use only the link specified in the installer or installation guide. Do NOT
go to MRAN and download it from there or you may inadvertently get the wrong version for your Microsoft R
product.
Setup Requirements
A package manager from this list:
zypper SUSE
Installation paths
After installation completes, software can be found at the following paths:
Install root: /opt/microsoft/rclient/3.4.3
Microsoft R Open root: /opt/microsoft/ropen/3.4.3
Executables like Revo64 are under /usr/bin
There is no support for side-by-side installations of older and newer versions.
NOTE
If the repository configuration file is not present in the /etc directory, try manual configuration for repository registration.
# If your system does not have the https apt transport option, add it now
apt-get install apt-transport-https
You can now set up your IDE and try out some sample code.
microsoft-r-client-packages-3.4.3 ** core
microsoft-r-client-mml-3.4.3 ** microsoftml for R (optional)
microsoft-r-client-mlm-3.4.3 ** pre-trained models (requires microsoftml)
microsoft-r-open-foreachiterators-3.4.3
microsoft-r-open-mkl-3.4.3
microsoft-r-open-mro-3.4.3
Additional open-source packages must be installed if a package is required but not found on the system. This list
varies for each installation. Here is one example of the additional packages that were added to a clean RHEL
image during a connected (online) setup:
cairo
fontconfig
fontpackages-filesystem
graphite2
harfbuzz
libICE
libSM
libXdamage
libXext
libXfixes
libXft
libXrender
libXt
libXxf86vm
libicu
libpng12
libthai
libunwind
libxshmfence
mesa-libEGL
mesa-libGL
mesa-libgbm
mesa-libglapi
pango
paratype-pt-sans-caption-fonts
pixman
Download packages
If your system provides a graphical user interface, you can click a file to download it. Otherwise, use wget . We
recommend downloading all packages to a single directory so that you can install all of them in a single
command. By default, wget uses the working directory, but you can specify an alternative path using the
-outfile parameter.
The following example is for the first package. Each command references the version number of the platform.
Remember to change the number if your version is different. For more information, see Linux Software
Repository for Microsoft Products.
Download to CentOS or RHEL 6:
wget https://packages.microsoft.com/rhel/6/prod/microsoft-r-client-packages-3.4.3.rpm
Download to CentOS or RHEL 7:
wget https://packages.microsoft.com/rhel/7/prod/microsoft-r-client-packages-3.4.3.rpm
Download to SUSE: wget https://packages.microsoft.com/sles/11/prod/microsoft-r-client-packages-3.4.3.rpm
Download to Ubuntu 14.04:
wget https://packages.microsoft.com/prod/ubuntu/14.04/microsoft-r-client-packages-3.4.1.deb
Download to Ubuntu 16.04:
wget https://packages.microsoft.com/prod/ubuntu/16.04/microsoft-r-client-packages-3.4.3.deb
Package: microsoft-r-client-packages-3.4.3
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 195249
Maintainer: [email protected]
Architecture: amd64
Version: 3.4.3
Depends: microsoft-r-open-mro-3.4.3, microsoft-r-open-mkl-3.4.3, microsoft-r-open-foreachiterators-
3.4.3
Description: Microsoft R Client 3.4.3
. . .
You can now set up your IDE and try out some sample code. Also, consider package management as described in
the next section.
Offline Package Management
Review the recommendations in Package Management for instructions on how to set up a local package
repository using MRAN or miniCRAN. As we mentioned earlier, you must install the gcc-c++ and gcc-gfortran
binary packages to be able to build and install packages, including miniCRAN.
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under microsoft/rclient.
This command is destructive and irrevocable, so be sure you have the correct directory before you press Enter.
Learn More
You can learn more with these guides:
Overview of Microsoft R Client
Quickstart: Running R code in Microsoft R (example)
How -to guides in Machine Learning Server
RevoScaleR R package reference
MicrosoftML R package reference
mrsdeploy R package reference
Execute code on remote Machine Learning Server
R Client compatibility with Machine Learning Server
or R Server
4/13/2018 • 2 minutes to read • Edit Online
Microsoft R Client is backwards compatible with the following versions of Machine Learning Server and Microsoft
R Server:
COMPATIBLE WITH
MACHINE LEARNING SERVER OR R SERVER OFFERINGS R CLIENT 3.4.3
Although R Client is backwards compaible, R Client and Machine Learning Server follow the same release cycle
and it is a best practice to use packages at the same functional level. The following versions of R Client correspond
to Machine Learning Server versions:
Machine Learning Server includes open-source and Microsoft-specific Python packages for modeling, training,
and scoring data for statistical and predictive analytics. For classic client-server configurations, where multiple
clients connect to and use a remote Machine Learning Server, installing the same Python client libraries on a local
workstation enables you to write and run script locally and then push execution to the remote server where data
resides. This is referred to as a remote compute context, operant when you call Python functions from libraries
that exist on both client and server environments.
A remote server can be either of the following server products:
SQL Server 2017 Machine Learning Services (In-Database)
Machine Learning Server for Hadoop
Client workstations can be Windows or Linux.
Microsoft Python packages common to both client and server systems include the following:
revoscalepy
microsoftml
azureml-model-management-sdk
pre-trained models
This article describes how to install a Python interpreter (Anaconda) and Microsoft's Python packages locally on a
client machine. Once installed, you can use all of the Python modules in Anaconda, Microsoft's packages, and any
third-party packages that are Python 3.5 compliant. For remote compute context, you can only call the Python
functions from packages in the above list.
Installation takes some time to complete. You can monitor progress in the PowerShell window. When
setup is finished, you have a complete set of packages. For example, if you specified C:\mspythonlibs as
the folder name, you would find the packages at C:\mspythonlibs\Lib\site-packages .
The installation script does not modify the PATH environment variable on your computer so the new python
interpreter and modules you just installed are not automatically available to your tools. For help on linking the
Python interpreter and libraries to tools, see Link Python tools and IDEs, replacing the MLS server paths with the
path you defined on your workstation For example, for a Python project in Visual Studio, your custom
environment would specify C:\mypythonlibs , C:\mypythonlibs\python.exe and C:\mypythonlibs\pythonw.exe for
Prefix path, Interpreter path, and Windowed interpreter, respectively.
Offline install
Download .cab files used for offline installation and place them in your %TEMP% directory. You can type
%TEMP% in a Run command to get the exact location, but it is usually a user directory such as
C:\Users\<your-user-name>\AppData\Local\Temp .
After copying the files, run the PowerShell script using the same syntax as an online install. The script knows to
look in the temp directory for the files it needs.
# Download packages-microsoft-prod.deb to set location of the package repository. For example for 16.04.
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
# If your system does not have the https apt transport option
apt-get install apt-transport-https
# Set location of the package repository. For example for SLES 11.
rpm -Uvh https://packages.microsoft.com/sles/11/prod/microsoft-mlserver-packages-py-9.3.0.rpm
NOTE
On Windows, depending on how you run the script, you might see this message: "Express Edition will continue to be
enforced". Express edition is one of the free SQL Server editions. This message is telling you that client libraries are licensed
under the Express edition. Limits on this edition are the same as Standard: in-memory data sets and 2-core processing.
Remote servers typically run higher editions not subjected to the same memory and processing limits. When you push the
compute context to a remote server, you work under the full capabilities of that system.
1. Create some data to work with. This example loads the iris data set using scikit.
2. Print out the dataset. You should see a 4-column table with measurements for sepal length, sepal width,
petal length, and petal width.
print(df)
3. Load revoscalepy and calculate a statistical summary for data in one of the columns. Print the output to
view mean, standard deviation, and other measures.
from revoscalepy import rx_summary
summary = rx_summary("petal length (cm)", df)
print(summary)
Results
Call:
rx_summary(formula = 'petal length (cm)', data = <class 'pandas.core.frame.DataFrame'>, by_group_out_file
= None,
summary_stats = ['Mean', 'StdDev', 'Min', 'Max', 'ValidObs', 'MissingObs'], by_term = True, pweights
= None,
fweights = None, row_selection = None, transforms = None, transform_objects = None,
transform_function = None,
transform_variables = None, transform_packages = None, overwrite = False, use_sparse_cube = False,
remove_zero_counts = False, blocks_per_read = 1, rows_per_block = 100000, report_progress = None,
verbose = 0,
compute_context = <revoscalepy.computecontext.RxLocalSeq.RxLocalSeq object at 0x000002B7EBEBCDA0>)
Next steps
Now that you have installed local client libraries and verified function calls, try the following walkthroughs to
learn how to use the libraries locally and remotely when connected to resident data stores.
Quickstart: Create a linear regression model in a local compute context
How to use revoscalepy in a Spark compute context
How to use revoscalepy in a SQL Server compute context
Remote access to a SQL Server is enabled by an administrator who has configured ports and protocols, enabled
remote connections, and assigned user logins. Check with your administrator to get a valid connection string
when using a remote compute context to SQL Server.
Link Python tools and IDEs to the Python interpreter
installed with Machine Learning Server
6/18/2018 • 4 minutes to read • Edit Online
Prerequisites
Before you begin, have the following ready:
An instance of Machine Learning Server installed with the Python option.
A Python IDE, such as Visual Studio 2017 Community Edition with Python.
TIP
Need help learning Python? Here's a video tutorial.
Python.exe (built-in)
To use the Python modules interactively, start the Python executable from the installation path.
On Windows, go to \Program Files\Microsoft\ML Server\PYTHON_SERVER and run Python.exe to open an
interactive command-line window.
As a validation step, load the revoscalepy module and run the example code for rx_summary to print out
summary statistics using an embedded sample data set:
import os
from revoscalepy import rx_summary, RxOptions, RxXdfData
sample_data_path = RxOptions.get_option("sampleDataDir")
ds = RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
summary = rx_summary("ArrDelay+DayOfWeek", ds)
print(summary)
For new projects, you can also add an environment to your project in Solution Explorer > Python
Environments > Add/Remove Environments.
Jupyter Notebooks (local)
Jupyter Notebooks is distributed with Anaconda, which is the Python distribution used by Machine Learning
Server. A local executable is installed with Machine Learning Server.
On Windows, go to \Program Files\Microsoft\ML Server\PYTHON_SERVER\Scripts\ and double-
click jupyter-notebook.exe to start a Jupyter Notebook session in the default browser window.
On Linux, go to /opt/microsoft/mlserver/9.3.0/runtime/python/bin/ and type ./jupyter notebook .
You should get a series of messages that includes the server endpoint and a URL that you can copy into a
browser, assuming one is available on your computer.
For additional instructions on configuring a multi-user server, see How to add Machine Learning Server modules
to single and multi-user Jupyter Notebook instances.
NOTE
Jupyter Notebooks are a presentation concept, integrating script and text on the same page. Script is interactive on the
page, often Python or R, but could be any one of the 40 languages supported by Jupyter. The text is user-provided content
that describes the script. Notebooks are executed on a server, accessed over http, and rendered as HTML in a browser to the
person requesting the notebook. For more information, see Jupyter documentation.
NOTE
Some browsers append a .txt file extension automatically. Remove the extraneous .txt extension if you see it in the file
name.
PyCharm
In PyCharm, set the interpreter to the Python executable installed by Machine Learning Server.
1. In a new project, in Settings, click Add Local.
2. Enter C:\Program Files\Microsoft\ML Server\PYTHON_SERVER .
Next steps
Now that you know how to load the Python libraries, you might want to explore them in-depth:
revoscalepy Python package functions
microsoftml Python package functions
azureml-model-management-sdk
See also
For more about Machine Learning Sever in general, see Overview of Machine Learning Server
How to add Machine Learning Server modules to
multi-user Jupyter Notebook instances
4/13/2018 • 2 minutes to read • Edit Online
This article explains how to add our libraries to a remote Jupyter server acting as central hub for multi-user
notebooks on your network.
Jupyter Notebooks is distributed with Anaconda, which is the Python distribution used by Machine Learning
Server. If you installed Machine Learning Server, you have the components necessary for running notebooks as a
single user on localhost.
Both Machine Learning Server and Jupyter Notebooks must be on the same computer.
You might need to restart your server in order for the server to pick up the kernel.
This section provides links to installation documentation for R Server 9.1 and earlier. For Machine Learning
Server installation, see How to install and configure Machine Learning Server.
9.1 release
9.1 for Windows
9.1 for Linux
9.1 for Hadoop
9.1 for Cloudera
9.1 for Teradata Server
9.1 for Teradata Client
9.0.1
9.0.1 - Windows
9.0.1 - Install Linux
9.0.1 - Install Hadoop
9.0.1 - Install Cloudera
8.0.5
8.0.5 - Install Linux
8.0.5 - Install Hadoop
Feature announcements for previous R Server
releases
6/18/2018 • 11 minutes to read • Edit Online
Microsoft R Server is subsumed by Machine Learning Server, now in its second release as the next generation of
R Server. If you have R Server 9.1 or earlier, this article enumerates features introduced in those releases.
R Server 9.1
R Server 9.1 is the last release of the R Server product. Newer versions of the R Server technology ship in
Machine Learning Server, which includes Python in addition to R.
Release announcement blog: https://blogs.technet.microsoft.com/dataplatforminsider/2017/04/19/introducing-
microsoft-r-server-9-1-release/
FEATURE DESCRIPTION
Pretrained models Deep neural network models for sentiment analysis and
image featurization
MicrosoftML and T-SQL integration Real-time scoring in SQL Server. Execute R scripts from T-SQL
without having to call an R interpreter. Scoring a model in
this way reduces the overhead of multiple process
interactions and provides faster predictions.
sparklyr interoperability Within the same R script, you can mix and match functions
from RevoScaleR and Microsoft ML packages with popular
open-source packages like sparklyr and through it, H2O. To
learn more, see Use R Server with sparklyr (step-by-step
examples).
Cloudera installation improvements R Server for Hadoop installation is improved for Cloudera
distribution including Apache Hadoop (CDH) on RedHat
Linux (RHEL) 7.x. On this installation configuration, you can
easily deploy, activate, deactivate, or rollback a distribution of
R Server using Cloudera Manager.
For more information about this release, see this blog announcement for 9.1.
R Server 9.0.1
Release announcement blog: https://blogs.technet.microsoft.com/machinelearning/2016/12/07/introducing-
microsoft-r-server-9-0/
This release of R Server, built on open source R 3.3.2, included new and updated packages, plus new
operationalization features in the core engine.
FEATURE DESCRIPTION
R Server 9.0.1 for Linux Supports Ubuntu 14.04 and 16.04 on premises.
R Server for Hadoop (MapReduce and Spark) Support for Spark 1.6 and 2.0. Support for Spark DataFrames
through RxHiveData and RxParquetData in RevoScaleR
when using an RxSpark compute context in ScaleR:
hiveData <- RxHiveData("select * from
hivesampletable", ...)
and
pqData <- RxParquetData('/share/claimsParquet',
...)
R Server 9.0.1 for Windows Includes MicrosoftML and olapR support. Adds a simplified
setup program, in addition to SQL Server Setup, which
continues to be a viable option for installation. Features in
the 9.0.1 release are currently only available through
simplified setup.
Remote execution via mrsdeploy package Remote execution on a R Server 9.0.1 instance.
Web service deployment via mrsdeploy package Publish, and subsequently manage, an R code block as a web
service.
olapR package Run MDX queries and connect directly to OLAP cubes on
SQL Server 2016 Analysis Services from your R solution.
Manually create and then paste in an MDX query, or use an
R-style API to choose a cube, axes, and slicers. Available on R
Server for Windows, SQL Server 2016 R Services, and an R
Server (Standalone) installation through SQL Server.
FEATURE DESCRIPTION
The following blog post presents some of the main differences between Microsoft R Server 9.x configured to
operationalize analytics and the add-on DeployR 8.0.5 which was available in R Server 8.0.5. Read about the
differences between DeployR and R Server 9.x Operationalization.
IMPORTANT
R Server configured to operationalize analytics is not backwards compatible with DeployR 8.x. There is no migration
path as the APIs are completely new and the data stored in the database is structured differently.
R Server 8.0.5
Release announcement blog: https://blogs.technet.microsoft.com/machinelearning/2016/01/12/making-r-the-
enterprise-standard-for-cross-platform-analytics-both-on-premises-and-in-the-cloud/
FEATURE DESCRIPTION
R Server for Linux Support for RedHat RHEL 7.x has been added.
R Server for Teradata Option added to rxPredict to insert into an existing table.
DeployR Enterprise Improved Web security features for better protection against
malicious attacks, improved installation security, and
improved Security Policy Management.
R Server 8.0.3
R Server 8.0.3 is a Windows-only, SQL -Server-only release. It is installed using SQL Server 2016 setup. Version
8.0.3 was succeeded by version 9.0.1 in SQL Server. Features are cumulative so what shipped in 8.0.3 was
available in 9.0.1.
R Server 8.0.0
Revolution R Open is now Microsoft R Open, and Revolution R Enterprise is now generically known as
Microsoft R Services, and specifically Microsoft R Server for Linux platforms.
Microsoft R Services installs on top of an enhanced version of R 3.2.2, Microsoft R Open for Revolution R
Enterprise 8.0.0 (on Windows) or Microsoft R Open for Microsoft R Server (on Linux).
Installation of Microsoft R Services has been simplified from three installers to two: the new Microsoft R
Open for Revolution R Enterprise/Microsoft R Server installer combines Microsoft R Open with the
GPL/LGPL components needed to support Microsoft R Services, so there is no need for the previous
“Revolution R Connector” install.
RevoScaleR includes:
New Fuzzy Matching Algorithms: The new rxGetFuzzyKeys and rxGetFuzzyDist functions provide
access to fuzzy matching algorithms for cleaning and analyzing text data.
Support for Writing in ODBC Data Sources. The RxOdbcData data source now supports writing
Bug Fixes:
When using rxDataStep, new variables created in a transformation no longer inherit the
rxLowHigh attribute of the variable used to create them.
rxGetInfo was failing when an extended class of RxXdfData was used.
rxGetVarInfo now respects the newName element of colInfo for non-xdf data sources.
If inData for rxDataStep is a non-xdf data source that contains a colInfo specification using
newName , the newName should now be used for varsToKeep and varsToDrop .
Deprecated and Defunct.
NIEDERR is no longer supported as a type of random number generator.
scheduleOnce is now defunct for rxPredict.rxDForest and rxPredict.rxBTrees.
The compute context RxLsfCluster is now defunct.
The compute context RxHpcServer is now deprecated
DevelopR - The R Productivity Environment (the IDE provided with Revolution R Enterprise on Windows)
is not deprecated, but it will be removed from future versions of Microsoft R Services.
RevoMPM, a Multinode Package Manager, is now defunct, as it was deemed redundant. Numerous
distributed shells are available, including pdsh, fabric, and PyDSH. More sophisticated provisioning tools
such as Puppet, Chef, and Ansible are also available. Any of these can be used in place of RevoMPM.
See Also
What is Machine Learning Server What is R Server
Install R Server 9.1 for Windows
7/31/2018 • 8 minutes to read • Edit Online
Looking for the latest release? See Machine Learning Server for Windows installation
This article explains how to install Microsoft R Server 9.1 on a standalone Windows server that has an internet
connection. If your server has restrictions on internet access, see offline installation.
If you previously installed version 9.0.1, it is replaced with the 9.1 version. An 8.x version can run side-by-side
9.x, unaffected by the new installation.
System requirements
Operating system must be a supported version of Windows on a 64-bit with x86-compatible architecture
(variously known as AMD64, Intel64, x86-64, IA-32e, EM64T, or x64 chips). Itanium chips (also known as
IA-64) are not supported. Multiple-core chips are recommended.
Memory must be a minimum of 2 GB of RAM is required; 8 GB or more are recommended.
Disk space must be a minimum of 500 MB.
.NET Framework 4.5.2 or later. The installer checks for this version of the .NET Framework and provides a
download link if it's missing. A computer restart is required after a .NET Framework installation.
The following additional components are included in Setup and required for an R Server on Windows.
Microsoft .NET Core 1.1
Microsoft MPI 7.1
AS OLE DB (SQL Server 2016) provider
Microsoft R Open 3.3.3
Microsoft Visual C++ 2013 Redistributable
Microsoft Visual C++ 2015 Redistributable
How to install
This section walks you through an R Server 9.1 deployment using the standalone Windows installer. Under
these instructions, your installation will be serviced under the Modern Lifecycle policy and includes the ability to
operationalize your analytics.
Download R Server installer
You can get the zipped installation file from one of the following download sites.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio
Dev Essentials. Developer edition has
the same features as Enterprise, except
it is licensed for development
scenarios.
SITE EDITION DETAILS
Volume Licensing Service Center Enterprise Sign in, search for "SQL Server 2016
(VLSC) Enterprise edition", and then choose a
per-core or CAL licensing option. A
selection for R Server for Windows
9.0.1 is provided on this site.
Run Setup
Unzip the installation file en_microsoft_r_server_910_for_windows_x64_10324119.zip, navigate to the folder
containing RServerSetup.exe, and then run setup.
1. Double-click RServerSetup.exe to start the wizard.
2. In Configure installation, choose optional components. Required components are listed, but not configurable.
Optional components include:
R Server (Standalone)
Pre-trained Models used for machine learning.
3. Accept the SQL Server license agreement for R Server 1, as well as the license agreement for Microsoft R
Open.
4. Optionally, change the home directory for R Server.
5. At the end of the wizard, click Install to run setup.
1R Server for Windows is licensed as a SQL Server enterprise feature, even though it's installed independently
of SQL Server on a Windows operating system.
Log files
Post-installation, you can check the log files (RServerSetup_.log) located in the system temp directory. An easy
way to get there is typing %temp% as a Run command or search operation in Windows.
Connect and validate
R Server runs on demand as a background process, as Microsoft R Engine in Task Manager. Server startup
occurs when a client application like R Tools for Visual Studio or Rgui.exe connects to the server.
As a verification step, connect to the server and execute a few ScaleR functions to validate the installation.
1. Go to C:\Program Files\Microsoft\R Server\R_SERVER\bin\x64.
2. Double-click Rgui.exe to start the R Console application.
3. At the command line, type search() to show preloaded objects, including the RevoScaleR package.
4. Type print(Revo.version) to show the software version.
5. Type rxSummary(~., iris) to return summary statistics on the built-in iris sample dataset. The rxSummary
function is from RevoScaleR .
Additionally, run the Administrator Utility to configure your R Server for remote access and execution, web
service deployment, or multi-server installation.
COMPONENT DESCRIPTION
Microsoft R Open (MRO) An open-source distribution of the base R language, plus the
Intel Math Kernel library (int-mkl). The distribution includes
standard libraries, documentation, and tools like R.exe and
RGui.exe.
Microsoft R Server proprietary libraries and script engine MRS packages provide libraries of functions. MRS libraries are
co-located with R libraries in the
<install-directory>\library folder. Libraries include
RevoScaleR, MicrosoftML, mrsdeploy, olapR, RevoPemaR, and
others listed in Package Reference.
Admin tool Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.
COMPONENT DESCRIPTION
Consider adding a development tool on the server to build script or solutions using R Server features:
Visual Studio 2015 followed by the R Tools for Visual Studio (RTVS ) add-in
NOTE
By default, telemetry data is collected during your usage of R Server. To turn this feature off, use the RevoScaleR package
function rxPrivacyControl(FALSE) . To turn it back on, change the setting to TRUE .
Modern Lifecycle policy Requires running the latest version of Install R Server for Windows using a
R Server. standalone Windows installer
SQL Server support policy Service updates are on the SQL Server Install SQL Server Machine Learning
release schedule. Services (In-database) as part of a SQL
Server Database engine instance
- or -
Install R Server (Standalone) using the
SQL Server installer 2, 3
1 For details, go to Microsoft Lifecycle Policy. Use the index to navigate to R Server or SQl Server 2016.
2 You can unbind an existing R Services instance from the SQL Server support plan and rebind it to Modern
Lifecycle. The terms and duration of your license are the same. The only difference is that under Modern
Lifecycle, you would adopt newer versions of R Server at a faster cadence than what might be typical for SQL
Server deployments.
3 You can provision an Azure virtual machine running Windows that has SQL Server R Server (Standalone)
already installed. This VM is provisioned under the SQL Server service plan, but you could rebind to the
Modern Lifecycle support policy. For more information, see Provision an R Server Virtual Machine.
Location of R binaries
The Windows installer and SQL Server installer create different library folder paths for the R packages. This is
something to be aware of when using tools like R Tools for Visual Studio (RTVS ) or RStudio, both of which
retain library folder location references.
Deploy at scale
As a standalone server, R Server for Windows is not multi-instance. If you require multiple copies of R Server at
the same functional level on a single server, you can install SQL Server R Services as part of a multi-instance
relational database engine service and then use each one independently.
Another scalable topology is to install multiple R Servers, each configured as either a dedicated web node or
compute node. Nodes can be clustered using NLB or Windows failover clustering. For more information, see
Operationalize your analytics.
VERSION DETAILS
See Also
Introduction to R Server What's New in R Server Supported platforms
Known Issues
Command line installation
Microsoft R Getting Started Guide
Configure R Server to operationalize your analytics
Offline installation for R Server 9.1 for Windows
4/13/2018 • 5 minutes to read • Edit Online
Looking for the latest release? See Machine Learning Server for Windows installation
By default, installers connect to Microsoft download sites to get required and updated components. If firewall
restrictions or constraints on internet access prevent the installer from reaching these sites, you can use an
internet-connected device to download files, transfer files to an offline server, and then run setup.
In this release, most components required for R Server installation are embedded, which means fewer
prerequisites have to be downloaded in advance. The following components are now included in the Windows
installer:
Microsoft .NET Core 1.1
Microsoft MPI 7.1
AS OLE DB (SQL Server 2016) provider
Microsoft R Open 3.3.3
Microsoft Visual C++ 2013 Redistributable
Microsoft Visual C++ 2015 Redistributable
System requirements
Operating system must be a supported version of Windows on a 64-bit with x86-compatible architecture
(variously known as AMD64, Intel64, x86-64, IA-32e, EM64T, or x64 chips). Itanium chips (also known as
IA-64) are not supported. Multiple-core chips are recommended.
Memory must be a minimum of 2 GB of RAM is required; 8 GB or more are recommended.
Disk space must be a minimum of 500 MB.
.NET Framework 4.5.2 or later.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio Dev
Essentials. Developer edition has the
same features as Enterprise, except it is
licensed for development scenarios.
Volume Licensing Service Center Enterprise Sign in, search for "SQL Server 2016
(VLSC) Enterprise edition", and then choose a
per-core or CAL licensing option. A
selection for R Server for Windows
9.0.1 is provided on this site.
Transfer files
Use a flash drive or another mechanism to transfer the following to the offline server.
SRO_3.3.3.0_1033.cab
MLM_9.1.0.0_1033.cab
en_microsoft_r_server_910_for_windows_x64_10324119.zip
Put the CAB files in the setup user's temp folder: C:\Users\<user-name>\AppData\Local\Temp .
Run RServerSetup
If you previously installed version 9.0.1, it will be replaced with the 9.1 version. An 8.x version can run side-by-
side 9.x, unaffected by the new installation.
Unzip the installation file en_microsoft_r_server_910_for_windows_x64_10324119.zip, navigate to the folder
containing RServerSetup.exe, and then run setup.
1. Double-click RServerSetup.exe to start the wizard.
2. In Configure installation, choose optional components. Required components are listed, but not configurable.
Optional components include:
R Server (Standalone)
Pre-trained Models used for machine learning.
3. In an offline installation scenario, you are notified about missing requirements, given a URL for obtaining the
CAB files using an internet-connected device, and a folder path for placing the files.
4. Accept the SQL Server license agreement for R Server 1, as well as the license agreement for Microsoft R
Open.
5. Optionally, change the home directory for R Server.
6. At the end of the wizard, click Install to run setup.
1R Server is licensed as a SQL Server enterprise feature, even though it can be installed independently of SQL
Server on a Windows operating system.
Additionally, run the Administrator Utility to configure your R Server for remote access and execution, web
service deployment, or multi-server installation.
COMPONENT DESCRIPTION
COMPONENT DESCRIPTION
Microsoft R Open (MRO) An open-source distribution of the base R language, plus the
Intel Math Kernel library (int-mkl). The distribution includes
standard libraries, documentation, and tools like R.exe and
RGui.exe.
Microsoft R Server proprietary libraries and script engine MRS packages provide libraries of functions. MRS libraries are
co-located with R libraries in the
<install-directory>\library folder. Libraries include
RevoScaleR, MicrosoftML, mrsdeploy, olapR, RevoPemaR, and
others listed in Package Reference.
Admin tool Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.
Consider adding a development tool on the server to build script or solutions using R Server features:
Visual Studio 2015 followed by the R Tools for Visual Studio (RTVS ) add-in
NOTE
By default, telemetry data is collected during your usage of R Server. To turn this feature off, use the RevoScaleR package
function rxPrivacyControl(FALSE) . To turn it back on, change the setting to TRUE .
See Also
Introduction to R Server What's New in R Server Supported platforms
Known Issues
Command line installation
Microsoft R Getting Started Guide
Configure R Server to operationalize analytics
Command line install of R Server 9.1 for Windows
6/18/2018 • 2 minutes to read • Edit Online
This article provides syntax and examples for running RServerSetup.exe from the command line. You can use
command line parameters for an internet-connected or offline installation. A command line installation requires
administrator permissions.
Before you start, review the following articles for system requirements, prerequisites, download links, and steps:
Install R Server 9.1. on Windows for an internet-connected installation.
Offline installation for a machine with no internet access.
PARAMETER DESCRIPTION
Install Modes
PARAMETER DESCRIPTION
Install Options
PARAMETER DESCRIPTION
/offline Instructs setup to find .cab files on the local system in the
mediadir location. In this release, two .cab files are required:
SRO_3.3.3.0_1033.cab for MRO, and MLM_9.1.0.0_1033.cab
for the machine learning models.
PARAMETER DESCRIPTION
/cachedir="" A download location for the .cab files. By default, setup uses
%temp% for the local admin user. Assuming an online
installation scenario, you can set this parameter to have setup
download the .cabs to the folder you specify.
/mediadir="" The .cab file location setup uses to find .cab files in an offline
installation. By default, setup uses %temp% for local admin.
Default installation
The default installation adds Microsoft R Server (MRS ) and its required components: Microsoft R Open (MRO )
and .NET Core used for operationalizing analytics and machine learning. The command line equivalent of a
double-click invocation of RServerSetup.exe is rserversetup.exe /install /full .
A default installation includes the MicrosoftML package, but not the pre-trained models. You must explicitly add
/models to an installation to add this feature.
Examples
1. Run setup in unattended mode with no prompts or user interaction to install all features, including the pre-
trained models.
rserversetup.exe /quiet /models
2. Add the pre-trained machine learning models to an existing installation. The pre-trained models are
inserted into the MicrosoftML package. Once installed, you cannot incrementally remove them. Removal
will require uninstall and reinstall of R Server.
rserversetup.exe /install /models
4. Offline install requires two .cab files that provide MRO and other dependencies. The /offline parameter
instructs setup to look for the .cab files on the local system. By default, setup looks for the .cab files in the
%temp% directory of local admin, but you could also set the media directory if the .cab files are in a different
folder. For more information and .cab download links, see Offline installation.
rserversetup.exe /offline /mediadir="D:/Public/CABS
See Also
Introduction to R Server What's New in R Server Supported platforms
Known Issues
Microsoft R Getting Started Guide
Configure R Server to operationalize your analytics
R Server 9.1 Installation for Linux Systems
6/18/2018 • 7 minutes to read • Edit Online
Looking for the latest release? See Machine Learning Server for Linux installation
Microsoft R Server is an enterprise class server for hosting and managing parallel and distributed workloads of
R processes on servers and clusters. The server runs on a wide range of computing platforms, including Linux.
This article explains how to install Microsoft R Server 9.1.0 on a standalone Linux server that has an internet
connection. If your server has restrictions on internet access, see the instructions for an offline installation.
If you previously installed version 9.0.1, it will be replaced with the 9.1.0 version. An 8.x version can run side-
by-side 9.x, unaffected by the new installation.
System requirements
Operating system must be a supported version of Linux on a 64-bit with x86-compatible architecture
(variously known as AMD64, Intel64, x86-64, IA-32e, EM64T, or x64 chips). Itanium chips (also known
as IA-64) are not supported. Multiple-core chips are recommended.
Memory must be a minimum of 2 GB of RAM is required; 8 GB or more are recommended.
Disk space must be a minimum of 500 MB.
An internet connection. If you do not have an internet connection, for the instructions for an offline
installation.
A package manager (yum for RHEL systems, apt for Ubuntu, zypper for SLES systems)
Root or super user permissions
The following additional components are included in Setup and required for R Server.
Microsoft R Open 3.3.3
Microsoft .NET Core 1.1 for Linux (required for mrsdeploy and MicrosoftML use cases)
How to install
This section walks you through an R Server 9.1.0 deployment using the install.sh script. Under these
instructions, your installation will be serviced under the Modern Lifecycle policy and includes the ability to
operationalize your analytics and use the MicrosoftML package.
TIP
Review recommendations and best practices for deployments in locked down environments.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio
Dev Essentials. Developer edition has
the same features as Enterprise, except
it is licensed for development
scenarios.
Volume Licensing Service Center Enterprise Sign in, search for R Server for Linux. A
(VLSC) selection for R Server 9.1.0 for Linux
is provided on this site.
The distribution is unpacked into an MRS91Linux folder at the download location. The distribution includes the
following files:
FILE DESCRIPTION
MRS packages include an admin utility, core engine and function libraries, compute node and web node
configuration options, platform packages, and machine learning.
IMPORTANT
Package names in the R Server distribution have changed in the 9.1 release. Instead of DeployrR-themed package
names, the new names are aligned to base packages. If you have script or tooling for manual R Server package
installation, be sure to note the name change.
4. Run the script. To include the pre-trained machine learning models for MicrosoftML, append the -m
switch.
[root@localhost MRS91Linux] $ bash install.sh -m
5. When prompted to accept the license terms for Microsoft R Open, click Enter to read the EULA, click q
when you are finished reading, and then click y to accept the terms.
6. Repeat for the R Server license agreement: click Enter, click q when finished reading, click y to accept the
terms.
Installation begins immediately. Installer output shows the packages and location of the log file.
Verify installation
1. List installed MRS packages:
On RHEL: rpm -qa | grep microsoft
On Ubuntu: apt list --installed | grep microsoft
2. Once you have a package name, you can obtain verbose version information. For example:
On RHEL: $ rpm -qi microsoft-r-server-packages-9.1.x86_64
On Ubuntu: $ dpkg --status microsoft-r-server-packages-9.1.x86_64
Start Revo64
As another verification step, run the Revo64 program. By default, Revo64 is linked to the /usr/bin directory,
available to any user who can log in to the machine:
1. From /Home or any other working directory:
[<path>] $ Revo64
2. Run a RevoScaleR function, such as rxSummary on a dataset. Many sample datasets, such as the iris
dataset, are ready to use because they are installed with the software:
> rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
To quit the program, type q() at the command line with no arguments.
NOTE
By default, telemetry data is collected during your usage of R Server. To turn this feature off, use the RevoScaleR package
function rxPrivacyControl(FALSE) . To turn it back on, change the setting to TRUE .
Next Steps
Review the best practices in Manage your R Server for Linux installation for instructions on how to set up a
local package repository using MRAN or miniCRAN, change file ownership or permissions, set Revo64 as the
de facto R script engine on your server.
See Also
Introduction to R Server What's New in R Server Supported platforms
Known Issues
Install R on Hadoop overview
Uninstall Microsoft R Server to upgrade to a newer version Troubleshoot R Server installation problems on
Hadoop
Configure R Server to operationalize analytics
Offline installation of R Server 9.1 for Linux
6/18/2018 • 8 minutes to read • Edit Online
Looking for the latest release? See Machine Learning Server for Linux installation
By default, installers connect to Microsoft download sites to get required and updated components. If firewall
restrictions or limits on internet access prevent the installer from reaching these sites, you can download
individual components on a computer that has internet access, copy the files to another computer behind the
firewall, manually install prerequisites and packages, and then run setup.
If you previously installed version 9.0.1, it will be replaced with the 9.1 version. An 8.x version can run side-by-
side 9.x, unaffected by the new installation.
System requirements
Operating system must be a supported version of Linux on a 64-bit with x86-compatible architecture
(variously known as AMD64, Intel64, x86-64, IA-32e, EM64T, or x64 chips). Itanium chips (also known as
IA-64) are not supported. Multiple-core chips are recommended.
Memory must be a minimum of 2 GB of RAM is required; 8 GB or more are recommended.
Disk space must be a minimum of 500 MB.
An internet connection. If you do not have an internet connection, for the instructions for an offline
installation.
A package manager (yum for RHEL systems, zypper for SLES systems)
Root or super user permissions
The following additional components are included in Setup and required for R Server.
Microsoft R Open 3.3.3
Microsoft .NET Core 1.1 for Linux (required for mrsdeploy and MicrosoftML use cases)
Microsoft R Open 3.3.3 Direct link to microsoft-r- Use the link provided to get
open-3.3.3.tar.gz the required component. Do
NOT go to MRAN and
download the latest or you
could end up with the
wrong version.
Microsoft .NET Core 1.1 .NET Core download site Multiple versions of .NET
Core are available. Be sure
to choose from the 1.1.1
(Current) list.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio Dev
Essentials. Developer edition has the
same features as Enterprise, except it is
licensed for development scenarios.
Volume Licensing Service Center Enterprise Sign in, search for "SQL Server 2016
(VLSC) Enterprise edition", and then choose a
per-core or CAL licensing option. A
selection for R Server for Linux 9.1 is
provided on this site.
NOTE
It's possible your Linux machine already has package dependencies installed. By way of illustration, on a few systems, only
libpng12 had to be installed.
Transfer files
Use a tool like SmarTTY or PuTTY or another mechanism to upload or transfer files to a writable directory, such
as /tmp, on your internet-restricted server. Files to be transferred include the following:
dotnet-<linux-os-name>-x64.1.1.1.tar.gz
microsoft-r-open-3.3.3.tar.gz
en_microsoft-r-server-910_for_linux_x64_10323878.tar.gz
any missing packages from the dependency list
IMPORTANT
Do not unpack MRO yourself. The installer looks for a gzipped tar file for MRO.
2. A new folder called MRS91Linux is created under /tmp. This folder contains files and packages used
during setup. Copy the gzipped MRO tar file to the new MRS91Linux folder containing the installation
script (install.sh).
[root@localhost tmp] $ cp microsoft-r-open-3.3.3.tar.gz /tmp/MRS91Linux
2. Run the script. To include the pre-trained machine learning models for MicrosoftML, append the -m
switch.
[root@localhost MRS91Linux] $ bash install.sh -m
3. When prompted to accept the license terms for Microsoft R Open, click Enter to read the EULA, click q
when you are finished reading, and then click y to accept the terms.
4. Repeat the key sequence for EULA acceptance for Microsoft R Server.
Installer output shows the packages and location of the log file.
Verify installation
1. List installed MRS packages:
On RHEL: rpm -qa | grep microsoft
On Ubuntu: apt list --installed | grep microsoft
2. Once you have a package name, you can obtain verbose version information. For example:
On RHEL: $ rpm -qi microsoft-r-server-packages-9.1.x86_64
On Ubuntu: $ dpkg --status microsoft-r-server-packages-9.1.x86_64
Partial output is as follows (note version 9.1.0):
Start Revo64
As another verification step, run the Revo64 program. By default, Revo64 is linked to the /usr/bin directory,
available to any user who can log in to the machine:
1. From /Home or any other working directory:
[<path>] $ Revo64
2. Run an R function, such as rxSummary on a dataset. Many sample datasets, such as the iris dataset, are
ready to use because they are installed with the software:
> rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
To quit the program, type q() at the command line with no arguments.
NOTE
By default, telemetry data is collected during your usage of R Server. To turn this feature off, use the RevoScaleR package
function rxPrivacyControl(FALSE) . To turn it back on, change the setting to TRUE .
Next Steps
Review the best practices in Manage your R Server for Linux installation for instructions on how to set up a local
package repository using MRAN or miniCRAN, change file ownership or permissions, set Revo64 as the de
facto R script engine on your server.
See Also
Introduction to R Server What's New in R Server Supported platforms
Known Issues
Microsoft R Getting Started Guide
Configure R Server to operationalize analytics
Uninstall R Server on Linux to upgrade to a newer
version
6/18/2018 • 3 minutes to read • Edit Online
This article explains how to uninstall Microsoft R Server on Linux. Unless you are upgrading from 9.0.1 to the the
latest version 9.1, upgrade requires that you first uninstall the existing deployment before installing a new
distribution.
For 9.0.1-to-9.1, the install script automatically removes previous versions of R Server or Microsoft R Open 3.3.2 if
they are detected so that setup can install newer versions.
If R Server was installed on Cloudera using parcel installation, program information looks like this:
/opt/cloudera/parcels/MRO-3.3.3 and /opt/cloudera/parcels/MRS-9.0.1 (applies to 9.0.1)
/opt/cloudera/parcels/MRO-3.3.2 and /opt/cloudera/parcels/MRS-8.0.5 (applies to 8.0.5 )
/opt/cloudera/parcels/MRO-3.2.2-1 and /opt/cloudera/parcels/MRS-8.0.0-1 (applies to 8.0 )
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under microsoft-r. This
command is destructive and irrevocable, so be sure you have the correct directory before you press Enter.
2. On the root node, verify the location of other files that need to be removed: `
ls /usr/lib64/microsoft-r/8.0
rm -fr /usr/lib64/microsoft-r
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under microsoft-r. This
command is destructive and irrevocable, so be sure you have the correct directory before you press Enter.
rm -rf /usr/lib64/MRS-8.0
rm -rf /usr/lib64/MRO-for-MRS-8.0.0
3. Remove symlinks:
rm -f /usr/bin/Revo64 /usr/bin/Revoscript
rpm -e microsoft-r-server-packages-8.0-8.0.5-1.x86_64
rpm -e microsoft-r-server-intel-mkl-8.0-8.0.5-1.x86_64
rpm -e microsoft-r-server-mro-8.0-8.0.5-1.x86_64
See Also
Install R on Hadoop overview
Install R Server 8.0.5 on Hadoop
Install Microsoft R Server on Linux Troubleshoot R Server installation problems on Hadoop
R Server 9.0.1 Installation for Linux Systems
6/18/2018 • 12 minutes to read • Edit Online
Older versions of R Server for Linux are no longer available on the Microsoft download sites, but if you already
have an older distribution, you can follow these instructions to deploy version 8.0.5. For the current release, see
Install R Server for Linux.
Side-by-side Installation
You can install major versions of R Server (such as an 8.x and 9.x) side-by-side on Linux, but not minor versions.
For example, if you already installed Microsoft R Server 8.0, you must uninstall it before you can install 8.0.5.
Upgrade Versions
If you want to replace an older version rather than run side-by-side, you can uninstall the older distribution before
installing the new version (there is no in-place upgrade). See Uninstall Microsoft R Server to upgrade to a newer
version for instructions.
Requirements
Installer requirements include the following:
An internet connection
A package manager (yum for RHEL systems, zypper for SLES systems)
Root or as super user permissions
If these requirements cannot be met, you can install R Server manually. First, verify that your system meets system
requirements and satisfies the package prerequisites. You can then follow the more detailed installation
instructions described in Managing Your Microsoft R Server Installation.
System Requirements
Processor: 64-bit processor with x86-compatible architecture (variously known as AMD64, Intel64, x86-64, IA-
32e, EM64T, or x64 chips). Itanium-architecture chips (also known as IA-64) are not supported. Multiple-core
chips are recommended.
Operating System: Microsoft R for Linux can be installed on Red Hat Enterprise Linux (RHEL ) or a fully
compatible operating system like CentOS, or SUSE Linux Enterprise Server. Microsoft R Server has different
operating system requirements depending on the version you install. See Supported platforms for specifics. Only
64-bit operating systems are supported.
Memory: A minimum of 2 GB of RAM is required; 8 GB or more are recommended.
Disk Space: A minimum of 500 MB of disk space is required.
3. When prompted to accept the license terms for Microsoft R Server, click Enter to read the EULA, click q
when you are finished reading, and then click y to accept the terms.
4. Installer output shows the packages and location of the log file.
Verify installation
1. List installed packages and get package names:
[MRS90LINUX] $ yum list \*microsoft\*
Start Revo64
As a verification step, run the Revo64 program.
1. Switch to the directory containing the executable:
$ cd MRS90LINUX
3. Run an R function, such as rxSummary on a dataset. Many sample datasets, such as the iris dataset, are
ready to use because they are installed with the software:
> rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
To quit the program, type q() at the command line with no arguments.
Here we show the default path /usr/lib64/MRS90LINUX; if you have specified an alternate installation path, use
that in this command as well.
Unattended installs
You can bypass the interactive install steps of the Microsoft R Server install script with the -y flag ("yes" or "accept
default" to all prompts except that you also agree to the license agreement). Additional flags can be used to specify
which of the usual install options you want, as follows:
./install.sh –a –s
File permissions
Normally, ordinary Microsoft R Server files are installed with read/write permission for owner and read-only
permission for group and world. Directories are installed with execute permission as well, to permit them to be
traversed. You can modify these permissions using the chmod command. (For files owned by root, this command
requires root privileges.)
Installing to a read-only file system
In enterprise environments, it is common for enterprise utilities to be mounted as read-only file systems, so that
ordinary operations cannot corrupt the tools. Obviously, new applications can be added to such systems only by
first unmounting them, then re-mounting them for read/write, installing the software, and then re-mounting as
read-only. This must be done by a system administrator.
install.packages("miniCRAN", dependencies=TRUE)
If your system already contains all the system prerequisites, this will normally download and install all of
miniCRAN’s R package dependencies as well as miniCRAN itself. If a system dependency is missing, compilation
of the first package that needs that dependency will fail, typically with a specific but not particularly helpful
message. In our testing, we have found that an error about curl-config not being found indicates that the curl-devel
package is missing, and an error about libxml2 indicates the libxml2-devel package is missing. If you get such an
error, exit R, use yum or zypper to install the missing package, then restart R and retry the install.packages
command.
Create a repository from an MRAN snapshot
Creating a repository from an MRAN snapshot is very straightforward:
1. Choose a location for your repository somewhere on your local network. If you have a corporate intranet,
this is usually a good choice, provided URLs have the prefix http:// and not https://. Any file system that is
mounted for all users can be used; file-based URLs of the form file:// are supported by the R functions. In
this example, we suppose the file system /local is mounted on all systems and we will create our repository
in the directory /local/repos.
2. Start R and load the miniCRAN package:
library(miniCRAN)
r <- getOption("repos")
r["CRAN"] <- CRAN
options(repos=r)
5. Use miniCRAN’s pkgAvail function to obtain a list of (source) packages in your MRAN snapshot:
6. Use miniCRAN’s makeRepo function to create a repository of these packages in your /local/repos directory:
makeRepo(pkgs, "/local/repos", type="source")
/local/repos/bin/windows/contrib/3.2
local/repos/src/contrib
Windows binary packages should be built with your current R version. Windows binary files will be zip files,
package source files will be tar.gz files. Move the desired packages to the appropriate directories, then run the R
function write_PACKAGES in the tools package to create the PACKAGES and PACKAGES.gz index files:
tools:::write_PACKAGES("/local/repos")
r <- c(REVO=RevoUtils::getRevoRepos())
r <- c(REVO=RevoUtils::getRevoRepos(),
LOCAL="file:///local/repos")
If you added more than one repository and used R version numbers, add multiple lines of the form
LOCAL_VER="file:///local/repos/VER", for example:
r <- c(REVO=RevoUtils::getRevoRepos(),
LOCAL_3.2="file:///local/repos/3.2",
LOCAL_3.1="file:///local/repos/3.1",
LOCAL_3.0="file:///local/repos/3.0")
mv /usr/bin/R /usr/bin/R-3.2.2
ln -s /usr/bin/Revo64 /usr/bin/R
If you have installed Microsoft R Server and then install base R, again there should be no conflict; R and Revo64
point to their respective installations, as usual. You can use the above procedure to make Microsoft R Server your
default version of R.
See Also
Install R Server 8.0.5 for Linux
Install R on Hadoop overview
Install R Server 8.0.5 for Hadoop
Uninstall Microsoft R Server to upgrade to a newer version
Troubleshoot R Server installation problems on Hadoop
Configure R Server to operationalize analytics
R Server 2016 (8.0.5) Installation for Linux Systems
6/18/2018 • 12 minutes to read • Edit Online
Older versions of R Server for Linux are no longer available on the Microsoft download sites, but if you already
have an older distribution, you can follow these instructions to deploy version 8.0.5. For the current release, see
Install R Server for Linux.
Side-by-side Installation
You can install major versions of R Server (such as an 8.x and 9.x) side-by-side on Linux, but not minor versions. If
you already installed Microsoft R Server 8.0, you must uninstall it before you can install 8.0.5.
Upgrade Versions
If you want to replace an older version rather than run side-by-side, you can uninstall the older distribution before
installing the new version (there is no in-place upgrade). See Uninstall Microsoft R Server to upgrade to a newer
version for instructions.
Requirements
Installer requirements include the following:
An internet connection
A package manager (yum for RHEL systems, zypper for SLES systems)
Root or as super user permissions
If these requirements cannot be met, you can install R Server manually. First, verify that your system meets system
requirements and satisfies the package prerequisites. You can then follow the more detailed installation
instructions described in Managing Your Microsoft R Server Installation.
System Requirements
Processor: 64-bit processor with x86-compatible architecture (variously known as AMD64, Intel64, x86-64, IA-
32e, EM64T, or x64 chips). Itanium-architecture chips (also known as IA-64) are not supported. Multiple-core
chips are recommended.
Operating System: Microsoft R for Linux can be installed on Red Hat Enterprise Linux (RHEL ) or a fully
compatible operating system like CentOS, or SUSE Linux Enterprise Server. Microsoft R Server has different
operating system requirements depending on the version you install. See Supported platforms for specifics. Only
64-bit operating systems are supported.
Memory: A minimum of 2 GB of RAM is required; 8 GB or more are recommended.
Disk Space: A minimum of 500 MB of disk space is required.
Verify installation
1. List installed packages and get package names: [MRS80LINUX] $ yum list \*microsoft\*
[MRS80LINUX] $ yum list \*deployr\*
Start Revo64
As a verification step, run the Revo64 program.
1. Switch to the directory containing the executable: $ cd MRS80LINUX
2. Start the program: $ Revo64
3. Run an R function, such as rxSummary on a dataset. Many sample datasets, such as the iris dataset, are
ready to use because they are installed with the software: > rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
4. To quit the program, type q() at the command line with no arguments.
Here we show the default path /usr/lib64/MRS80LINUX; if you have specified an alternate installation path, use
that in this command as well.
Unattended installs
You can bypass the interactive install steps of the Microsoft R Server install script with the -y flag ("yes" or "accept
default" to all prompts except that you also agree to the license agreement). Additional flags can be used to specify
which of the usual install options you want, as follows:
FLAG OPTION DESCRIPTION
./install.sh –a –s
File permissions
Normally, ordinary Microsoft R Server files are installed with read/write permission for owner and read-only
permission for group and world. Directories are installed with execute permission as well, to permit them to be
traversed. You can modify these permissions using the chmod command. (For files owned by root, this command
requires root privileges.)
Installing to a read-only file system
In enterprise environments, it is common for enterprise utilities to be mounted as read-only file systems, so that
ordinary operations cannot corrupt the tools. Obviously, new applications can be added to such systems only by
first unmounting them, then re-mounting them for read/write, installing the software, and then re-mounting as
read-only. This must be done by a system administrator.
install.packages("miniCRAN", dependencies=TRUE)
If your system already contains all the system prerequisites, this will normally download and install all of
miniCRAN’s R package dependencies as well as miniCRAN itself. If a system dependency is missing, compilation
of the first package that needs that dependency will fail, typically with a specific but not particularly helpful
message. In our testing, we have found that an error about curl-config not being found indicates that the curl-
devel package is missing, and an error about libxml2 indicates the libxml2-devel package is missing. If you get
such an error, exit R, use yum or zypper to install the missing package, then restart R and retry the install.packages
command.
Create a repository from an MRAN snapshot
Creating a repository from an MRAN snapshot is very straightforward:
1. Choose a location for your repository somewhere on your local network. If you have a corporate intranet,
this is usually a good choice, provided URLs have the prefix http:// and not https://. Any file system that is
mounted for all users can be used; file-based URLs of the form file:// are supported by the R functions. In
this example, we suppose the file system /local is mounted on all systems and we will create our repository
in the directory /local/repos.
2. Start R and load the miniCRAN package:
library(miniCRAN)
r <- getOption("repos")
r["CRAN"] <- CRAN
options(repos=r)
5. Use miniCRAN’s pkgAvail function to obtain a list of (source) packages in your MRAN snapshot:
6. Use miniCRAN’s makeRepo function to create a repository of these packages in your /local/repos
directory:
/local/repos/bin/windows/contrib/3.2
local/repos/src/contrib
Windows binary packages should be built with your current R version. Windows binary files will be zip files,
package source files will be tar.gz files. Move the desired packages to the appropriate directories, then run the R
function write_PACKAGES in the tools package to create the PACKAGES and PACKAGES.gz index files:
tools:::write_PACKAGES("/local/repos")
r <- c(REVO=RevoUtils::getRevoRepos())
r <- c(REVO=RevoUtils::getRevoRepos(),
LOCAL="file:///local/repos")
If you added more than one repository and used R version numbers, add multiple lines of the form
LOCAL_VER="file:///local/repos/VER", for example:
r <- c(REVO=RevoUtils::getRevoRepos(),
LOCAL_3.2="file:///local/repos/3.2",
LOCAL_3.1="file:///local/repos/3.1",
LOCAL_3.0="file:///local/repos/3.0")
mv /usr/bin/R /usr/bin/R-3.2.2
ln -s /usr/bin/Revo64 /usr/bin/R
If you have installed Microsoft R Server and then install base R, again there should be no conflict; R and Revo64
point to their respective installations, as usual. You can use the above procedure to make Microsoft R Server your
default version of R.
See Also
Install newest release of R Server for Linux
Install R on Hadoop overview
Uninstall Microsoft R Server to upgrade to a newer version
Troubleshoot R Server installation problems on Hadoop
Manage your Microsoft R Server installation on
Linux
4/13/2018 • 6 minutes to read • Edit Online
Covers file management (ownership and permissions), creating a local package repository for production servers
deployed behind a firewall, and how to make RevoScaleR the default R script engine.
File permissions
By default, R Server files are installed with read-write permission for owner and read-only permission for group
and world. Directories are installed with execute permission as well, to permit them to be traversed. If you need to
modify these permissions, you can use the chmod command.
NOTE
For files owned by root, use chmod with root privileges.
File ownership
By default, R Server files are owned by root. For single-user workstations where the user has either sudo
privileges or access to the root password, this is normally fine.
In enterprise environments, however, it's common to have third-party applications such as Microsoft R Server
installed into an account owned by a non-root user as a security precaution. In such an environment, you might
want to create an "RUser" account, and change ownership of the files to that user. You can do that as follows:
1. Install Microsoft R Server as root, as usual.
2. Login as root or super user to create accounts or change file ownership.
3. Create the "RUser" account if it does not already exist. Assign this user to a suitable group, if desired.
4. Use the chown command to change ownership of the files. In the following example, we assume RUser
has been made a member of the dev group:
mv /usr/bin/R /usr/bin/R-3.3.3
2. Create a symbolic link from the Revo64 script to R:
ln -s /usr/bin/Revo64 /usr/bin/R
TIP
The miniCRAN package itself is dependent on 18 other CRAN packages, among which is the RCurl package, which has a
system dependency on the curl-devel package. Similarly, package XML has a dependency on libxml2-devel. We recommend,
therefore, that you build your local repository initially on a machine with full Internet access, so that you can easily satisfy all
these dependencies. After created, you can either move the repository to a different location within your firewall, or simply
disable the machine’s Internet access.
install.packages("miniCRAN", dependencies=TRUE)
If your system already contains all the system prerequisites, this will normally download and install all of
miniCRAN’s R package dependencies as well as miniCRAN itself. If a system dependency is missing, compilation
of the first package that needs that dependency will fail, typically with a specific but not particularly helpful
message. In our testing, we have found that an error about curl-config not being found indicates that the curl-
devel package is missing, and an error about libxml2 indicates the libxml2-devel package is missing. If you get
such an error, exit R, use yum or zypper to install the missing package, then restart R and retry the
install.packages command.
Approach 2: use an MRAN snapshot
Creating a repository from an MRAN snapshot is very straightforward:
1. Choose a location for your repository somewhere on your local network. If you have a corporate intranet,
this is usually a good choice, provided URLs have the prefix http:// and not https://. Any file system that is
mounted for all users can be used; file-based URLs of the form file:// are supported by the R functions. In
this example, we suppose the file system /local is mounted on all systems and we will create our repository
in the directory /local/repos.
2. Start R and load the miniCRAN package:
library(miniCRAN)
r <- getOption("repos")
r["CRAN"] <- CRAN
options(repos=r)
5. Use miniCRAN’s pkgAvail function to obtain a list of (source) packages in your MRAN snapshot:
6. Use miniCRAN’s makeRepo function to create a repository of these packages in your /local/repos
directory:
/local/repos/bin/windows/contrib/3.3
local/repos/src/contrib
Windows binary packages should be built with your current R version. Windows binary files will be zip files.
Package source files will be tar.gz files.
Move the desired packages to the appropriate directories, then run the R function write_PACKAGES in the tools
package to create the PACKAGES and PACKAGES.gz index files:
tools:::write_PACKAGES("/local/repos")
r <- c(REVO=RevoUtils::getRevoRepos())
r <- c(REVO=RevoUtils::getRevoRepos(),
LOCAL="file:///local/repos")
If you added more than one repository and used R version numbers, add multiple lines of the form
LOCAL_VER="file:///local/repos/VER", for example:
r <- c(REVO=RevoUtils::getRevoRepos(),
LOCAL_3.3="file:///local/repos/3.3",
LOCAL_3.2="file:///local/repos/3.2",
LOCAL_3.1="file:///local/repos/3.1")
See Also
Install R Server 8.0.5 for Linux
Install R Server 9.0.1 for Linux
Install R on Hadoop overview
Uninstall Microsoft R Server to upgrade to a newer version
Troubleshoot R Server installation problems on Hadoop
Configure R Server to operationalize analytics
Hadoop installation and configuration for Microsoft
R Server
4/13/2018 • 2 minutes to read • Edit Online
Microsoft R Server is a scalable data analytics server that can be deployed as a single-user workstation, a local
network of connected servers, or on a Hadoop cluster in the cloud. On Hadoop, R Server requires MapReduce,
Hadoop Distributed File System (HDFS ), and Apache YARN. Optionally, Spark version 1.6-2.0 is supported for
Microsoft R Server 9.1.
Platforms and Dependencies
Supported operating systems for Microsoft R Server
Package dependencies for Microsoft R Server installations on Linux and Hadoop
Step-by-Step
Command line installation for any supported platform
Install an R package parcel using Cloudera Manager
Offline installation
Manual package installation
Configure R Server to operationalize R code and host analytic web services
Uninstall Microsoft R to upgrade to newer versions
Configuration
Adjust your Hadoop cluster configuration for R Server workloads
Enforcing YARN queue usage on R Server for Hadoop
Manage your R installation on Linux
Start R workloads
Practice data import and exploration and Hadoop
Practice data import and exploration and Spark
Command line installation for R Server 9.1 on
Hadoop (CDH, HDP, MapR)
6/18/2018 • 10 minutes to read • Edit Online
Looking for the latest release? See Machine Learning Server for Hadoop installation
R Server for Hadoop is supported on Hadoop distributions provided by Cloudera, HortonWorks, and MapR. For
most users, installing R Server on a cluster involves running the same series of steps on each data node of the
cluster. A summary of setup tasks is as follows:
Download the installer
Unpack the distribution
Run the install script with a -p parameter (for Hadoop)
Verify the installation
Repeat on the next data node.
The install script uses an internet connection to download and install missing dependencies, Microsoft R Open
(MRO ), and the .NET Core for Linux. If internet connections are restricted, use the alternate offline instructions
instead.
If you previously installed version 9.0.1, it will be replaced with the 9.1 version. An 8.x version can run side-by-side
9.x, unaffected by the new installation.
Installation requirements
Installation requires administrator permissions and must be performed as a root installation. Non-root
installations are not supported.
R Server must be installed on at least one master or client node which will serve as the submit node; it should be
installed on as many workers as is practical to maximize the available compute resources. Nodes must have the
same version of R Server within the cluster.
Setup checks the operating system and detects the Hadoop cluster, but it doesn't check for specific distributions.
Microsoft R Server works with the Hadoop distributions listed here: Supported platforms
Microsoft R Server requires Hadoop MapReduce, the Hadoop Distributed File System (HDFS ), and Apache YARN.
Optionally, Spark version 1.6-2.0 is supported for Microsoft R Server 9.x.
System requirements
Minimum system configuration requirements for Microsoft R Server are as follows:
Processor: 64-bit CPU with x86-compatible architecture (variously known as AMD64, Intel64, x86-64, IA-32e,
EM64T, or x64 CPUs). Itanium-architecture CPUs (also known as IA-64) are not supported. Multiple-core CPUs
are recommended.
Memory: A minimum of 8 GB of RAM is required for Microsoft R Server; 16 GB or more are recommended.
Hadoop itself has substantial memory requirements; see your Hadoop distribution’s documentation for specific
recommendations.
Disk Space: A minimum of 500 MB of disk space is required on each node for R Server. Hadoop itself has
substantial disk space requirements; see your Hadoop distribution’s documentation for specific recommendations.
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio Dev
Essentials. Developer edition has the
same features as Enterprise, except it is
licensed for development scenarios.
Volume Licensing Service Center (VLSC) Enterprise Sign in, search for R Server for Hadoop.
A selection for R Server 9.1.0 for
Hadoop is provided on this site.
For further verification, check folders and permissions. Following that, you should run the Revo64 program, a
sample Hadoop job, and if applicable, a sample Spark job.
Check folders and permissions
Each user should ensure that the appropriate user directories exist, and if necessary, create them with the following
shell commands:
The HDFS directory can also be created in a user’s R session (provided the top-level /user/RevoShare has the
appropriate permissions) using the following RevoScaleR commands (substitute your actual user name for
"username"). Run the RevoScaleR commands in a Revo64 session.
$ `cd MRS91Hadoop`
$ `Revo64`
> rxHadoopMakeDir("/user/RevoShare/username")
> rxHadoopCommand("fs -chmod uog+rwx /user/RevoShare/username")
2. Start Revo64.
$ cd MRS90Linux
$ Revo64
3. Run a simple local computation. This step uses the proprietary Microsoft libraries.
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.003 seconds
Computation time: 0.010 seconds.
Call:
rxSummary(formula = ~., data = iris)
DayOfWeek Counts
Monday 97975
Tuesday 77725
Wednesday 78875
Thursday 81304
Friday 82987
Saturday 86159
Sunday 94975
rxSetComputeContext(RxHadoopMR(consoleOutput=TRUE))
input <- file.path("/share/SampleData/AirlineDemoSmall.csv")
====== sandbox.hortonworks.com (Master HPA Process) has started run at Fri Jun 10 18:26:15 2016
======
Jun 10, 2016 6:26:21 PM RevoScaleR main
INFO: DEBUG: allArgs = '[-Dmapred.reduce.tasks=1, -libjars=/usr/hdp/2.4.0.0-
169/hadoop/conf,/usr/hdp/2.4.0.0-169/hadoop-mapreduce/hadoop-streaming.jar,
/user/RevoShare/A73041E9D41041A18CB93FCCA16E013E/.input,
/user/RevoShare/lukaszb/A73041E9D41041A18CB93FCCA16E013E/IRO.iro,
/share/SampleData/AirlineDemoSmall.csv, default, 0, /usr/bin/Revo64-8]'
End of allArgs.
16/06/10 18:26:26 INFO impl.TimelineClientImpl: Timeline service address:
7. To quit the program, type q() at the command line with no arguments.
mkdir /mnt/mrsimage
mount –o loop <filename> /mnt/mrsimage
Each command must run on a single logical line, even if it spans two lines below due to space constraints. Lines
beginning with > indicate commands typed into an interactive pdsh session.
Next Steps
Review the following walkthroughs to move forward with using R Server and the RevoScaleR package in Spark
and MapReduce processing models.
Practice data import and exploration on Spark
Practice data import and exploration on MapReduce
Offline installation of R Server 9.1 for Hadoop
6/18/2018 • 6 minutes to read • Edit Online
By default, installers connect to Microsoft download sites to get required and updated components. If firewall
restrictions or limits on internet access prevent the installer from reaching these sites, you can download individual
components on a computer that has internet access, copy the files to another computer behind the firewall,
manually install prerequisites and packages, and then run setup.
If you previously installed version 9.0.1, it will be replaced with the 9.1.0 version. An 8.x version can run side-by-
side 9.x, unaffected by the new installation.
Microsoft R Open 3.3.3 Direct link to microsoft-r- Use the link provided to get
open-3.3.3.tar.gz the required component. Do
NOT go to MRAN and
download the latest or you
could end up with the wrong
version.
Microsoft .NET Core 1.1 .NET Core download site Multiple versions of .NET
Core are available. Be sure to
choose from the 1.1.1
(Current) list.
The .NET Core download page for Linux provides gzipped tar files for supported platforms. In the Runtime
column, click x64 to download a tar.gz file for the operating system you are using. The file name for .NET Core is
dotnet-<linux-os-name>-x64.1.1.1.tar.gz .
Visual Studio Dev Essentials Developer (free) This option provides a zipped file, free
when you sign up for Visual Studio Dev
Essentials. Developer edition has the
same features as Enterprise, except it is
licensed for development scenarios.
Volume Licensing Service Center (VLSC) Enterprise Sign in, search for "SQL Server 2016
Enterprise edition", and then choose a
per-core or CAL licensing option. A
selection for R Server for Hadoop
9.1.0 is provided on this site.
NOTE
It's possible your Linux machine already has package dependencies installed. By way of illustration, on a few systems, only
libpng12 had to be installed.
Transfer files
Use a tool like SmarTTY or PuTTY or another mechanism to upload or transfer files to a writable directory, such as
/tmp, on your internet-restricted server. Files to be transferred include the following:
dotnet-<linux-os-name>-x64.1.1.1.tar.gz
microsoft-r-open-3.3.3.tar.gz
en_microsoft_r_server_910_for_hadoop_x64_10323951.tar.gz
any missing packages from the dependency list
IMPORTANT
Do not unpack MRO yourself. The installer looks for a gzipped tar file for MRO.
2. A new folder called MRS91Hadoop is created under /tmp. This folder contains files and packages used
during setup. Copy the gzipped MRO tar file to the new MRS91Hadoop folder containing the installation
script (install.sh).
[root@localhost tmp] $ cp microsoft-r-open-3.3.3.tar.gz /tmp/MRS91Hadoop
2. Run the script with the -p parameter, specifying the Hadoop component. Optionally, add the pre-trained
machine learning models.
[root@localhost MRS91Hadoop] $ bash install.sh -h -m
3. When prompted to accept the license terms for Microsoft R Open, click Enter to read the EULA, click q
when you are finished reading, and then click y to accept the terms.
4. Repeat EULA acceptance for Microsoft R Server.
Installer output shows the packages and location of the log file.
Verify installation
1. List installed packages and get package names:
[MRS91Hadoop] $ yum list \*microsoft\*
Start Revo64
As a verification step, run the Revo64 program.
1. Switch to the directory containing the executable:
$ cd MRS91Hadoop
3. Run an R function, such as rxSummary on a dataset. Many sample datasets, such as the iris dataset, are
ready to use because they are installed with the software:
> rxSummary(~., iris)
Output from the iris dataset should look similar to the following:
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.001 seconds
Computation time: 0.005 seconds.
Call:
rxSummary(formula = ~., data = iris)
Species Counts
setosa 50
versicolor 50
virginica 50
To quit the program, type q() at the command line with no arguments.
Next Steps
Review the following walkthroughs to move forward with using R Server and the RevoScaleR package in Spark
and MapReduce processing models.
Practice data import and exploration on Spark
Practice data import and exploration on MapReduce
Review the best practices in Manage your R Server for Linux installation for instructions on how to set up a local
package repository using MRAN or miniCRAN, change file ownership or permissions, set Revo64 as the de facto
R script engine on your server.
See Also
Supported platforms
What's new in R Server
Install R Server 9.1 on the Cloudera distribution of
Apache Hadoop (CDH)
4/13/2018 • 2 minutes to read • Edit Online
Looking for the latest release? See Machine Learning Server for Cloudera installation
Cloudera offers a parcel installation methodology for adding services and features to a cluster. If you prefer parcel
installation over the regular install script used for deploying R Server on other Hadoop distributions, you can use
functionality we provide to create the parcel.
If you've used parcel installation in previous releases of Microsoft R Server, the 9.1.0 release is enhanced in two
respects. First, instead of using pre-built parcels downloaded from Microsoft, you can generate your own parcel
using a new generate_mrs_parcel.sh script. Secondly, we added support for Custom Service Descriptors (CSDs),
which means you can now deploy, configure, and monitor R Server in CDH as a managed service in Cloudera
Manager.
The new revised workflow for parcel installation is a two-part exercise:
Part 1: At the console, run script to output parcel and CSD files
Part 2: In Cloudera Manager, deploy parcels and add MRS as a managed service
Download and unpacking the distribution remains the same. Instructions are included in Part 1.
Feature restrictions in a parcel installation
R Server includes two packages, MicrosoftML and mrsdeploy , that either cannot be included in the parcel, or
included only if the underlying operating system is a specific platform and version.
MicrosoftML is conditionally available. The package can be included in the parcel if the underlying
operating system is CentOS/RHEL 7.x. If CDH runs on any other operating system, including an earlier
version of RHEL, the MicrosoftML package cannot be included.
mrsdeploy is excluded from a parcel installation. This package has a .NET Core dependency and cannot be
added to a parcel.
The workaround is to perform a manual installation of individual packages. For instructions, see Manual package
installation.
See Also
R Server Installation on Hadoop Overview
Uninstall R Server on Hadoop or Linux to upgrade
to a newer version
6/18/2018 • 4 minutes to read • Edit Online
This article explains how to uninstall Microsoft R Server on Hadoop or Linux. Unless you are upgrading from
9.0.1 to the the latest version 9.1, upgrade requires that you first uninstall the existing deployment before
installing a new distribution.
For 9.0.1-to-9.1, the install script automatically removes previous versions of R Server or Microsoft R Open
3.3.2 if they are detected so that setup can install newer versions.
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under microsoft-r.
This command is destructive and irrevocable, so be sure you have the correct directory before you press
Enter.
Repeat on each node in the cluster.
2. On the root node, verify the location of other files that need to be removed: `
ls /usr/lib64/microsoft-r/8.0
rm -fr /usr/lib64/microsoft-r
RM removes the folder. Parameter "f" is for force and "r" for recursive, deleting everything under microsoft-r.
This command is destructive and irrevocable, so be sure you have the correct directory before you press
Enter.
rm -rf /usr/lib64/MRS-8.0
rm -rf /usr/lib64/MRO-for-MRS-8.0.0
3. Remove symlinks:
rm -f /usr/bin/Revo64 /usr/bin/Revoscript
rpm -e microsoft-r-server-hadoop-8.0-8.0.5-1.x86_64
rpm -e microsoft-r-server-packages-8.0-8.0.5-1.x86_64
rpm -e microsoft-r-server-intel-mkl-8.0-8.0.5-1.x86_64
rpm -e microsoft-r-server-mro-8.0-8.0.5-1.x86_64
The following instructions are for installation of R Server 9.0.1 for Hadoop.
Side-by-side Installation
You can install major versions of R Server (such as an 8.x and 9.x) side-by-side on Hadoop, but not minor versions.
For example, you already installed Microsoft R Server 8.0, you must uninstall it before installing 8.0.5.
Upgrade Versions
If you want to replace an older version rather than run side-by-side, you can uninstall the older distribution before
installing the new version (there is no in-place upgrade). See Uninstall Microsoft R Server to upgrade to a newer
version for instructions.
Installation Steps
A summary of setup tasks is as follows:
Download software.
Unzip to extract packages and an install script (install.sh)
Run the install script with a -p parameter (for Hadoop)
Verify the installation
The install script downloads and installs Microsoft R Open (microsoft-r-server-mro-9.0.x86_64.rpm). This
distribution provides the following packages that are new in this version:
microsoft-r-server-intel-mkl-9.0.rpm
microsoft-r-server-packages-9.0.rpm
microsoft-r-server-hadoop-9.0.rpm
In contrast with previous releases, this version comes with a requirement for root installation. Non-root
installations are not supported.
System requirements
R Server must be installed on at least one master or client node which will serve as the submit node; it should be
installed on as many workers as is practical to maximize the available compute resources. Nodes must have the
same version of R Server within the cluster.
Setup checks the operating system and detects the Hadoop cluster, but it doesn't check for specific distributions.
Microsoft R Server works with the Hadoop distributions listed here: Supported platforms
Microsoft R Server requires Hadoop MapReduce, the Hadoop Distributed File System (HDFS ), and Apache YARN.
Optionally, Spark version 1.6-2.0 is supported for Microsoft R Server 9.0.1.
In this version, the installer should provide most of the dependencies required by R Server, but if the installer
reports a missing dependency, see Package Dependencies for Microsoft R Server installations on Linux and
Hadoop for a complete list of the dependencies required for installation.
Minimum system configuration requirements for Microsoft R Server are as follows:
Processor: 64-bit CPU with x86-compatible architecture (variously known as AMD64, Intel64, x86-64, IA-32e,
EM64T, or x64 CPUs). Itanium-architecture CPUs (also known as IA-64) are not supported. Multiple-core CPUs
are recommended.
Memory: A minimum of 8 GB of RAM is required for Microsoft R Server; 16 GB or more are recommended.
Hadoop itself has substantial memory requirements; see your Hadoop distribution’s documentation for specific
recommendations.
Disk Space: A minimum of 500 MB of disk space is required on each node for R Server. Hadoop itself has
substantial disk space requirements; see your Hadoop distribution’s documentation for specific recommendations.
For further verification, check folders and permissions. Following that, you should run the Revo64 program, a
sample Hadoop job, and if applicable, a sample Spark job.
Check folders and permissions
Each user should ensure that the appropriate user directories exist, and if necessary, create them with the following
shell commands:
The HDFS directory can also be created in a user’s R session (provided the top-level /user/RevoShare has the
appropriate permissions) using the following RevoScaleR commands (substitute your actual user name for
"username"). Run the RevoScaleR commands in a Revo64 session.
$ `cd MRS90HADOOP`
$ `Revo64`
> rxHadoopMakeDir("/user/RevoShare/username")
> rxHadoopCommand("fs -chmod uog+rwx /user/RevoShare/username")
2. Start Revo64.
$ cd MRS90Linux
$ Revo64
3. Run a simple local computation. This step uses the proprietary Microsoft libraries.
Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.003 seconds
Computation time: 0.010 seconds.
Call:
rxSummary(formula = ~., data = iris)
DayOfWeek Counts
Monday 97975
Tuesday 77725
Wednesday 78875
Thursday 81304
Friday 82987
Saturday 86159
Sunday 94975
====== sandbox.hortonworks.com (Master HPA Process) has started run at Fri Jun 10 18:26:15 2016
======
Jun 10, 2016 6:26:21 PM RevoScaleR main
INFO: DEBUG: allArgs = '[-Dmapred.reduce.tasks=1, -libjars=/usr/hdp/2.4.0.0-
169/hadoop/conf,/usr/hdp/2.4.0.0-169/hadoop-mapreduce/hadoop-streaming.jar,
/user/RevoShare/A73041E9D41041A18CB93FCCA16E013E/.input,
/user/RevoShare/lukaszb/A73041E9D41041A18CB93FCCA16E013E/IRO.iro,
/share/SampleData/AirlineDemoSmall.csv, default, 0, /usr/bin/Revo64-8]'
End of allArgs.
16/06/10 18:26:26 INFO impl.TimelineClientImpl: Timeline service address:
7. To quit the program, type q() at the command line with no arguments.
Manual Installation
An alternative to running the install.sh script is manual installation of each package and component, or building a
custom script that satisfies your technical or operational requirements.
Assuming that the packages for Microsoft R Open and Microsoft R Server are already unpacked, a manual or
custom installation must create the appropriate folders and set permissions.
RPM or DEB Installers
/var/RevoShare/ and hdfs://user/RevoShare must exist and have folders for each user running Microsoft R
Server in Hadoop or Spark.
/var/RevoShare/<user> and hdfs://user/RevoShare/<user> must have full permissions (all read, write, and
executive permissions for all users).
Cloudera Parcel Installers
1. Create /var/RevoShare/ and hdfs://user/RevoShare . Parcels cannot create them for you.
2. Give /var/RevoShare/<user> and hdfs://user/RevoShare/<user> for each user.
3. Grant full permissions to both /var/RevoShare/<user> and hdfs://user/RevoShare/<user> .
Distributed Installation
If you have multiple nodes, you can automate the installation across nodes using any distributed shell. (You can, of
course, automate installation with a non-distributed shell such as bash using a for-loop over a list of hosts, but
distributed shells usually provide the ability to run commands over multiple hosts simultaneously.) Examples
include dsh ("Dancer’s shell"), pdsh (Parallel Distributed Shell), PyDSH (the Python Distributed Shell), and fabric.
Each distributed shell has its own methods for specifying hosts, authentication, and so on, but ultimately all that is
required is the ability to run a shell command on multiple hosts. (It is convenient if there is a top-level copy
command, such as the pdcp command that is part of pdsh, but not necessary. The “cp” command can always be
run from the shell.)
Download Microsoft R Open rpm and the Microsoft R Server installer tar.gz file and copy all to /tmp.
1. Mount the IMG file. The following commands create a mount point and mount the file to that mount point:
mkdir /mnt/mrsimage
mount –o loop <filename> /mnt/mrsimage