0% found this document useful (0 votes)
165 views2,320 pages

Machine Learning Server Guide

This document provides an overview and instructions for installing, configuring, and using Microsoft Machine Learning Server. It covers supported platforms for installation like Windows, Linux, Hadoop, and Azure. It also describes how to configure the server for operationalization, authentication, security, and administration. The document provides quickstarts, tutorials, samples and solutions for using the Python and R APIs.

Uploaded by

Varsha Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
165 views2,320 pages

Machine Learning Server Guide

This document provides an overview and instructions for installing, configuring, and using Microsoft Machine Learning Server. It covers supported platforms for installation like Windows, Linux, Hadoop, and Azure. It also describes how to configure the server for operationalization, authentication, security, and administration. The document provides quickstarts, tutorials, samples and solutions for using the Python and R APIs.

Uploaded by

Varsha Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Contents

Machine Learning Server Documentation


Overview
About Machine Learning Server
What's new
R Server's new name
Install & configure
Supported platforms
Windows
Install on Windows
Offline install
Command line install
Uninstall from Windows
Install R/Python packages
Linux
Install on Linux
Offline install
Uninstall from Linux
Install R/Python packages
Hadoop
Install on Cloudera
Install on Hadoop
Uninstall from Hadoop
Configure to operationalize
Get started: admins
Configure: One-box
9.3
9.2.1
9.0/9.1
Configure: Enterprise
9.3
9.2.1
9.0/9.1
Launch admin CLI
LDAP/AAD authentication
SSL/TLS connection security
Diagnostics & troubleshooting
Roles & permissions
Change databases
Stop & start nodes
Declare compute nodes
Encrypt credentials
Set local password
Update port numbers
Evaluate capacity
Enable CORS
R execution security
R package management
Default file paths
Azure cloud
Overview
Data Science VM
Azure VMs
Client-side
Microsoft R Client
Install on Windows
Install on Linux
Server compatibility
Install Python client
Link Python to tools
Configure multi-user Jupyter Notebooks
Older R Server releases
Prior feature announcements
Prior feature announcements
On Windows
9.1 - Install
9.1 - Offline
9.1 - Command line
On Linux
9.1 - Install
9.1 - Offline
9.1 - Uninstall
9.0.1 - Install
8.0.5 - Install
Manage your R installation
On Hadoop
9.1 - Install
9.1 - Commandline
9.1 - Offline
9.1 - Cloudera
9.1 - Uninstall
9.0.1 - Install
9.0.1 - Cloudera
8.0.5 - Install
R Package dependency list
Manual R package install
Hadoop configuration
Troubleshoot R installation
On Teradata
Install R Server 9.x on a Teradata Server
Install R Server 8.x on a Teradata Server
Install R Server on a Teradata Client
Get started RevoScaleR on Teradata
Quickstarts
Python
Deploy model as service
Integrate realtime service into app with Swagger
Run binary classifications
Create a linear regression model
R
Run R code with new functions
Deploy model as service
Tutorials
Python
PySpark and revoscalepy interoperability
R
Explore R-to-RevoScaleR
Import & transform data
Visualize & analyze data
Work with larger datasets
Flight delays data analysis
Loan data analysis
Census data analysis
Tips on big data computing
Samples & solutions
Python
Python samples for MicrosoftML
R
Sample data in RevoScaleR
RevoScaleR rxExecBy parallel processing example
R Server with Sparklyr example
R samples for MicrosoftML
Solution templates
Concepts
Compute context
Distributed computing
Web services
Pre-trained models
MicrosoftML
RevoScaleR
How-to guides
Data & models
Python
Use revoscalepy on Spark
R
Set a compute context
Data access and manipulation
Data transformations
XDF files
Import text data
Import SQL Server data
Import ODBC data
Import HDFS files
Use data source objects
Transform & subset data
Sort data
Split data
Merge data
Summarization
Statistical summaries
Crosstabs
Visualization
Data modeling
Linear regression
Logistic regression
Generalized linear
Decision tree
Decision forest
Estimating with stochastic gradient boosting
Naive Bayes Classification
Clustering Classification
Correlate data
Use RevoScaleR on Hadoop
Spark
MapReduce
RevoScaleR functions for distributed analysis
Background jobs
Parallel jobs using rxExec
Enforce a YARN queue assignment
Choose a MicrosoftML algorithm
Operationalize models & code
Python
Authenticate in Python
Deploy & manage web services
Consume services synchronously
Consume services asynchronously
Create and manage session pools
R
Deploy & manage web services
Consume services synchronously
Consume services asynchronously
Create and manage session pools
DeployR 8.x [Archive]
How to install DeployR
Install DeployR for R Server for Windows
Install DeployR for Microsoft R Server 8.0.5 on Linux
Install DeployR 8.0.0
Getting Started with DeployR
About DeployR 8.x
Getting Started for Application Developers
Getting Started for Administrators
Getting Started for Data Scientists
Administration & Configuration
Administration Console Help
About DeployR Administration Console
Creating & Managing User Accounts
Managing Permissions with Roles
Managing R Scripts
Managing R Boundaries
Managing Access with IP Filters
Managing the Grid
Managing Server Policies
Restoring & Backing Up the Database
Monitoring Events
Common Administrative Tasks
Troubleshooting & Diagnostics
Scale & Throughput
DeployR in the Cloud
Server & Grid High Availability
Managing Big Data
Using Hadoop Impersonation & DeployR
R Package Management
Updating DeployR after Java Update
Reinstalling or Upgrading the R Dependency
Security on DeployR
Introduction
Authentication & Authorization
HTTPS & SSL/TLS Support
Server Access Policies
Project & Repository File Access Controls
Password Policies
Account Locking Policies
RServe Execution Context
APIs & Client Libraries
Developer Docs & Downloads
API Overview
Client Library Tutorial
RBroker Framework Tutorial
API Explorer Tool
Writing Portable R Code
Repository Manager Help
About Repository Manager
Working with Directories
Working with Files
Testing & Debugging Scripts
APIs
About the REST APIs
Integrate services into apps
Manage access tokens
Run R code remotely
Connect to remote server
Execute code remotely
Advanced R development
Write custom chunking algorithms
Write custom analyses for large data sets
Convert model objects for use with PMML
Manage threads
Parallel loops using foreach
Parallel execution using doRSR
Parallel algorithms with PemaR
Reference
Python packages
azureml-model-management-sdk
DeployClient
MLServer
Operationalization
OperationalizationDefinition
ServiceDefinition
RealtimeDefinition
Service
ServiceResponse
Batch
BatchResponse
microsoftml
categorical
categorical_hash
concat
count_select
drop_columns
extract_pixels
featurize_image
featurize_text
get_sentiment
load_image
mutualinformation_select
resize_image
rx_ensemble
rx_fast_forest
rx_fast_linear
rx_fast_trees
rx_featurize
rx_logistic_regression
rx_neural_network
rx_oneclass_svm
rx_predict
select_columns
revoscalepy
rx_btrees
rx_cancel_job
rx_cleanup_jobs
RxDataSource
rx_data_step
rx_delete_object
rx_dforest
rx_dtree
rx_exec
rx_exec_by
rx_get_compute_context
rx_get_info
rx_get_job_info
rx_get_job_output
rx_get_job_results
rx_get_jobs
rx_get_job_status
rx_get_partitions
rx_get_pyspark_connection
rx_get_var_info
rx_get_var_names
rx_import
RxInSqlServer
rx_hadoop_command
rx_hadoop_copy_from_local
rx_hadoop_copy_to_local
rx_hadoop_copy
rx_hadoop_file_exists
rx_hadoop_list_files
rx_hadoop_make_dir
rx_hadoop_move
rx_hadoop_remove_dir
rx_hadoop_remove
RxHdfsFileSystem
RxHiveData
rx_lin_mod
rx_list_keys
RxLocalSeq
rx_logit
RxMissingValues
RxNativeFileSystem
RxOdbcData
RxOptions
RxOrcData
RxParquetData
rx_partition
rx_predict
rx_predict_default
rx_predict_rx_dtree
rx_predict_rx_dforest
rx_privacy_control
rx_read_object
rx_read_xdf
RxRemoteJob
RxRemoteJobStatus
rx_set_compute_context
rx_set_var_info
rx_serialize_model
RxSpark
RxSparkData
RxSparkDataFrame
rx_spark_cache_data
rx_spark_connect
rx_spark_disconnect
rx_spark_list_data
rx_spark_remove_data
RxSqlServerData
rx_summary
RxTextData
rx_wait_for_job
rx_write_object
RxXdfData
R packages
MicrosoftML
categorical
categoricalHash
concat
extractPixels
fastForest
fastLinear
fastTrees
featurizeImage
featurizeText
getSentiment
loadImage
logisticRegression
loss
minCount
mlModel
mutualInformation
NeuralNet
ngram
OneClassSvm
optimizer
resizeImage
rxEnsemble
rxFastForest
rxFastLinear
rxFastTrees
rxFeaturize
rxHashEnv
rxLogisticRegression
rxNeuralNet
rxOneClassSvm
rxPredict
selectColumns
selectFeatures
mrsdeploy
configureServicePool
createSnapshot
deleteRemoteFile
deleteService
deleteServicePool
deleteSnapshot
diffLocalRemote
downloadSnapshot
getPoolStatus
getRemoteFile
getRemoteObject
getRemoteWorkspace
getService
listRemoteFiles
listServices
listSnapshots
loadSnapshot
print.serviceDetails
print.snapshotDetails
publishService
putLocalFile
putLocalObject
putLocalWorkspace
remoteCommandLine
remoteExecute
remoteLogin
remoteLoginAAD
remoteLogout
remoteScript
request
resume
serviceOption
serviceTypes
summary.serviceDetails
summary.snapshotDetails
updateService
olapR
Execute2D
ExecuteMD
Explore
OlapConnection
Query
RevoIOQ
RevoPemaR
PemaBaseClass-class
PemaBaseClass
PemaByGroup-class
PemaByGroup
pemaCompute
PemaMean-class
PemaMean
setPemaClass
RevoScaleR
Data sets
AirlineData87to08
AirlineDemoSmall
AirOnTime87to12
CensusUS5Pct2000
CensusWorkers
claims
DJIAdaily
Kyphosis
mortDefaultSmall
Functions
as.gbm
as.glm
as.kmeans
as.lm
as.naiveBayes
as.randomForest
as.rpart
as.xtabs
prune.rxDTree
rxAddInheritance
rxBTrees
rxCancelJob
rxChiSquaredTest
rxCleanup
rxCompareContexts
rxCompressXdf
RxComputeContext-class
RxComputeContext
rxCovCor
rxCovRegression
rxCreateColInfo
rxCrossTabs
rxCube
RxDataSource-class
RxDataSource
rxDataStep
rxDForest
rxDForestUtils
RxDistributedHpa-class
rxDistributeJob
rxDTree
rxDTreeBestCp
rxElemArg
rxExec
rxExecBy
rxExecByPartition
rxExecuteSQLDDL
rxExpression
rxFactors
RxFileData-class
RxFileSystem
rxFindFileInPath
rxFindPackage
RxForeachDoPar-class
RxForeachDoPar
rxFormula
rxGetAvailableNodes
rxGetEnableThreadPool
rxGetFuzzyDist
rxGetFuzzyKeys
rxGetInfoXdf
rxGetJobInfo
rxGetJobOutput
rxGetJobResults
rxGetJobs
rxGetNodeInfo
rxGetPartitions
rxGetSparklyrConnection
rxGetVarInfo
rxGetVarNames
rxGLM
rxHadoopCommand
RxHadoopMR-class
RxHadoopMR
rxHdfsConnect
RxHdfsFileSystem
rxHistogram
RxHPCServer-class
rxImport
RxInSqlServer-class
RxInSqlServer
rxInstalledPackages
rxInstallPackages
rxKmeans
rxLaunchClusterTaskManager
rxLinePlot
rxLinMod
RxLocalParallel-class
RxLocalParallel
RxLocalSeq-class
RxLocalSeq
rxLocateFile
rxLogit
rxLorenz
rxMakeRNodeNames
rxMarginals
rxMergeXdf
rxMultiTest
rxNaiveBayes
RxNativeFileSystem
rxNew
rxOAuthParameters
RxOdbcData-class
RxOdbcData
rxOpen-methods
rxOptions
rxPackage
rxPairwiseCrosstab
rxPingNodes
rxPartition
rxPredict
rxPredict.rxDForest
rxPredict.rxDTree
rxPredict.rxNaiveBayes
rxPrivacyControl
rxQuantile
rxReadXdf (deprecated)
rxRealtimeScoring
rxRemoteCall
rxRemoteFilePath
rxRemoteGetId
rxRemoteHadoopMRCall
rxRemovePackages
rxResultsDF
rxRiskRatio
rxRng
rxRoc
RxSasData-class
RxSasData
rxSerializeModel
rxSetComputeContext
rxSetFileSystem
rxSetInfo
rxSetVarInfoXdf
rxSortXdf
RxSpark-class
RxSpark
rxSparkCacheData
RxSparkData
rxSparkDataOps
rxSplitXdf
RxSpssData-class
RxSpssData
rxSqlLibPaths
RxSqlServerData-class
RxSqlServerData
rxSqlServerDropTable
rxStepControl
rxStepPlot
rxStopEngine
rxSummary
rxSyncPackages
RxTeradata-class
RxTeradata
rxTeradataSql
RxTextData-class
RxTextData
rxTextToXdf
rxTlcBridge
rxTransform
rxTweedie
rxUnserializeModel
rxWaitForJob
rxWriteObject
RxXdfData-class
RxXdfData
rxXdfFileName
rxXdfToText
Base R-to-RevoScaleR comparison
Defunct functions
Deprecated functions
Hadoop functions
SQL Server functions
Teradata functions
RevoUtils
getRevoRepos
readNews
Revo.home
RevoInfo
totalSystemMemory
sqlrutils
executeStoredProcedure
getInputParameters
InputData
InputParameter
OutputData
OutputParameter
registerStoredProcedure
setInputDataQuery
setInputParameterValue
StoredProcedure
Resources
Product comparison
Servicing support policy
Known issues
Deprecated & discontinued features
Opt out of usage data collection
Additional resources
Welcome to Machine Learning Server
4/13/2018 • 4 minutes to read • Edit Online

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.

Why choose Machine Learning Server


Microsoft Machine Learning Server includes:
High-performance machine learning and AI wherever your data lives
The volume of the data used by enterprises to make informed business decisions is growing
exponentially. With Machine Learning Server, Microsoft takes the modern approach of bringing the
computation to the data in order to unlock intelligence. Over time this data often spreads across
multiple data platforms creating the challenge of how to get AI to where your data is. Machine
Learning Server runs on-premises and in the cloud on a variety of platforms, in a variety of
deployments, and can support the need to have machine learning and analytics across multiple
platforms.
The best AI innovation from Microsoft and open-source
Microsoft strives to make AI accessible to every individual and organization. Microsoft Machine
Learning Server includes a rich set of highly-scalable, distributed set of algorithms such as
RevoscaleR, revoscalepy, and microsoftML that can work on data sizes larger than the size of
physical memory, and run on a wide variety of platforms in a distributed manner. Learn more about
the collection of Microsoft's custom R packages and Python packages included with the product.
Machine Learning Server bridges these Microsoft innovations and those coming from the open-
source community (R, Python and AI toolkits) all on top of a single enterprise-grade platform. Any R
or Python open-source machine learning package can work side by side with any proprietary
innovation from Microsoft.
Simple, secure, and high-scale operationalization and administration
Enterprises relying on traditional operationalization paradigms and environments end up investing
much time and effort towards this area. Pain points often resulting in inflated costs and delays
include: the translation time for models, iterations to keep them valid and current, regulatory
approval, managing permissions through operationalization.
Machine Learning Server offers best-in-class operationalization -- from the time a machine learning
model is completed, it takes just a few clicks to generate web services APIs. These web services are
hosted on a server grid on-premises or in the cloud and can be integrated with line-of-business
applications. Additionally, Machine Learning Server integrates seamlessly with Active Directory and
Azure Active Directory and includes role-based access control to satisfy security and compliance
needs of your enterprise. The ability to deploy to an elastic grid lets you scale seamlessly with the
needs of your business, both for batch and real-time scoring.
Deep ecosystem engagements to deliver customer success with optimal total cost of
ownership
Individuals embarking on the journey of making their applications intelligent or simply wanting to
learn the new world of AI and machine learning, need the right resources to help them get started. In
addition to this documentation, Microsoft provides several learning resources and has engaged
several training partners to help you ramp up and become productive quickly.

Key features of Machine Learning Server


The following features are included in Machine Learning Server. For feature descriptions in this release, see
What's New in Machine Learning Server.

FEATURE CATEGORY DESCRIPTION

R-enabled R packages for solutions written in R, with an open-source


distribution of R and run-time infrastructure for script
execution. Everything you had in R Server and more.

Python-enabled Python modules for solutions written in Python, with an


open-source distribution of Python and run-time
infrastructure for script execution.

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.

Remote execution Start remote sessions on a Machine Learning Server on


your network from your client workstation.

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.

FEATURE AREA DETAILS

Administration command line interface Operationalization Refactored tooling for Machine


Learning Server configuration. The new
command line interface is similar to
Azure CLIs and offers full parity with
the previous utility.

Use the tool to enable web service


deployment, web and compute node
designations, and remote execution (R
only). You can also manage ports,
nodes, credentials; run diagnostic
reports; and test the capacity and
throughput of web services you create.
FEATURE AREA DETAILS

Dedicated session pools Operationalization You can construct a dedicated session


pool for a specific web service to
provide ready-to-use connections with
preloaded dependencies for fast access
to production code. This capability is in
addition to the generic session pools
that you can establish server-wide as a
shared resource for all web services.
Configure in R | Configure in Python.

For R script, the mrsdeploy function


library provides three new functions
for managing dedicated sessions:
configureServicePool, getPoolStatus,
deleteServicePool.

For Python, the azureml-model-


management-sdk provides the
following methods in the mlserver
class: create_or_update_service_pool,
delete_service_pool,
get_service_pool_status.

CDH 5.12 Supported platforms Version 5.12 of Cloudera distribution


of Apache Hadoop (CDH) is now
supported for Machine Learning Server
for Hadoop.

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.

FEATURE LANGUAGE DETAILS

revoscalepy Python The first release of this library, used for


distributed computing, local compute
context, remote compute context for
SQL Server and Spark 2.0-2.1 over the
Hadoop Distributed File System
(HDFS), and high-performance
algorithms for Python. This library is
similar to RevoScaleR for R.

microsoftml Python The first release of this library, used for


machine learning algorithms and data
mining. This library is similar to
MicrosoftML for R.)

Pre-trained models Python Ready-to-use machine learning models


for image classification and sentiment
detection articulated in Python.
FEATURE LANGUAGE DETAILS

azureml-model-management-sdk Python The first release of this library, used to


library programmatically build web services
encapsulating your Python script.

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).

Realtime model scoring R Now supported on Linux.

Role-based access control (RBAC) Both RBAC was extended with a new explicit
Reader role.

Administration utility update Both The utility simplifies registration of


compute nodes with web nodes.

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.

Building on our commitment to R


Microsoft continues its commitment and development in R -- not only in the latest Machine Learning Server
release, but also in the newest Microsoft R Client and Microsoft R Open releases.

Upgrade to Machine Learning Server


Moving from R Server to Machine Learning Server is as easy as ever. The R analytics and web services you
developed under R Server will continue to work under Machine Learning Server.
1. Follow these instructions to install Machine Learning Server on Windows, Linux, and Hadoop.
2. Don't forget to upgrade your web and compute nodes if you are operationalizing your analytics.

NOTE
Note that Microsoft R Server 9.1 for Teradata was the last release and will not have a Machine Learning Server equivalent.

Download prior R Server releases


The following table provides links for downloading older versions of Microsoft R Server. Find the instructions for
installing R Server here.
Want the new Machine Learning Server? Learn how to install Machine Learning Server here.

SITE FOR R SERVER EDITION DETAILS

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.

From Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.

Get support for R Server


Microsoft is committed to providing customers with support. Microsoft R Server support continues in these ways:
Review our servicing support timeline
Post in our user forum

The future of Microsoft R Client


Microsoft R Client continues on as an R -only client for Machine Learning Server and R Server.
A Python interpreter can also be installed locally along with the custom Python packages to gain similar
functionality on a Windows machine. Learn more.
Install and configure Machine Learning Server
5/2/2018 • 2 minutes to read • Edit Online

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.

Client and server multi-user topology


A client-server configuration is more common in a team environment. You can install free Python client libraries
or free R Client on any workstation, write script on the workstation, and then deploy script as a web service to a
Machine Learning Server configured to operationalize analytics, thus extending your options for interacting with
and consuming script on a server.
For R development only, you can also use remote execution in this configuration: switch from local to remote
server within a session to write and run script interactively.
On the consumption side, you can write custom apps or consume an R or Python solution as a web service.

Large scale multi-user topologies


Scale-out topologies are available in two forms. One option is to use a distributed platform like Hadoop
MapReduce or Spark (on Linux). A second option is to install Machine Learning Server on multiple computers
(Windows or Linux), each one configured as either a web node or compute node that work together.
For Hadoop and Spark, you can write and run script locally and then push the compute context to the Hadoop or
Spark cluster. For web and compute nodes, use the operationalization capabilities in Machine Learning Server to
distribute workloads on appropriate nodes.
Choose a platform
Machine Learning Server runs on Windows, Linux, and Hadoop. Review the supported platforms list for specific
operating system versions.

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.

Machine Learning Server 9.3


In this release, R support includes Microsoft R Open 3.4.3, based on R -3.4.3. Python support is based on
Anaconda 4.2 over Python 3.5. We support Apache Spark 2.0 through 2.2 on Hadoop distributions CDH,
HDP, or MapR.
Operationalization is available on server platforms, on operating systems supporting .NET Core, version 2.0.
MicrosoftML (R ) has a .NET Core dependency for scoring, but runs on both client and server operating
systems. These requirements affect feature availability on some platforms.

OPERATING SYSTEM OR
PLATFORM SKU OPERATIONALIZATION? MICROSOFTML FOR R?

Windows 10 Machine Learning Server No Yes


Windows 8.1 for Windows
Windows 7 SP1 (developer edition)

Windows Server 2016 Machine Learning Server Yes Yes


Windows Server 2012 R2 for Windows

CentOS/ RedHat 6.x - 7.x Machine Learning Server 6.x - No 6.x - No


for Linux 7.x - Yes 7.x - Yes

Ubuntu 14.04 Machine Learning Server Yes Yes


Ubuntu 16.04 for Linux

SUSE Linux Enterprise Machine Learning Server No No


Server 11 SP3 and above for Linux

Cloudera CDH 5.7-5.12 Cloudera Manager No All nodes


installation
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.

Machine Learning Server 9.2.1


R support includes Microsoft R Open 3.4.1, which is based on R -3.4.1. Python support is based on Anaconda
4.2 over Python 3.5.

SKU PLATFORMS

Machine Learning Hadoop Distributions: Cloudera CDH 5.7-5.11,


Server for Hadoop Hortonworks HDP 2.4-2.6, MapR 5.0-5.2
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.

Operating Systems: Red Hat Enterprise Linux 6.x and 7.x,


SUSE Linux Enterprise Server 11 1, Ubuntu 14.04 and
16.04

Spark 2.0 through 2.2 on Hadoop distributions CDH, HDP,


or MapR.

Machine Learning Server can be configured on


CentOS/RHEL 7.x or Ubuntu to operationalize on edge
nodes only.

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.

Microsoft R Server 9.1


All SKUs include Microsoft R Open 3.3.3, based on R -3.3.3, and require 64-bit operating systems with x86-
compatible Intel architecture.
SKU PLATFORMS

R Server for Hadoop Hadoop 1, 5 Distributions:


Cloudera CDH 5.5-5.9, Hortonworks HDP 2.3-2.5, MapR
5.0-5.2
Operating Systems:
RHEL 6.x and 7.x, SUSE Linux Enterprise Server 11 (SLES11)
(2 , 4 ), Ubuntu 14.04 (2 )
Spark 3:
Versions 1.6 and 2.0.

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 Windows Windows 7 SP1(4 ), Windows 8.1(4 ), Windows 10(4 )


Windows Server 2012 R2, Windows Server 2016

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.

Microsoft R Server 9.0.1


This release of R Server is built atop Microsoft R Open 3.3.2, which is based on R -3.3.2.
Microsoft R Server (Windows or Linux)
Windows 7 SP1, Windows 8.1, Windows 10, Windows Server 2012 R2, and Windows Server 2016
Red Hat Enterprise Linux (RHEL ) and CentOS 6.x and 7.x
SUSE Linux Enterprise Server 11 (SLES11)
Ubuntu 14.04 and 16.04
Microsoft R Server for Teradata
Teradata Database 14.10, 15.00, 15.10
Operating System: SLES11
SQL Server R Services or R Server (Standalone)
SQL Server vNext CTP 1.1
Operating System: Windows (see SQL Server hardware and software requirements for details)
Microsoft R Server for Hadoop
Hadoop Distributions: Cloudera CDH 5.5-5.9, Hortonworks HDP 2.3-2.5, MapR 5.0-5.2
Operating Systems: RHEL 6.x and 7.x, SUSE SLES11, Ubuntu 14.04 (excluding Cloudera Parcel install on
Ubuntu)
Spark versions: 1.6 and 2.0. 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.
Operationalization and mrsdeploy
After installation, you can configure R Server to operationalize your R analytics. Due to an ASP .Net Core
dependency, operationalization is currently supported only on:
Windows: Windows Server 2012 R2, Windows Server 2016
Linux: CentOS/RHEL 7.x, Ubuntu 14.04 and 16.04 Note: Projected availability on SLES in 2017
Hadoop: Linux-based edge nodes on CentOS/RHEL 7.x, Ubuntu 14.04

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.

Microsoft R Server 8.0.5


This release of R Server is built atop Microsoft R Open 3.3.2, which is based on R -3.3.2.
Operating Systems (64-Bit only)
Red Hat Enterprise Linux (RHEL ) 6.x and 7.x, or CentOS
SUSE Linux Enterprise Server 11 (SLES11)
Microsoft R Server for Teradata
Teradata Database 14.10, 15.00, 15.10
Operating System: SLES11
Microsoft R Server for Hadoop
Hadoop Distributions: Cloudera CDH 5.5-5.7, Hortonworks HDP 2.3-2.4, MapR 5.0-5.1
Operating Systems: RHEL 6.x and 7.x, SUSE SLES11
Spark version: 1.5.0-1.6.1 (if using Spark). 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.
DeployR
Prerequisites for DeployR on Linux
Prerequisites for DeployR on Windows

End of Life versions


For R Server 8.0, support ended on 1/1/2018. Please contact Microsoft if you have questions about
alternatives. This version is no longer available for support.
Install Machine Learning Server for Windows
9/10/2018 • 8 minutes to read • Edit Online

Applies to: Machine Learning Serve 9.2.1 | 9.3


Machine Learning Server for Windows runs machine learning and data mining solutions written in R or
Python in standalone and clustered topologies.
This article explains how to install Machine Learning Server on a standalone Windows server with an internet
connection. If your server has restrictions on internet access, see offline installation.

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).

Upgrade existing installations


If your existing server was configured for operationalization, follow these alternative steps for upgrade:
Configure Machine Learning Server to operationalize analytics (One-box) > How to upgrade
Configure Machine Learning Server to operationalize analytics (Enterprise) > How to upgrade.
For all other configurations, Setup performs an in-place upgrade over existing installations. Although the
installation path is new (\Program Files\Microsoft\ML Server), when R Server 9.x is present, setup finds R
Server at the old path and upgrades it to the new version.
There is no support for side-by-side installations of older and newer versions, nor is there support for hybrid
versions (such as R Server 9.1 and Python 9.3). An installation is either entirely 9.3 or an earlier version.

Download Machine Learning Server installer


You can get the zipped installation file from one of the following download sites.

SITE EDITION DETAILS

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.

For downloads from Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits. The Visual Studio page title should include
"My Benefits". The URL should be changed to https://my.visualstudio.com/.
2. Click Downloads and search for Machine Learning Server.
3. Find the version and click Download to get the Machine Learning Server installer for Windows.

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.

Check log files


If there were errors during Setup, check the log files located in the system temp directory. An easy way to get
there is typing %temp% as a Run command or search operation in Windows. If you installed all components,
your log file list looks similar to this screenshot:

Connect and validate


Machine Learning Server executes on demand as R Server or as a Python application. As a verification step,
connect to each application and run a script or function.
For R
R Server runs as a background process, as Microsoft ML Server Engine in Task Manager. Server startup
occurs when a client application like R Tools for Visual Studio or Rgui.exe connects to the server.
1. Go to C:\Program Files\Microsoft\ML 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.
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 to print the package contents.
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:

Summary Statistics Results for: ArrDelay+DayOfWeek


File name: ... AirlineDemoSmall.xdf
Number of valid observations: 600000.0

Name Mean StdDev Min Max ValidObs MissingObs


0 ArrDelay 11.317935 40.688536 -86.0 1490.0 582628.0 17372.0

Category Counts for DayOfWeek


Number of categories: 7

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.

Enable web service deployment and remote connections


If you installed Machine Learning Server on Windows Server 2012 R2 or Windows Server 2016, configure the
server for operationalization to enable additional functionality, including logging, diagnostics, and web service
hosting.
You can use the bootstrap command for this step. This command enables operationalization features on a
standalone server. It creates and starts a web node and compute node, and runs a series of diagnostic tests
against the configuration to confirm the internal data storage is functional and that web services can be
successfully deployed.
If you have multiple servers, you can designate each one as either a web node or compute node, and then link
them up. For instructions, see Configure Machine Learning Server (Enterprise).
1. Open an Administrator command prompt.
2. Enter the following command to configure the server: az ml admin bootstrap
This command invokes the Administrator Command Line Interface (CLI), installed by Machine Learning
Server and added as a system environment variable to your path so that you can run it anywhere.
3. Set a password used to protect your configuration settings. Later, after configuration is finished, anyone
who wants to use the CLI to modify a configuration must provide this password to gain access to
settings and operations.
The password must meet these requirements: 8-16 characters long, with at least one upper-case letter,
one lower-case letter, one number, and one special character.
After you provide the password, the tool does the rest. Your server is fully operationalized once the process is
complete. For more information about the benefits of operationalization:
Deploy Python and R script as a web service
Connect to a remote R server for code execution. Remote execution makes the server accessible to client
workstations running R Client or other Machine Learning Server nodes on your network.

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

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.

Tools for the standard base R (RTerm, Rgui.exe, and RScript)


are under <install-directory>\bin . Documentation is
under <install-directory>\doc and in
<install-directory>\doc\manual . One easy way to open
these files is to open RGui , click Help, and select one of
the options.
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.

On Windows, the default R installation directory is


C:\Program Files\Microsoft\ML Server\R_SERVER .

RevoScaleR is engineered for distributed and parallel


processing of all multi-threaded functions, utilizing available
cores and disk storage of the local machine. RevoScaleR also
supports the ability to transfer computations to other
RevoScaleR instances on other platforms and computers
through compute context instructions.

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.

On Windows, the default installation directory is


C:\Program Files\Microsoft\ML Server\PYTHON_SERVER .

Anaconda 4.2 with Python 3.5.2 An open-source distribution of Python.

Admin CLI Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.

Pre-trained models Used for sentiment analysis and image detection.

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

Applies to: Machine Learning Server 9.2.1 | 9.3


By default, installers connect to Microsoft download sites to get required and updated components for Machine
Learning Server for Windows. If firewall constraints 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.
Before you start, review the following article for requirements and general information about setup: Install
Machine Learning Server on Windows.

9.3.0 Downloads
On an internet-connected computer, download all of the following files.

COMPONENT DOWNLOAD USED FOR

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:

Visual Studio Dev Essentials


Volume Licensing Service Center
(VLSC)

Pre-trained Models MLM_9.3.0.0_1033.cab Pre-trained models, R or Python

Microsoft R Open 3.4.3.0 SRO_3.4.3.0_1033.cab R

Microsoft Python Open SPO_9.3.0.0_1033.cab Python

Microsoft Python Server SPS_9.3.0.0_1033.cab Python

Python script Install-PyForMLS Python

9.2.1 Downloads
If you require the previous version, use these links instead.

COMPONENT DOWNLOAD USED FOR


COMPONENT DOWNLOAD USED FOR

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:

Visual Studio Dev Essentials


Volume Licensing Service Center
(VLSC)

Pre-trained Models MLM_9.2.1.0_1033.cab Pre-trained models, R or Python

Microsoft R Open 3.4.3.0 SRO_3.4.1.0_1033.cab R

Microsoft Python Open SPO_9.2.1.0_1033.cab Python

Microsoft Python Server SPS_9.2.1.0_1033.cab Python

Python script Install-PyForMLS Python

Transfer and place files


Use a tool or device to transfer the files to the offline server.
1. Put the unzipped en_machine_learning_server_for_windows_x64_.zip file in a convenient folder.
2. Right-click Extract All to unpack the file. You should see a folder named MLS93Win. This folder contains
ServerSetup.exe.
3. Put the CAB files in the setup user's temp folder: C:\Users<user-name>\AppData\Local\Temp.

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

Check log files


If there are errors during Setup, check the log files located in the system temp directory. An easy way to get
there is typing %temp% as a Run command or search operation in Windows. If you installed all components,
your log file list looks similar to this screenshot:

Connect and validate


Machine Learning Server executes on demand as R Server or as a Python application. As a verification step,
connect to each application and run a script or function.
For R
R Server runs as a background process, as Microsoft ML Server Engine in Task Manager. Server startup
occurs when a client application like R Tools for Visual Studio or Rgui.exe connects to the server.
1. Go to C:\Program Files\Microsoft\ML 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 .

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:

Summary Statistics Results for: ArrDelay+DayOfWeek


File name:
/opt/microsoft/mlserver/9.3.0/libraries/PythonServer/revoscalepy/data/sample_data/AirlineDemoSmall.xd
f
Number of valid observations: 600000.0

Name Mean StdDev Min Max ValidObs MissingObs


0 ArrDelay 11.317935 40.688536 -86.0 1490.0 582628.0 17372.0

Category Counts for DayOfWeek


Number of categories: 7

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

Applies to: Machine Learning Server 9.2.1 | 9.3


This article provides syntax and examples for running Machine Learning Server ServerSetup.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 Install Machine Learning Server on Windows for:
System and operational requirements
Download and file extraction information
A summary of what is installed
Steps for validating your installation
This article assumes you have already downloaded and extracted the setup program.

Command line options


You can run ServerSetup.exe from the command line with options to expose or hide the wizard, set an install
mode, or specify options for adding features or using custom folder locations.
User Interaction Options

PARAMETER DESCRIPTION

/full Invokes the wizard.

/quiet Hides the wizard, running a silent installation with no


interaction or prompts. EULA acceptance is automatic for
both the server and all open-source distributions of R and
Python.

/passive Equivalent to /quiet in this release.

Install Modes

PARAMETER DESCRIPTION

/install Runs ServerSetup.exe in install mode, used to add R_SERVER,


PYTHON_SERVER, or the pre-trained machine learning models

/uninstall Removes an existing installation of any component previously


installed.
PARAMETER DESCRIPTION

/modify Runs ServerSetup.exe in modify mode. Setup looks for an


existing installation and offers options for changing an
installation (for example, you could add the pre-trained
models). Use this option if you want to rerun (or repair) an
installation.

Install Options

PARAMETER DESCRIPTION

/r Install just the R feature. Use with /install . Applies to


version 9.3 only.

/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.

/installdir="" Specifies the installation directory. By default, this is


C:\Program Files\Microsoft\R Server\R_SERVER.

/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.

/models Adds the pre-trained machine learning models. Use with


/install .

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

3. Uninstall the software in unattended mode.


serversetup.exe /quiet /uninstall

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

9.3 CAB file list


For unattended setup or offline setup, copy the .cab files to either the setup user's temp directory (C:\Users<user-
name>\AppData\Local\Temp) or to a folder specified via the /mediadir flag.

COMPONENT DOWNLOAD USED FOR

MLM MLM_9.3.0.0_1033.cab Pre-trained models, R or Python

Microsoft R Open SRO_3.4.3.0_1033.cab R

Microsoft Python Open SPO_9.3.0.0_1033.cab Python

There is no separate Python Server package in the 9.3 version.

9.2.1 CAB file list


For unattended setup or offline setup, copy the .cab files to either the setup user's temp directory (C:\Users<user-
name>\AppData\Local\Temp) or to a folder specified via the /mediadir flag.

COMPONENT DOWNLOAD USED FOR

MLM MLM_9.2.1.0_1033.cab Pre-trained models, R or Python

Microsoft R Open SRO_3.4.1.0_1033.cab R

Microsoft Python Open SPO_9.2.1.0_1033.cab Python

Microsoft Python Server SPS_9.2.1.0_1033.cab Python

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

Applies to: Machine Learning Server 9.2.1 | 9.3


You can re-run the Windows installer to remove Machine Learning Server for Windows. Clearing the checkbox for
an option in the Configuration page removes that component from your computer. Redistributable components,
such as the Analysis Services OLE DB provider, are not removed because doing so might break other applications
using those components.
If you have ServerSetup.exe in the Downloads folder, double-click the file to start it. Clear the options. Click
Install.
You can also use Add and Remove programs in Windows to uninstall the software.

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 .

VBScript listing installers for all installed products


Copy the following script and save it as msi_lister.vbs.
Dim objInstaller : Set objInstaller = Wscript.CreateObject("WindowsInstaller.Installer")
Set objProdSet = objInstaller.Products

On Error Resume Next

For Each objProd In objProdSet

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

Applies to: Machine Learning Server 9.2.1 | 9.3


You can add open-source and third-party R and Python packages to the same local repository containing the
product-specific packages for Machine Learning Server, allowing you to call functions from any library in the same
script. Any packages you add to the repository must be compatible with the base R and Anaconda distributions
upon which Microsoft's R and Python libraries are built.

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.

PRODUCT VERSION R VERSION ANACONDA/PYTHON VERSION

9.3 3.4.3 4.2/3.5

9.2 3.4.1 4.2/3.5

9.1 3.3.3 not applicable

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)

2. For Python, start Python.exe from \Program Files\Microsoft\ML Server\PYTHON_SERVER.


Loading the R execution environment displays base R version information, similar to this output.
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on
win32 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: C:\Program Files\Microsoft\ML Server\R_SERVER\library
For Python: C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Lib\site-packages

Add or remove R packages


R packages tend to have with multiple dependencies so we generally recommend using a tool like miniCran. For
more information and alternative methodologies, see R package management.

Add or remove Python packages


Run the following commmands from an administrator prompt.
Using pip

# 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

Applies to: Machine Learning Server 9.2.1 | 9.3


Machine Learning Server for Linux runs machine learning and data mining solutions written in R or Python in
standalone and clustered topologies.
This article explains how to install Machine Learning Server on a standalone Linux server that has an internet
connection. If your server has restrictions on internet access, see offline installation.
This article covers the following items:
Prerequisites
Package manager overview
In-place upgrades of existing installations
Installation steps
An inventory of what's installed

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.

System and setup requirements


Operating system must be a supported version of 64-bit Linux.
Minimum RAM is 2 GB. Minimum disk space is 500 MB (8 GB or more is recommended).
An internet connection. If you do not have an internet connection, use the offline installation
instructions.
Root or super user permissions

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.

PACKAGE MANAGER PLATFORM

yum RHEL, CentOS

apt Ubuntu online

dpkg Ubuntu offline

zypper SUSE

rpm RHEL, CentOS, 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."

Upgrade existing installations


If your existing server was configured for operationalization, follow these alternative steps for upgrade:
Configure Machine Learning Server to operationalize analytics (One-box) > How to upgrade or Configure
Machine Learning Server to operationalize analytics (Enterprise) > How to upgrade.
For all other configurations, Setup performs an in-place upgrade on an existing installation. Although the
installation path is new ( /opt/microsoft/mlserver/9.3 ), when R Server 9.x is present, Machine Learning Server
9.3 finds R Server at the old path ( /usr/lib64/microsoft-r/9.1.0 ) and upgrades it to the new version.
There is no support for side-by-side installations of older and newer versions, nor is there support for hybrid
versions (such as R Server 9.1 and Python 9.3). An installation is either entirely 9.3 or an earlier version.

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 Red Hat or CentOS


Run the following commands to install Machine Learning Server for Linux on Red Hat Enterprise (RHEL ) and
CentOS (6.x - 7.x). If you run into problems, try manual configuration instead.
# Install as root
sudo su

# Import the Microsoft repository key


sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

# Create local `azure-cli` repository


sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-
cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >
/etc/yum.repos.d/azure-cli.repo'

# Set the location of the package repo at the "prod" directory


# The following command is for version 7.x
# For 6.x, replace 7 with 6 to get that version
rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

# Verify that the "microsoft-prod.repo" configuration file exists


ls -la /etc/yum.repos.d/

# Update packages on your system:


yum update

# Install the server


# The following command is for version 7.x
# For 6.x: yum install microsoft-mlserver-el6-9.3.0
yum install microsoft-mlserver-all-9.3.0

# Activate the server


/opt/microsoft/mlserver/9.3.0/bin/R/activate.sh

# List installed packages as a verification step


rpm -qa | grep microsoft

# Choose a package name and obtain verbose version information


rpm -qi microsoft-mlserver-packages-r-9.3.0

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

# Add the **azure-cli** repo to your apt sources list


AZ_REPO=$(lsb_release -cs)

echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee


/etc/apt/sources.list.d/azure-cli.list

# 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

# Register the repo


dpkg -i packages-microsoft-prod.deb

# Verify whether the "microsoft-prod.list" configuration file exists


ls -la /etc/apt/sources.list.d/

# Add the Microsoft public signing key for Secure APT


apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893

# Update packages on your system


apt-get update

# Install the server


apt-get install microsoft-mlserver-all-9.3.0

# Activate the server


/opt/microsoft/mlserver/9.3.0/bin/R/activate.sh

# List installed packages as a verification step


apt list --installed | grep microsoft

# Choose a package name and obtain verbose version information


dpkg --status microsoft-mlserver-packages-r-9.3.0

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

# Update packages on your system:


zypper update

# Install the server


zypper install microsoft-mlserver-sles11-9.3.0

# You might get a message stating that PackageKit is blocking zypper


# Enter `y` to quit PackageKit and allow zypper to continue
y

# You are prompted whether to trust the repository signing key


# Enter `t` to temporarily trust the key for download and install
t

# You might get a "Digest verification failed" message


# Enter `y` to continue
y

# You are asked to confirm the list of packages to install


# Enter `y` to continue
y

# Review and accept the license agreements for MRO, Anaconda, and Machine Learning Server.
y

#Activate the server


/opt/microsoft/mlserver/9.3.0/bin/R/activate.sh

# List installed packages as a verification step


zypper se microsoft

# Choose a package name and obtain verbose version information


zypper info microsoft-mlserver-packages-r-9.3.0

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

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

Name Mean StdDev Min Max ValidObs MissingObs


0 ArrDelay 11.317935 40.688536 -86.0 1490.0 582628.0 17372.0

Category Counts for DayOfWeek


Number of categories: 7

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.

Enable web service deployment and remote connections


After you confirm the basic install, continue with the next step: configuring the server for operationalization to
enable additional functionality, including logging, diagnostics, and web service hosting.
You can use the bootstrap command for this step. This command enables operationalization features on a
standalone server. It creates and starts a web node and compute node, and runs a series of diagnostic tests
against the configuration to confirm the internal data storage is functional and that web services can be
successfully deployed.
Alternatively, if you have multiple servers, you can designate each one as either a web node or compute node,
and then link them up. For instructions, see Configure Machine Learning Server (Enterprise).
1. Open an Administrator command prompt.
2. Enter the following command to invoke the Administrator Command Line Interface (CLI) and configure
the server: az ml admin bootstrap
3. Set a password used to protect your configuration settings. Later, after configuration is finished, anyone
who wants to use the CLI to modify a configuration must provide this password to gain access to
settings and operations.
The password must meet these requirements: 8-16 characters long, with at least one upper-case letter,
one lower-case letter, one number, and one special character.
After you provide the password, the tool does the rest. Your server is fully operationalized once the process is
complete. For more information about the benefits of operationalization:
Deploy Python and R script as a web service
Connect to a remote R server for code execution. Remote execution makes the server accessible to client
workstations running R Client or other Machine Learning Server nodes on your network.
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

Microsoft R Open (MRO) An open-source distribution of the base R language, plus


the Intel Math Kernel library (int-mkl).

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.

On Linux, the default R installation directory is


/opt/microsoft/mlserver/9.3.0 .

RevoScaleR is engineered for distributed and parallel


processing for all multi-threaded functions, utilizing available
cores and disk storage of the local machine. RevoScaleR also
supports the ability to transfer computations to other
RevoScaleRr instances on other computers and platforms
through compute context instructions.

Python proprietary libraries Proprietary packages provide modules of class objects and
static functions. Libraries include revoscalepy, microsoftml,
and azureml-model-management-sdk.

Anaconda 4.2 with Python 3.5.2 An open-source distribution of Python.

Admin CLI Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.

Pre-trained models Used for sentiment analysis and image detection.

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

Applies to: Machine Learning Server 9.2.1 | 9.3


By default, installers connect to Microsoft download sites to get required and updated components for Machine
Learning Server 9.x for Linux. If firewall constraints 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.
Before you start, review the following article for general information about setup: Install Machine Learning
Server on Linux.

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.

PACKAGE MANAGER PLATFORM

yum RHEL, CentOS

apt Ubuntu online

dpkg Ubuntu offline

zypper SUSE

rpm RHEL, CentOS, 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

Repeat for each package in the package list.

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.

Activate the server


Run the activation script from either the R or Python directory:
/opt/microsoft/mlserver/9.3.0/bin/R/activate.sh
or /opt/microsoft/mlserver/9.3.0/bin/python/activate.sh

Connect and validate


1. List installed packages:
On CentOS and RHEL: rpm -qa | grep microsoft
On Ubuntu: apt list --installed | grep microsoft
On SLES11: zypper se microsoft
2. Once you have a package name, you can obtain verbose version information. For example:
On CentOS and RHEL: $ rpm -qi microsoft-mlserver-packages-r-9.3.0
On Ubuntu: $ dpkg --status microsoft-mlserver-packages-r-9.3.0
On SLES: zypper info microsoft-mlserver-packages-r-9.3.0
Output on Ubuntu is as follows:
Package: microsoft-mlserver-packages-r-9.3.0
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 195249
Maintainer: [email protected]
Architecture: amd64
Version: 9.3.0.1287
Depends: microsoft-r-open-mro-3.4.3, microsoft-r-open-mkl-3.4.3, microsoft-r-open-foreachiterators-
3.4.3
Description: Microsoft Machine Learning Server
. . .

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

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

Name Mean StdDev Min Max ValidObs MissingObs


0 ArrDelay 11.317935 40.688536 -86.0 1490.0 582628.0 17372.0

Category Counts for DayOfWeek


Number of categories: 7

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

Applies to: Machine Learning Server 9.2.1 | 9.3


This article explains how to uninstall Machine Learning Server for Linux.

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

Applies to: Machine Learning Server 9.2.1 | 9.3


You can add open-source and third-party R and Python packages to the same local repository containing the
product-specific packages for Machine Learning Server, allowing you to call functions from any library in the same
script. Any packages you add to the repository must be compatible with the base R and Anaconda distributions
upon which Microsoft's R and Python libraries are built.

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.

PRODUCT VERSION R VERSION ANACONDA/PYTHON VERSION

9.3 3.4.3 4.2/3.5

9.2 3.4.1 4.2/3.5

9.1 3.3.3 not applicable

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)

For Python, do this: [<path>] $ mlserver-python

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

For Python: /opt/microsoft/mlserver/9.3.0/runtime/python/pkgs

Add or remove R packages


R packages tend to have with multiple dependencies so we generally recommend using a tool like miniCran. For
more information and alternative methodologies, see R package management.

Add or remove Python packages


Anaconda includes pip and conda that you can use to add or remove Python packages. When adding or removing
packages, keep the following points in mind:
Install as root or super user.
For utilities not in the PATH, prepend with mlserver-python -m , as in
mlserver-python -m pip install <package-name> (or equivalent for conda). Alternatively, you could do this:
./pip install <package-name> .
Using pip

# 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

Applies to: Machine Learning Server 9.2.1 | 9.3


This article explains how to generate, deploy, and activate an installation parcel for Machine Learning Server on a
Cloudera distribution of Apache Hadoop (CDH).
Cloudera offers a parcel installation methodology for adding services and features to a cluster. On a Hadoop
cluster, Machine Learning Server runs on the edge node and all data nodes. You can use a parcel to distribute and
activate the service on all nodes within your CDH cluster.

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.

Prepare for installation


This section explains how to obtain the parcel generation script and simulate parcel creation.
Download a Machine Learning Server distribution
A package manager installation used for Linux or Hadoop won't provide the parcel generation scripts. To get the
scripts, obtain a gzipped distribution of Machine Learning Server from Visual Studio Dev Essentials or Volume
licensing.
1. Go to Visual Studio Dev Essentials.
2. Click Join or Access Now and enter your Microsoft account (such as a Live ID, Hotmail, or Outlook account).
3. Make sure you're in the right place: https://my.visualstudio.com/Benefits.
4. Click Downloads.
5. Search for Machine Learning Server.
6. Download Machine Learning Server 9.3.0 for Hadoop to a writable directory, such as /tmp/, on one of the
nodes.
Unpack the distribution
1. Log on as root or a user with super user privileges: sudo su
2. Switch to the /tmp/ directory (assuming it's the download location): cd /tmp/
3. Unpack the file: tar zxvf en_microsoft_ml_server_930_for_hadoop_x64_<some-number>.tar.gz
The distribution is unpacked into a Hadoop folder at the download location. The distribution includes the
following files:

FILE OR FOLDER DESCRIPTION

install.sh Script for installing Machine Learning Server. Do not use this
for a parcel install.

generate_mlserver_parcel.sh Script for generating a parcel used for installing Machine


Learning Server on CDH.

EULA.txt End-user license agreements for each separately licensed


component.

DEB folder Contains Machine Learning packages for deployment on


Ubuntu.

RPM folder Contains Machine Learning packages for deployment on


CentOS/RHEL and SUSE

Parcel folder Contains files used to generate a parcel for installation on


CDH.

Test with a dry run


The script includes a -n flag that simulates parcel generation. Start with a dry run to review the prompts.
The script downloads Microsoft R Open and builds a parcel by extracting information from RPM packages. You
can append flags to run unattended setup or customize feature selections.
1. Switch to the Hadoop directory: cd /Hadoop

2. Run the script with -n to simulate parcel generation: bash generate_mlserver_parcel.sh -n

You are prompted to read and accept license agreements.


You are also asked to specify the underlying operating system. If the platform supports it, the parcel generator
adds installation instructions for features having a dependency on .NET Core, such as Microsoft machine learning
and operationalization features.
When the script is finished, the location of the parcel, checksum, and CSD is printed to the console. Remember the
files do not yet exist. This is just a dry run. Running the script without -n generates the files.

Flags used for parcel generation


You can run parcel generator with the following flags to suppress prompts or choose components.

FLAG OPTION DESCRIPTION

-m --distro-name [DISTRO] Target Linux distribution for this parcel,


one of: el6 el7 sles11

-l --add-mml Add Python and microsoftml to the


Parcel regardless of the target system.

-a --accept-eula Accept all end-user license agreements.

-d --download-mro Download Microsoft r open for


distribution to an offline system.

-s --silent Perform a silent, unattended install.

-u --unattended Perform an unattended install.

-n --dry-run Don't do anything, just show what


would be done.

-h --help Print this help text.

Run the script


Repeat the command without -n parameter to create the files: bash generate_mlserver_parcel.sh

The parcel generator file name is MLServer-9.3.0-[DISTRO ].parcel


The CSD file name is MLServer

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.

Distribute parcels and CSDs


This section explains how to place parcel generator script and CSD files in CDH.
Copy to the parcel repository
By default, Cloudera Manager finds parcels in the Cloudera parcel repository. In this step, copy the parcel you
generated to the repository.
1. Copy MLServer-9.3.0 and MLServer-9.3.0.sha to the Cloudera parcel repository, typically
/opt/cloudera/parcels.
cp ./MLServer-9.3.0-[DISTRO].parcel /opt/cloudera/parcel-repo/
cp ./MLServer-9.3.0-[DISTRO].parcel.sha /opt/cloudera/parcel-repo/

Copy to the CSD repository


The Custom Service Descriptor (CSD ) enables monitoring and administration from within Cloudera Manager. In
this step, copy the CSD (a .jar file) to the Cloudera repository for CSD files.
1. Copy the CSD file MLServer-9.3.0-CONFIG.jar to the Cloudera CSD directory, typically
/opt/cloudera/csd.
cp ./MLServer-9.3.0-CONFIG.jar /opt/cloudera/csd/

2. Modify the permissions of CSD file as follows:


sudo chmod 644 /opt/cloudera/csd/MLServer-9.3.0-CONFIG.jar

sudo chown cloudera-scm:cloudera-scm /opt/cloudera/csd/MLServer-9.3.0-CONFIG.jar

3. Restart the cloudera-scm-server service:


sudo service cloudera-scm-server restart

Activate in Cloudera Manager


1. In Cloudera Manager, click the parcel icon on the top right menu bar.

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.

Add MLServer-9.3.0 as a service


1. In Cloudera Manager home page, click the down arrow by the cluster name and choose Add Service.

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

Applies to: Machine Learning Server 9.2.1 | 9.3


On a Spark cluster, Machine Learning Server must be installed on the edge node and all data nodes on a
commercial distribution of Hadoop: Cloudera, HortonWorks, MapR. Optionally, you can install
operationalization features on edge nodes only.
Machine Learning Server is engineered for the following architecture:
Hadoop Distributed File System (HDFS )
Apache YARN
MapReduce or Spark 2.0-2.1
We recommend Spark for the processing framework.

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.

System and setup requirements


Native operating system must be a supported version of Hadoop on 64-bit Linux.
Minimum RAM is 8 GB (16 GB or more is recommended). Minimum disk space is 500 MB per node.
An internet connection. If you do not have an internet connection, use the offline installation
instructions.
Root or super user permissions

Package managers
Installation is through package managers. Unlike previous releases, there is no install.sh script.

PACKAGE MANAGER PLATFORM

yum RHEL, CentOS

apt Ubuntu online

dpkg Ubuntu offline

zypper SUSE

rpm RHEL, CentOS, SUSE

Running setup on existing installations


The installation path for Machine Learning Server is new: /opt/microsoft/mlserver/9.3.0 . However, if R Server
9.x is present, Machine Learning Server 9.x finds R Server at the old path ( /usr/lib64/microsoft-r/9.1.0 ) and
replaces it with the new version.
There is no support for side-by-side installations of older and newer versions, nor is there support for hybrid
versions (such as R Server 9.1 and Python 9.3). An installation is either entirely 9.3 or an earlier version.

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

1 - Edge node installation


Start here. Machine Learning Server is required on the edge node. You should run full setup, following the
installation commands for the Linux operating system used by your cluster: Linux install > How to install.
Full setup gives you core components for both R and Python, machine learning algorithms and pretrained
models, and operationalization. Operationalization features run on edge nodes, enabling additional ways of
deploying and consuming script. For example, you can build and deploy web services, which allows you to
invoke and access your solution programmatically, through a REST API.

NOTE
You cannot use operationalization on data nodes. Operationalization does not support Yarn queues and cannot run in a
distributed manner.

2 - Data node installation


You can continue installation by running Setup on any data node, either sequentially or on multiple data nodes
concurrently. There are two approaches for installing Machine Learning Server on data nodes.
Approach 1: Package managers for full installation
Again, we recommend running the full setup on every node. This approach is fast because package managers
do most of the work, including adding the Hadoop package (microsoft-mlserver-hadoop-9.3.0) and setting it
up for activation.
As before, follow the installation steps for the Linux operating system used by your cluster: Linux install > How
to install.
Approach 2: Manual steps for partial installation
Alternatively, you can install a subset of packages. You might do this if you do not want operationalization on
your data nodes, or if you want to exclude a specific language. Be prepared for more testing if you choose this
approach. The packages are not specifically designed to run as standalone modules. Hence, unexpected
problems are more likely if you leave some packages out.
1. Install as root: sudo su

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

4. Copy the packages: hadoop fs -copyFromLocal /tmp/mlserver /tmp/mlsdatanode

5. Switch to the directory: cd /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

Repeat this procedure on remaining nodes.

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

Applies to: Machine Learning Server 9.2.1 | 9.3


This article explains how to uninstall Machine Learning Server running in a Spark cluster.
Remove components on edge nodes
Remove components on data nodes
You can uninstall existing software and upgrade to newer versions node by node across the cluster, but don’t try to
submit any jobs until all nodes are at the same functional level.

Uninstall edge nodes


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. Operationalization features run on edge nodes. 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:
On CentOS and RHEL
yum erase microsoft-mlserver-adminutil-9.3
yum erase microsoft-mlserver-webnode-9.3
yum erase microsoft-mlserver-computenode-9.3

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

Uninstall data nodes


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. 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.
5. After packages are uninstalled, remove remaining files. On root@, determine whether additional files still
exist:
$ ls /opt/microsoft/mlserver/9.3.0/
6. Remove the entire directory:
$ rm -fr ls /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 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

Applies to: Machine Learning Server, Microsoft R Server 9.x


Operationalization refers to the process of deploying R and Python models and code to Machine
Learning Server in the form of web services and the subsequent consumption of these services
within client applications to affect business results.
Today, more businesses are adopting advanced analytics for mission critical decision making.
Typically, data scientists first build the predictive models, and only then can businesses deploy those
models in a production environment and consume them for predictive actions.
Being able to operationalize your analytics is a central capability in Machine Learning Server. After
installing Machine Learning Server on select platforms, you'll have everything you need to configure
the server to securely host R and Python analytics web services. For details on which platforms, see
Supported platforms.
Data scientists work locally with Microsoft R Client, with Machine Learning Server, or with any other
program in their preferred IDE and favorite version control tools to build scripts and models using
open-source algorithms and functions and/or our proprietary ones. Using the mrsdeploy R package
and/or the azureml-model-management-sdk Python package that ships the products, the data
scientist can develop, test, and ultimately deploy these R and Python analytics as web services in
their production environment.
Once deployed, the analytic web service is available to a broader audience within the organization
who can then, in turn, consume the analytics. Machine Learning Server provides the operationalizing
tools to deploy R and Python analytics inside web, desktop, mobile, and dashboard applications and
backend systems. Machine Learning Server turns your scripts into analytics web services, so R and
Python code can be easily executed by applications running on a secure server.
Learn more about the new additions in the "What's New in Machine Learning Server" article.

Video introduction
https://www.youtube.com/embed/7i19-s9mxJU

What you'll need


You'll develop your R and Python analytics locally, deploy them to Machine Learning Server as web
services, and then consume or share them.
On the local client, you'll need to install:
Microsoft R Client if working with R code. You'll also need to configure the R IDE of your choice,
such as R Tools for Visual Studio, to run Microsoft R Client. After you have this set up, you can
develop your R analytics in your local R IDE using the functions in the mrsdeploy package that
was installed with Microsoft R Client (and R Server).
Local Python interpreter if working with Python code. After you have this set up, you can develop
your Python analytics in your local interpreter using the functions in the azureml-model-
management-sdk Python package.
On the remote server, you'll need the connection details and access to an instance of Machine
Learning Server with its operationalization feature configured. After Machine Learning Server is
configured for operationalization, you'll be able to connect to it from your local machine, deploy your
models and other analytics to Machine Learning Server as web services, and finally consume or
share those services. Please contact your administrator for any missing connection details.

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

Applies to: Machine Learning Server, Microsoft R Server 9.x

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

Windows Server 2012 R2 Ubuntu 14.04, Ubuntu 16.04

Windows Server 2016 CentOS/RHEL 7.x

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.

To configure on a single machine:


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 that was launched with administrator (Windows) or root/sudo
(Linux) privileges, run the following 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.

# With elevated privileges, run the following commands.


# Set up both nodes on one machine
az ml admin node setup --onebox --admin-password <Password> --confirm-password <Password>

# Check that the nodes are now running


az ml admin node list

# Authenticate via CLI


# Account name is `admin` if LDAP or AAD is not set up.
az login --mls

# Test configuration to validate setup


az ml admin diagnostic run

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.

# Set up both nodes on one machine


az ml admin node setup --onebox --admin-password <Password> --confirm-password <Password>

# Check that the nodes are now running


az ml admin node list

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.

To configure on a single machine:


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 that was launched with administrator (Windows) or root/sudo
(Linux) privileges, run the following 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.

# With elevated privileges, run the following commands.


# Set up both nodes on one machine
az ml admin node setup --onebox --admin-password <Password> --confirm-password <Password>

# Check that the nodes are now running


az ml admin node list

# Authenticate via CLI


# Account name is `admin` if LDAP or AAD is not set up.
az login --mls

# Test configuration to validate setup


az ml admin diagnostic run

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.

# Set up both nodes on one machine


az ml admin node setup --onebox --admin-password <Password> --confirm-password <Password>

# Check that the nodes are now running


az ml admin node list

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.

To configure on a single machine:


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:
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

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.

3. Choose the option to Configure server.


4. 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.

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.

One-box vs enterprise architectures


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 multiple web nodes to load balance
your requests to 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. An SQLite 3.7+ database is installed by default, but you can, and in some cases must, use
a SQL Server (Windows) or PostgreSQL (Linux) database instead.
R Server offers two types of configuration for operationalizing analytics and remote execution:
1. One-box configuration: as the name suggests, 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 analytics using R 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.

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

How to upgrade from 9.0 to 9.1


To replace an older version of a one-box configuration, you can uninstall the older distribution before installing
the new version (there is no in-place upgrade). Carefully review the following steps.

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

On Linux: follow these instructions Installation steps | Offline steps


5. Launch the administration utility with administrator privileges. The utility checks to see if any 9.0
configuration files are present under the current folder previously mentioned.
6. From the menus, choose Configure server (or in previously releases, Configure R Server for
Operationalization) 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 setup using the
configuration you had for R Server 9.0. 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.
10. Repeat these steps for each node.

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.

How to perform a one-box configuration


IMPORTANT
For your convenience, Azure Management Resource (ARM) templates are available to quickly deploy and configure
Microsoft R Server for operationalization in Azure.
Get one of these templates on GitHub. Then, learn how to use it with this blog post.

To configure on a single machine:


1. Install Microsoft R Server and any dependencies:

On Windows: Follow these instructions: R Server installation steps | Offline steps


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

Symlinks cd /usr/lib64 sudo apt-get install libicu-dev cd /lib/x86_64-linux-gnu


sudo ln -s libpcre.so.1 cd /lib/x86_64-linux-gnu ln -s libpcre.so.3 libpcre.so.0
libpcre.so.0 ln -s libpcre.so.3 libpcre.so.0 ln -s liblzma.so.5 liblzma.so.0
sudo ln -s libicui18n.so.50 ln -s liblzma.so.5 liblzma.so.0
libicui18n.so.36 cd /usr/lib/x86_64-linux-gnu
sudo ln -s libicuuc.so.50 cd /usr/lib/x86_64-linux-gnu ln -s libicui18n.so.55
libicuuc.so.36 ln -s libicui18n.so.52 libicui18n.so.36
sudo ln -s libicudata.so.50 libicui18n.so.36 ln -s libicuuc.so.55
libicudata.so.36 ln -s libicuuc.so.52 libicuuc.so.36
libicuuc.so.36 ln -s libicudata.so.55
ln -s libicudata.so.52 libicudata.so.36
libicudata.so.36

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.

2. Configure compute nodes


Configure one or more compute nodes as needed. We highly recommend that you configure each node (compute
or web) on its own machine for higher availability.
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.
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 configure a compute node.

# With elevated privileges, run the following commands.


# Set up a compute node

az ml admin node setup --computenode

# Check the node is now running


az ml admin node list

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

# Configure a web node


az ml admin node setup --webnode --admin-password <Password> --confirm-password <Password> --uri <URI1>,
<URI2>

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:

# Check the node is now running


az ml admin node list

# Run the diagnostic test


az ml admin diagnostic run

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:

# You must be authenticated to run diagnostic tests.


az login --mls

# Run test
az ml admin diagnostic run

3. Evaluate the configuration's capacity.

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.

# Set up a compute node


az ml admin node setup --computenode

# Check the node is now running


az ml admin node list

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>

4. Verify the configuration was successful with these CLI commands:

# Check the node is now running


az ml admin node list

# Authenticate with Machine Learning Server


az login --mls

# Run diagnostics to make all is configured properly


az ml admin diagnostic run

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 node.


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.

2. Configure compute nodes


Configure one or more compute nodes as needed. We highly recommend that you configure each node
(compute or web) on its own machine for higher availability.
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.
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 configure a compute node.

# With elevated privileges, run the following commands.


# Set up a compute node

az ml admin node setup --computenode

# Check the node is now running


az ml admin node list

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

# Configure a web node


az ml admin node setup --webnode --admin-password <Password> --confirm-password <Password> --uri
<URI1>,<URI2>

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:

# Check the node is now running


az ml admin node list

# Run the diagnostic test


az ml admin diagnostic run

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:

# You must be authenticated to run diagnostic tests.


az login --mls

# Run test
az ml admin diagnostic run

3. Evaluate the configuration's capacity.

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.

# Set up a compute node


az ml admin node setup --computenode

# Check the node is now running


az ml admin node list

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>

4. Verify the configuration was successful with these CLI commands:

# Check the node is now running


az ml admin node list

# Authenticate with Machine Learning Server


az login --mls

# Run diagnostics to make all is configured properly


az ml admin diagnostic run

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 node.


Configure Machine Learning Server 9.2.1 to
operationalize analytics (Enterprise)
4/13/2018 • 8 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 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.

2. Configure compute nodes


Configure one or more compute nodes as needed. We highly recommend that you configure each node (compute
or web) on its own machine for higher availability.

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.

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. Run diagnostic tests.
3. Evaluate the configuration's capacity.

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

2. Install Microsoft R Server:


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 ).

On Linux: follow these instructions Installation steps | Offline steps


3. Launch the administration utility with administrator privileges. The utility checks for any 9.0 configuration
files present under the current folder mentioned previously.
4. From the main menu, choose the option to Configure server (or in previously releases, Configure R
Server for Operationalization).
5. From the submenu, choose the option to Configure a compute node.
6. 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. The compute node is now configured.
7. Repeat these steps for each compute node.
Upgrade a web 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

2. Install Microsoft R Server:


On Windows: follow these instructions Installation steps | Offline steps

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 .

On Linux: follow these instructions Installation steps | Offline steps


3. Launch the administration utility with administrator privileges. The utility checks to see if any 9.0
configuration files are present under the current folder mentioned previously.
4. From the main menu, choose the option to Configure server (or in previously releases, Configure R
Server for Operationalization).
5. From the submenu, choose the option to Configure a web node.
6. 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. Note: You can safely ignore the Python warning during upgrade.
7. From the main menu, choose the option to Run Diagnostic Tests to test the configuration.
8. Exit the utility. Your web node is now configured.
9. Repeat these steps for each web node.

How to configure for the enterprise


IMPORTANT
For your convenience, Azure Resource Management templates are available to quickly deploy and configure Microsoft R
Server for operationalization in Azure.
Get one of these templates on GitHub. Then, learn how to use it with this blog post.

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.

2. Configure compute nodes

NOTE
Side-by-side installations of R Server web nodes and compute nodes are not supported.

In an enterprise configuration, you can set up one or more compute nodes.

IMPORTANT
We highly recommend that you configure each node (compute or web) on its own machine for higher availability.

1. Install Microsoft R Server and its dependencies:


On Windows
Follow these instructions: R Server installation steps | Offline steps
IMPORTANT
For SQL Server Machine Learning Services, you must 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 .

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

Symlinks cd /usr/lib64 sudo apt-get install libicu-dev cd /lib/x86_64-linux-gnu


sudo ln -s libpcre.so.1 cd /lib/x86_64-linux-gnu ln -s libpcre.so.3 libpcre.so.0
libpcre.so.0 ln -s libpcre.so.3 libpcre.so.0 ln -s liblzma.so.5 liblzma.so.0
sudo ln -s libicui18n.so.50 ln -s liblzma.so.5 liblzma.so.0
libicui18n.so.36 cd /usr/lib/x86_64-linux-gnu
sudo ln -s libicuuc.so.50 cd /usr/lib/x86_64-linux-gnu ln -s libicui18n.so.55
libicuuc.so.36 ln -s libicui18n.so.52 libicui18n.so.36
sudo ln -s libicudata.so.50 libicui18n.so.36 ln -s libicuuc.so.55
libicudata.so.36 ln -s libicuuc.so.52 libicuuc.so.36
libicuuc.so.36 ln -s libicudata.so.55
ln -s libicudata.so.52 libicudata.so.36
libicudata.so.36

Note: If there are issues with starting the compute node, see here.

2. Launch the administration utility with administrator privileges.

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 ).

On Linux: follow these instructions Installation steps | Offline steps


2. Declare the IP addresses of every compute node with each web node.
a. Open the configuration file, <server-home>/Microsoft.RServer.WebNode/appsettings.json. (Find
<server-home> for your version.)
b. In the file, search for the section starting with "BackEndConfiguration": { .
c. Update the "Uris": { properties to declare each compute node.
In R Server 9.1, you must specify the Uri for each compute node individually using the
Values property and/or specify port ranges (or IP octets) using the Ranges property.

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.

d. Close and save the file.


e. Repeat these steps on each web node to declare each compute node.
3. Launch the administration utility with administrator privileges:

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.

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.
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 R
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.
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...
7. Post configuration steps
1. Update service ports , if needed.
2. Run diagnostic tests.
3. Evaluate the configuration's capacity.
Launch the administration tool/CLI to manage
the operationalization configuration
7/31/2018 • 3 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server


This article describes how to launch the tool used to manage the web and compute nodes for Machine
Learning Server. These nodes enable you to operationalize your analytics with Machine Learning Server.
The tool you use to set up and manage your configuration depends on your version:
In Machine Learning Server 9.3, use the command line interface (CLI).
In versions 9.0 - 9.2, use the Administration Utility.
With this tool, you can:
Configure web and compute nodes to enable operationalizing with Machine Learning Server
Encrypt credentials
Stop and restart nodes
Run diagnostic tests
Declare compute nodes
Update the node ports
Update the local admin password
Evaluate the capacity of your configuration

Machine Learning Server 9.3: Administration with Azure CLI


In this release, use the admin extension of the Azure CLI to set up and manage your Machine Learning
Server node configuration.

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:

# With elevated privileges, run the following commands.


az ml admin --help

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 .

Machine Learning Server 9.2: Administration utility


These instructions describe how to launch the Administrator Utility on Machine Learning Server 9.2.
To launch the 9.2 Administration Utility:
On Windows, right-click the "Administration Utility" program icon in the Start menu, and then
click "Run as Administrator".

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

On Linux, run the following commands with root or sudo privileges:

cd /opt/microsoft/mlserver/9.2.1/o16n
sudo dotnet Microsoft.MLServer.Utils.AdminUtil/Microsoft.MLServer.Utils.AdminUtil.dll

Also read about the command-line switches to the administration utility.

R Server 9.1: Administration utility


These instructions describe how to launch the Administrator Utility on Machine Learning Server 9.1.
To launch the 9.1 Administration Utility:
On Windows, right-click the "Administration Utility" program icon in the Start menu, and then
click "Run as Administrator".

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.

On Linux, run the following commands with root or sudo privileges:

cd /usr/lib64/microsoft-r/rserver/o16n/9.1.0/
sudo dotnet Microsoft.RServer.Utils.AdminUtil/Microsoft.RServer.Utils.AdminUtil.dll

Also read about the command-line switches to the administration utility.

R Server 9.0: Administration utility


These instructions describe how to launch the Administrator Utility on Machine Learning Server 9.0.
To launch the 9.0 Administration Utility:
On Windows, right-click the "Administration Utility" program icon in the Start menu, and then
click "Run as Administrator".

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.

On Linux, run the following commands with root or sudo privileges:

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.

SWITCH DESCRIPTION INTRODUCED IN VERSION

-silentoneboxinstall password uris Sets up a one-box configuration 9.1,


silently, sets an admin password, URIs in 9.2
-silentinstall password uris and in 9.2 allows you to specify
compute node URIs or IP ranges. A
password is required. For example:

-silentinstall myPass123
http://1.1.1.1:12805,http://1.0.1.1-
3:12805

-silentwebnodeinstall password uris Configures a web node silently, sets 9.1,


an admin password, and in 9.2
allows you to specify compute node URIs in 9.2
URIs or IP ranges. A password is
required. For example:

-silentwebnodeinstall myPass123
http://1.1.1.1:12805,http://1.0.1.1-
3:12805

-silentcomputenodeinstall Configures a compute node silently. 9.1


For example:

-silentcomputenodeinstall

-setpassword password Sets the password. Cannot be used 9.1


if LDAP or AAD was configured. For
example:

-setpassword myPass123
SWITCH DESCRIPTION INTRODUCED IN VERSION

-preparedbmigration filePath Migrates the data from current 9.1


database to a different database
schema. Takes the path to the web
node’s appsetting.json file as an
argument. This is uncommonly
needed as a step when upgrading.
For example:

-preparedbmigration <web-node-
dir>/appsettings.json

-encryptsecret Secret Silently encrypts secrets. For 9.1


CertificateStoreName example:
CertificateStoreLocation
CertificateSubjectName -
encryptsecret theSecret Store Locati
on Subject
Authenticate Machine Learning Server users
against LDAP AD or Azure Active Directory
6/18/2018 • 12 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server 9.x


Machine Learning Server's offers seamless integration with authentication solutions when configured to
operationalize analytics.

To secure connections and communications, you have several options:

AUTHENTICATION METHOD WHEN TO USE

Local 'admin' account For one-box configurations

Active Directory / LDAP For enterprise on-premises configurations

Active Directory / LDAP-S For enterprise on-premises configurations with SSL/TLS


enabled

Azure Active Directory For enterprise cloud configurations

Local Administrator Account Authentication


During configuration, a default administrator account, 'admin', is created to manage the web and compute
nodes for In Machine Learning Server (and R Server). This account allows you to use the CLI or
administration utility to configure this feature, edit ports, restart nodes, and so on.
This account might be sufficient when trying to operationalize with a one-box configuration since everything
is running within the trust boundary. However, it is insufficient for enterprise configurations.
To set or change the password for the local administrator account after the configuration script has been run,
follow these steps.
To log in to Machine Learning Server with this user for remote execution or web service functionalities, use
remoteLogin() as described in the article "Connecting to Machine Learning Server with mrsdeploy."

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.

Active Directory and LDAP/LDAP-S


Active Directory (AD ) and LDAP are a great authentication option for on-premises configurations to ensure
that domain users have access to the APIs.
LDAP is the standard protocol for reading data from and writing data to Active Directory (AD ) domain
controllers. AD LDAP traffic is unsecured by default, which makes it possible to use network-monitoring
software to view the LDAP traffic between clients and domain controllers.
By default, the LDAP security provider is not configured. To enable LDAP authentication support, update the
relevant properties in your configuration file. The values you assign to these properties must match the
configuration of your LDAP Directory Information Tree (DIT).
You can make LDAP traffic confidential and secure using Secure Sockets Layer (SSL ) / Transport Layer
Security (TLS ) technology. This combination is referred to as LDAP over SSL (or LDAP -S ). To ensure that no
one else can read the traffic, SSL/TLS establishes an encrypted tunnel between an LDAP client and a domain
controller. Learn more about enabling SSL/TLS. Reasons for enabling LDAP -S include:
Organizational security policies typically require that all client/server communication is encrypted.
Applications use simple BIND to transport credentials and authenticate against a Domain Controller. As
simple BIND exposes the users’ credentials in clear text, using SSL/TLS to encrypt the authentication
session is recommended.
Use of proxy binding or password change over LDAP, which requires LDAP -S. Bind to an AD LDS
instance Through a Proxy Object
Applications that integrate with LDAP servers (such as Active Directory or Active Directory Domain
Controllers) might require encrypted LDAP communications.

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 .

On each web node:


1. Enable LDAP/LDAP -S in the external JSON configuration file, appsettings.json:
a. Open the configuration file, <web-node-install-path>/appsettings.json.
b. Search for the section starting with "LDAP": {

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.

LDAP PROPERTIES DEFINITION

Host Address of the Active Directory server

Port (version 9.1+) Used to override the default LDAP port.


By default, the LDAP port is 389 and the LDAP-S port
is 636.

UseLDAPS Set 'true' for LDAP-S or 'false' for LDAP


Note: If LDAP-S is configured, an installed LDAP
service certificate is assumed so that the tokens
produced by Active Directory/LDAP can be signed and
accepted by Machine Learning Server.

BindFilter (version 9.0.1 only) The template used to do the Bind


operation. For example, "CN=
{0},CN=DeployR,DC=TEST,DC=COM". {0} is the user's
DN.

QueryUserDn Distinguished name of user with read-only query


capabilities with which to authenticate

QueryUserPassword Password for that user with which to authenticate


(value must be encrypted). We highly recommend that
you encrypt LDAP login credentials before adding the
information to this file.

QueryUserPasswordEncrypted True/False. If 'True', it means the value of


QueryUserPassword is an encrypted string.

SearchBase Context name to search in, relative to the base of the


configured ContextSource, for example,
'ou=users,dc=example,dc=com'.

SearchFilter The pattern to be used for the user search.


"SearchFilter": "cn={0}" is for each user's DN. In legacy
systems, some use "SearchFilter": "sAMAccountName=
{0}"

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.

For example, with R Server 9.1:

"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.

4. Save changes to appsettings.json.


5. Restart the web node using the administration utility so that the changes can take effect.
6. Run the diagnostic tests to ensure all tests are passing in the configuration.

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.

7. Repeat these steps on each machine hosting the web node.


8. Share the connection details with any users who authenticate with Machine Learning Server either to
make API calls directly or indirectly in R using remoteLogin() function in the mrsdeploy package.
Azure Active Directory
Azure Active Directory (AAD ) can be used to securely authenticate in the cloud when the client application
and Web node have access to the internet.
Step 1: Log in to the Azure portal
1. Sign in to the Azure portal.
2. Select the upper-right hand corner and select the Active Directory account from the list. If the Azure
Active Directory has not been set up yet, contact your system administrator. In our example, that
directory is MyMLServer .
3. Select Azure Active Directory from the left-hand side.

4. Select App registrations tab at the top. The application list appears. You may not have any
applications yet.

Step 2: Create a web application


Now, create a web app that is tied to the Azure Active Directory as follows:
1. Select New application registration at the top.

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.

The application is created and its details appear onscreen.


6. Copy the Application ID for the web application. You use this later when you configure your Native
application and Machine Learning Server using this ID.

7. Select Settings . The Settings pane appears on the right.


8. Select Keys from the Settings pane. The Keys pane appears.
9. In the Password area, add a client key. Provide a description of your choosing and select a key
duration.

10. Select Save to save the key.


11. Be sure to copy the key.

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 .

Step 3: Create a native application


Now, let's create a native application. This application links the web application to the Machine Learning
Server web node.
1. In the Azure portal, select Azure Active Directory from the left-hand side.
2. Select App registrations.

3. Select New application registration at the top.

4. Enter a Name for your application, such as Machine Learning Server native app .

5. For the Application type, select the Native.


6. In the Redirect URI field, enter:

urn:ietf:wg:oauth:2.0:oob

7. Select Create to create the new native application.


The application is created and its details appear onscreen.
8. Copy the Application ID for the web application. You use this ID later to enable AAD in Machine
Learning Server.

9. Select Settings . The Settings pane appears on the right.


10. Select Required permissions.

11. Select Add at the top.


12. Select Select an API.
13. In the search field at the top, type the name of the web application you created. In our example, we use
the name Machine Learning Server Web app .

14. Select the web application name.


15. Select the Select button. The Select permissions > Enable Access fields appear.
16. Select the checkmark next to the name of the web application.

17. Select the Select button. The pane closes.


18. Select Done at the bottom to finish adding the permissions.
Step 4: Enable Azure AD on each web node
1. Open the configuration file, <web-node-install-path>/appsettings.json.
2. Search for the section starting with:

"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:

AZURE AD PROPERTIES DEFINITION

Enabled To use AAD for authentication, set to 'true'. Else, set to


'false'.

Authority Use 'https://login.windows.net/<URL to AAD login>'


where <URL to AAD login> is the URL to the AAD
login. For example, if the AAD account domain is
myMLServer.contoso.com, then the Authority would be
'https://login.windows.net/myMLServer.contoso.com'

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.

KeyEncrypted We highly recommend that you encrypt login


credentials before adding the information to this file.
Set KeyEncrypted to 'true' if using encrypted
information. For plain text, set to 'false'.

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.

8. Repeat these steps on each machine hosting a web node.


Step 5: Share the required AAD connection details with your users
Share the connection details, such as the Authority and Audience, with any users who need to authenticate
with Machine Learning Server to make API calls directly or indirectly in R using remoteLoginAAD () function
in the mrsdeploy package.
If you do not specify a username and password as arguments to the login call or R functions, you are
prompted for your AAD username (@) and password.

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

Applies to: Machine Learning Server, Microsoft R Server 9.x

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.

HTTPS CERTIFICATES DESCRIPTION WEB NODE COMPUTE NODE

API certificate Secures communication Yes, with private key No


between client applications
and web node.
This certificate works for
both one-box and
enterprise setups.

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.

Authentication certificate Authenticates the web Yes, with private and a No


node with the compute public key
node so that only the web
node can communicate
with the compute node.
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.

Encrypt the Traffic between Client Applications and Machine


Learning Server/R Server
IMPORTANT
We strongly recommend that SSL/TLS 1.2 be enabled in all production environments.

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.

5. Close and save the file.


6. Create a firewall rule to open port 443 to the public IP of the web node so that remote machines can
access it.
7. Launch the administration tool/CLI and restart the web node.
8. In the same tool, run the diagnostic test to send a test HTTPs request.
Windows: Using IIS to Encrypt

Make sure the name of the certificate matches the domain name of the web node URL.

On each machine hosting a web node:


1. Open the certificate store:
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.

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.

Linux: Encrypting Traffic

Make sure the name of the certificate matches the domain name of the web node URL.

On each Linux machine hosting a web node:


1. Install the trusted, signed API HTTPS certificate with a private key in the certificate store.
2. Install NGINX version 1.11.6 or later.
3. Enable HTTPS on NGINX as described in these articles:
http://nginx.org/en/docs/http/ngx_http_ssl_module.html
http://nginx.org/en/docs/http/configuring_https_servers.html
4. Declare the certificate in the NGINX configuration file nginx.conf . Find the server code block and
update the following values:
server_name with the name of web node
ssl_certificate with full path to the API HTTPS certificate
ssl_certificate_key with the private key for that certificate

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>;
}
}

6. Close and save nginx.conf .


7. Restart NGINX service.
8. If using IPTABLES firewall, add the HTTPS port, which is 443 by default, to the firewall settings to
allow communications between the client application and Machine Learning Server.
9. Launch the administration tool/CLI and restart the web node.
10. Repeat on each web node.
11. Run the diagnostic tool to send a test HTTPs request.
Now, you can access Machine Learning Server to operationalize analytics securely on https:// from your
client applications.

Encrypt Communication between the Web Node and Compute


Node
This section walks you through the steps for encrypting the traffic between the web node and each of its
compute nodes.

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.

d. Close and save the file.


3. Launch the administration tool/CLI and restart the compute node.
4. In the same tool, run the diagnostic test to send a test HTTPs request.

Windows: Using IIS 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.

2. Launch IIS and follow the instructions above.


3. Restart the node or just run 'iisreset' on the command-line.
Linux: Encrypting Traffic between Web Node and Compute Node

Make sure the name of the certificate matches the domain name of the web node URL.

1. On each Linux machine hosting a compute node:


a. Install the trusted, signed compute node HTTPS certificate with a private key in the
certificate store.
b. Install NGINX version 1.11.6 or later.
c. Enable HTTPS on NGINX as described in these articles:
http://nginx.org/en/docs/http/ngx_http_ssl_module.html
http://nginx.org/en/docs/http/configuring_https_servers.html
d. Declare the certificate in the NGINX configuration file nginx.conf . Find the server code
block and update the following values:
server_name with the name of web node
ssl_certificate with full path to the compute node HTTPS certificate
ssl_certificate_key with the private key for that certificate

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>;
}
}

f. Close and save nginx.conf .


g. Restart NGINX service.
h. Launch the administration tool/CLI and restart the compute node.
i. Repeat on each compute node.
2. On each web node, update the compute node URIs so they can be found.
a. Log in to each web node machine.
For Machine Learning Server, declare the new URIs in administration tool/CLI.
For R Server 9.x:
a. Open the configuration file, <web-node-install-path>/appsettings.json.
b. Update the "Uris": { properties so that declared compute node now points to
https://<compute-node-ip> (without the port number ):

"Uris": {
"Values": [
"https://<IP-ADDRESS-OF-COMPUTE-NODE-1>",
"https://<IP-ADDRESS-OF-COMPUTE-NODE-2>",
"https://<IP-ADDRESS-OF-COMPUTE-NODE-3>"
]
}

c. Close and save the file.


d. Launch the administration tool/CLI and restart the web node.
b. Verify the configuration by running diagnostic test in the administration tool/CLI on the web
node.
c. Repeat on each web node.
Authenticate the Web Node with the Compute Node
This section walks you through the steps for authenticating the web node with the compute node so that
only the web node can communicate with the compute node.

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.

1. On each web node:


a. Install the trusted, signed HTTPS authentication certificate with both private and public
keys in the certificate store.

Take note of the Subject name of the certificate as you need this info later.

b. Open the configuration file, <web-node-install-path>/appsettings.json. You can configure the


HTTPS port for the web node in this file.
c. In the file, search for the section starting with: "BackEndConfiguration": {
d. Enable this section with "Enabled": true and update the properties to match the values for
the Authentication certificate:

"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.

e. Close and save the file.


f. Launch the administration tool/CLI and restart the web node.
g. Repeat on each web node.
2. On each compute node:

These steps assume the trusted, signed HTTPS authentication certificate is already installed on
the machine hosting the web node with a private key.

a. Open the configuration file, <compute-node-install-path>/appsettings.json.


b. In the file, search for the section starting with: "BackEndConfiguration": {
c. Enable this section with "Enabled": true and match the properties to the values for the
Authentication certificate:
"ClientCertificate": {
"Enabled": false,
"Issuer": "<certificate issuer name>",
"Subject": "<certificate subject name>"
},

d. Close and save the file.


e. Launch the administration tool/CLI and restart the compute node.
f. Repeat on each compute node.
Troubleshooting & diagnostics for Machine
Learning Server
7/31/2018 • 11 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server 9.1


You can assess the health of your web and compute node environment using the diagnostic tests in the
Administration Utility. This utility is installed by default with Machine Learning Server (and R Server).
Armed with this information, you can identify unresponsive components, execution problems, and access
the log files.
The set of diagnostic tests include:
A general health check of the configuration
A trace of an execution (R code, Python code, or a web service)
Additional troubleshooting topics are also covered.

Test your configuration


1. Launch the diagnostic tests:
On Machine Learning Server 9.3 (or any other machine that has access to Machine Learning
Server), launch a command line window or terminal with administrator (Windows) or
root/sudo (Linux) privileges and run this command.

# With elevated privileges, run the following commands.


# Authenticate with the CLI if you haven't already
az login --mls

# If running from another machine, specify the MLS endpoint


az ml admin --mls --endpoint <Endpoint>

# Run diagnostics
az ml admin diagnostic run

On earlier versions (9.0 - 9.2):


a. Launch the administration utility with administrator privileges (Windows) or
root/sudo privileges (Linux).
b. From menus, choose Run Diagnostic Tests, then Test configuration for a 'health
report' of the configuration including a code execution test.
If you have not authenticated yet, provide your username and password.
2. Review the test results. If any issues arise, a raw report appears. You can also investigate the log
files and attempt to resolve the issues.
3. After making your corrections, restart the component in question. It may take a few minutes for a
component to restart.
4. Rerun the diagnostic test to make sure all is running smoothly now.
You can also get a health report directly using the status API call.

Trace a code execution


To go through the execution of a specific line of code and retrieve request IDs for debugging purposes, run
a trace.
1. Launch the code trace tests:
On Machine Learning Server 9.3, launch a command line window or terminal with
administrator (Windows) or root/sudo (Linux) privileges and run one of run these
commands to trace the execution of a code block or script:

# Authenticate with the CLI if you haven't already


az login --mls

# If running tests from another machine, specify the MLS endpoint


az ml admin --mls --endpoint <Endpoint>

# Trace execution of an inline R code block


az ml admin diagnostic code --runtime R --block "x<-5;x"
# Trace execution of an R script
az ml admin diagnostic code --runtime R --file <path/to/script.R>
# Trace execution of an inline Python code block
az ml admin diagnostic code --runtime python --block "x=5;print(x)"
# Trace execution of a Python script
az ml admin diagnostic code --runtime python --file <path/to/script.py>

On earlier versions (9.0 - 9.2):


a. Launch the administration utility with administrator privileges (Windows) or
root/sudo privileges (Linux).
b. From menus, choose Run Diagnostic Tests, then either Trace R code execution or
Trace Python code execution depending on the language you are using.
c. When prompted, enter the code you want to trace.
d. To start the trace, press the Enter key (carriage return).
2. Review the trace output.

Trace a web service execution


To go through the execution of a specific web service and retrieve request IDs for debugging purposes,
run a trace.
1. Launch the web service execution tests:
On Machine Learning Server 9.3, launch a command line window or terminal with
administrator (Windows) or root/sudo (Linux) privileges and run this command specifying
the web service name and version:
# Authenticate with the CLI if you haven't already
az login --mls

# If running tests from another machine, specify the MLS endpoint


az ml admin --mls --endpoint <Endpoint>

az ml admin diagnostic service --name <service-name> --version <version>

On earlier versions (9.0 - 9.2):


a. Launch the administration utility with administrator privileges (Windows) or
root/sudo privileges (Linux).
b. From menus, choose Run Diagnostic Tests, then Trace service execution.
If you have not authenticated yet, you must provide your username and password.
c. Enter the service name and version after the syntax '<service-name>/<version>'
such as my-service/1.1 .
d. To start the trace, press the Enter key (carriage return).
2. Review the trace output to better understand how the execution is running or failing.

Log files and levels


Review the log and configuration files for any component that was identified as experiencing issues. You
can find the logs in the <node-install-path>\logs folder under your web and compute node installation
paths. (Locate the install path for your version.)
If there are any issues, you must solve them before continuing. For extra help, consult or post questions to
our forum or contact technical support.
By default, the logging level is set to Warning so as not to slow performance. However, whenever you
encounter an issue that you want to share with technical support or a forum, you can change the logging
level to capture more information. The following logging levels are available:

LEVEL DESCRIPTION

Verbose The most detailed comprehensive logging level of all


activity, which is rarely (if ever) enabled in production
environments

Debug Logs robust details including internal system events,


which are not necessarily observable

Information Logs system events that correspond to its responsibilities


and functions

Warning Logs only when service is degraded, endangered, or may


be behaving outside of its expected parameters. (Default
level)

Error Logs only errors (functionality is unavailable or


expectations broken)

Critical Logs only fatal events that crash the application


To update the logging level:
1. On each compute node AND each web node, open the configuration file, <node-install-
path>/appsettings.json. (Find the install path for your version.)
2. Search for the section starting with "Logging": {

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.

Trace user actions


Using Information Level logging, any Core API or Service Consumption API call can be logged.
Additionally, the UserPrincipalName of the responsible user is also recorded in the logs. The user
session is given a unique ID called LoginSessionId on successful login, which is included in subsequent
log entries detailing actions (REST APIs) performed by the user during that session. LoginSessionId
allows a more fine-grained association of user actions to a particular user session.
To enable information logging, update the "LogLevel" for "Default" to "Information" on the web node,
using the instructions provided above.

"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"}}

2018-01-23 22:24:29.812 +00:00 [Information] {"CorrelationId":"06d3f05d-5819-4c06-a366-


a74d36a1c33c","Subject":{"Operation":"REQUEST POST
/sessions","UserPrincipalName":"azureuser","RemoteIpAddress":"x.x.x.x","LoginSessionId":"A580CF7A1ED55
87BDFD2E63E26103A672DE53C6AF9929F17E6311C4405950F1408F53E9451476B7B370C621FF7F6CE5E622183B4463C2CFEEA3
A9838938A5EA2"}}
2018-01-23 22:24:29.960 +00:00 [Information] {"CorrelationId":"06d3f05d-5819-4c06-a366-
a74d36a1c33c","Subject":{"Operation":"RESPONSE POST
/sessions","UserPrincipalName":"azureuser","RemoteIpAddress":"x.x.x.x","StatusCode":201}}

2018-01-23 22:28:33.661 +00:00 [Information] {"CorrelationId":"47e20e55-e5ca-4414-bd84-


e3e0dd7b01cc","Subject":{"Operation":"REQUEST DELETE /sessions/fc3222d7-09bd-4a89-a959-
380f1e639340/force","UserPrincipalName":"azureuser","RemoteIpAddress":"x.x.x.x","LoginSessionId":"A580
CF7A1ED5587BDFD2E63E26103A672DE53C6AF9929F17E6311C4405950F1408F53E9451476B7B370C621FF7F6CE5E622183B446
3C2CFEEA3A9838938A5EA2"}}
2018-01-23 22:28:34.818 +00:00 [Information] {"CorrelationId":null,"Subject":{"Operation":"RESPONSE
DELETE /sessions/fc3222d7-09bd-4a89-a959-
380f1e639340/force","UserPrincipalName":"azureuser","RemoteIpAddress":"x.x.x.x","StatusCode":200}}

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.

"BackEndConfiguration is missing URI" Error


If you get an BackEndConfiguration is missing URIs error when trying to install a web node, then ensure
your compute nodes are installed and declared prior to installing web nodes.

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the


target of an invocation. ---> Microsoft.DeployR.Server.App.Common.Exceptions.ConfigurationException:
BackEndConfiguration is missing URIs
at
Microsoft.DeployR.Server.WebAPI.Extensions.ServicesExtensions.AddDomainServices(IServiceCollection
serviceCollection, IHostingEnvironment env, IConfigurationRoot configurationRoot, String LogPath)
--- End of inner exception stack trace ---

“Cannot establish connection with the web node” Error


If you get the Cannot establish connection with the web node error, then the client is unable to establish a
connection with the web node in order to log in. Perform the following steps:
Verify that the web address and port number displayed on the main menu of the admin utility are
correct. Learn how to launch the utility, in this article: Machine Learning Server Administration
Look for web node startup errors or notifications in the stdout/stderr/logs files.
Restart the web node if you have recently changed the port the server is bound to or the certificate
used for HTTPS. Learn how to restart, in this article: Machine Learning Server Operationalization
Administration
If the issue persists, verify you can post to the login API using curl, fiddler, or something similar. Then,
share this information with technical support or post it in our forum.
Long delays when consuming web service on Spark
If you encounter long delays when trying to consume a web service created with mrsdeploy functions in a
Spark compute context, you may need to add some missing folders. The Spark application belongs to a
user called 'rserve2' whenever it is invoked from a web service using mrsdeploy functions.
To work around this issue, create these required folders for user 'rserve2' in local and hdfs:

hadoop fs -mkdir /user/RevoShare/rserve2


hadoop fs -chmod 777 /user/RevoShare/rserve2

mkdir /var/RevoShare/rserve2
chmod 777 /var/RevoShare/rserve2

Next, create a new Spark compute context:

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)

3. Save the file and restart Machine Learning Server.


4. Repeat on every machine on which Machine Learning Server is installed.
5. Run the diagnostic test or code execution again.
Error: "Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -97
EAFNOSUPPORT address family not supported"
Applies to: Machine Learning Server
If the following error occurs when attempting to start a web node
"Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -97 EAFNOSUPPORT
address family not supported", then disable IPv6 on your operating system.
az: error: argument command_package: invalid choice: ml
Applies to: Machine Learning Server 9.3
If for some reason your azure-ml-admin-cli extension is not available or has been removed you will be
met with the following error:
> az ml admin --help

az: error: argument _command_package: invalid choice: ml


usage: az [-h] [--verbose] [--debug] [--output {tsv,table,json,jsonc}]
[--query JMESPATH]
{aks,backup,redis,network,cosmosdb,batch,iot,dla,group,webapp,acr,dls,
storage,mysql,vm,reservations,account,keyvault,sql,vmss,eventgrid,
managedapp,ad,advisor,postgres,container,policy,lab,batchai,
functionapp,identity,role,cognitiveservices,monitor,sf,resource,cdn,
tag,feedback,snapshot,disk,extension,acs,provider,cloud,lock,image,
find,billing,appservice,login,consumption,feature,logout,configure,
interactive}

If you encounter this error, you can re-add the extension as such:
Windows:

> az extension add --source 'C:\Program Files\Microsoft\ML Server\Setup\azure_ml_admin_cli-0.0.1-


py2.py3-none-any. whl' --yes

Linux:

> az extension add --source ./microsoft/mlserver/9.3.0/o16n/azure_ml_admin_cli-0.0.1-py2.py3-none-


any.whl --yes
Roles and permissions (RBAC)
6/18/2018 • 9 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server 9.1


In Machine Learning Server (and R Server), Role-Based Access Control (RBAC ) enables fine-grained access
management for the operationalization APIs. Using RBAC, you can grant only the level of access that users
need to perform their jobs. This article helps you get up and running with RBAC.
By default, all authenticated users can publish/deploy, list, and get any web services as well as call all APIs.
Additionally, users can also update and delete the web services they have deployed. Use the roles defined in this
article to restrict who can call the APIs and publish, update, and delete web services.
How users are assigned to roles depends on the authentication method configured for Machine Learning
Server. For more on configuring authentication, read the article, "Authentication options."

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

Security groups versus Machine Learning Server roles


In AD/LDAP and AAD, security groups are used to collect user accounts, computer accounts, and other groups
into manageable units. Working with groups instead of with individual users helps simplify network
maintenance and administration. Your organization might have groups like 'Admin', 'Engineering', 'Level3', and
so on. And, users might belong to more than one group. You can use the AD groups you have already defined in
your organization to assign a collection of users to roles for web services.

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

Roles and their permissions


When roles are declared in the configuration file, the administrator has the choices of putting groups (of users)
into these roles.

ROLE DESCRIPTION PERMITTED PROHIBITED

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

Contributor These users can Web service APIs:


publish/deploy services and ✔ Publish any service ✖ Update service
manage the services they ✔ Update their services published by another
publish. They can also call ✔ Delete their services ✖ Delete service published
most other APIs. ✔ List any service by another
✔ Consume any service

Other APIs: ✖ Centralized node


✔ Call almost any other configuration (v9.2+)
API

Reader In Machine Learning Server Web service APIs:


9.2+, these users can list ✔ List any service ✖ Publish any service
and consume any service ✔ Consume any service ✖ Update any service
and call most other APIs. ✖ Delete any service
Other APIs:
In R Server 9.1, this catchall ✔ Call almost any other ✖ Centralized node
role is implicitly given to APIs configuration (v9.2+)
any authenticated user not
assigned a role. Users can
list and consume services.
Never explicitly declared.
How are roles assigned
When a user calls a Machine Learning Server API, the server checks to see whether any roles were declared.
When roles are declared, Machine Learning Server checks to see to which group the user belongs.
If the user belongs to an AD/LDAP or AAD group assigned to a role, then that user is given permissions
according to their role. If a user belongs to groups that are assigned to multiple roles, then the user is assigned
to the role with the highest permissions.
Here is an example of different LDAP group configurations and the resulting roles assigned to the persona.

MACHINE LEARNING SE
EXAMPLE USER USER'S RVER USER'S
/ PERSONA LDAP GROUPS RBAC CONFIGURATION ROLE

admins + "Owner": ["admins", " Owner


engineering managers"], =
FTE-north "Contributor":
Administrator ["stats"]

managers + "Owner": ["admins", Owner


stats "managers"], =
FTE-north "Contributor":
Lead data scientist ["stats"],
"Reader": ["app-
devs"]

stats + "Owner": ["admins", Contributor


FTE-north "managers"], =
"Contributor":
R programmer ["stats"],
"Reader": ["app-
devs"]

stats + "Owner": ["admins", Contributor


FTE-north "managers"] =

Python developer

app-devs + "Owner": ["admins", Reader


FTE-north "managers"], =
"Contributor":
Application Develope ["stats"],
r "Reader": ["app-
devs"]

vendor2 + "Owner": ["admins", Reader


"managers"], =
"Contributor":
System Integrator ["stats"]

sales + "Owner": ["admins", no role or


"managers"], = permissions
"Contributor":
Sales ["stats"]
"Reader": ["app-
devs"]

Role configuration states


The permissions assigned to users are influenced not only by the roles you define, but also by the roles you do
not define. When one or more roles is not defined, then certain permissions are implicitly assumed. By default,
no roles are declared.
The table shows which permissions are granted to those authenticated users who are not explicitly assigned to
any role.

POSSIBLE CONFIGURATIONS USERS WITHOUT A ROLE ARE IMPLICITLY ASSIGNED TO

- No roles: RBAC not configured Contributor

- Owner only Contributor

- Contributor + Owner -or- Reader


- Contributor only

- Reader + Contributor + Owner -or- v9.2+: all API access denied


- Reader + Owner -or- v9.1: not applicable since Reader is never declared
- Reader only

How to declare roles


If you configure Machine Learning Server (or R Server) to use Active Directory/LDAP or Azure Active Directory
authentication, then you can assign roles using Active Directory groups as described here.

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).

Step 1. Define desired roles


On each web node, edit the appsettings.json configuration file in order to declare the roles and the groups that
belong to them.
1. Open the configuration file, <web-node-install-path>/appsettings.json.
2. Search for the following section: "Authorization": {

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.

Step 2. Validate groups against AD/LDAP or AAD


Return to the appsetting.json file on each web node and make these updates:
For Azure Active Directory: In appsettings.json, find the "AzureActiveDirectory" section. Make sure the
alphanumeric client key you created in the portal for the web app is used for "Key": property. This key
allows Machine Learning Server to verify that the groups you've declared are valid in AAD. See following
example. Learn more about configuring Machine Learning Server to authenticate with Azure Active
Directory.

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",

Step 3. Apply the changes to Machine Learning Server / R Server


1. Restart the web node for the changes to take effect. Log in using the local 'admin' account in the
administration tool/CLI.
2. Repeat these changes in every web node you have configured. The configuration must be the same
across all web nodes.

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"]
}

Web service permissions after role change


Over time, a user role can change if they are no longer part of a security group in AD/LDAP or AAD, or if a
security group is no longer mapped to a role in Machine Learning Server.
Whenever a user's role changes, that user may not longer be able to perform the same tasks on their web
services. If you publish a web service while assigned to the "Owner" role, you can continue to manage and
interact with that web service version as long as you are assigned this role. However, if you are reassigned to
"Contributor", then you can still interact with that web service version as before, but you cannot update or
delete the services published by others. Or, if roles are defined and you are no longer assigned to any roles,
then you are implicitly assigned to the "Reader" role if it exists (see here. Consequently, you can no longer
manage any services, including those services that you published previously when you were assigned to a role.

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

Applies to: Machine Learning Server, Microsoft R Server 9.x


The operationalization feature for Machine Learning Server (and R Server) installs and uses a local SQLite
database by default to store internal information. Later, you can update the configuration to use another
database locally or remotely. This is useful when you want to use a remote database or when you have multiple
web nodes.
The database provides internal storage for the sessions, web services, snapshots, and other entities created as a
result of operationalization. When a request comes in to a web node (for example, to consume a service), the
web node connects to the databases, retrieves parameters for the service, and then sends the information to a
compute node for execution.

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.

To use a different local or remote database, do the following:

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.

1. On each web node, stop the service.


2. Update the database properties to point to the new database as follows:
a. Open the configuration file, <web-node-install-path>/appsettings.json.
b. Locate the ConnectionStrings property block.
c. Within that property block, locate the type of database you want to set up.
For SQL Server or Azure SQL DB, look for "sqlserver": { .
For PostgreSQL or Azure Database for PostgreSQL, look for "postgresql": { .
d. In the appropriate database section, enable that database type by adding the property
"Enabled": true, . You can only have one database enabled at a time.

For example:

"ConnectionStrings": {
"sqlserver": {
"Enabled": true,
...
},

e. Add the connection string.


For SQL Server Database (Integrated Security), use your string properties that are similar to:

"Connection": "Data Source=<DB-SERVER-IP-OR-FQDN>\\<INSTANCE-NAME>;Initial Catalog=<DB-


NAME>;Integrated Security=True;"

For SQL Server Database (SQL authentication), use your string properties similar to:

"Connection": "Data Source=<DB-SERVER-IP-OR-FQDN>\\<INSTANCE-NAME>;Initial Catalog=<DB-NAME>;


Integrated Security=False; User Id=<USER-ID>;Password=<PASSWORD>;"

For PostgreSQL Database, use your string properties:

"Connection": "User ID=<DB-USERNAME>;Password=<USER-PASSWORD>;Host=<DB-SERVER-IP-OR-


FQDN>;Port=5432;Database=<DB-NAME>;Pooling=true;"

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"
},
...
},

g. Save the changes you've made to appsettings.json.


3. Open the database port on the remote machine to the public IP of each web node as described in these
articles: SQL Server | PostgreSQL
4. Start the web node and the database is created upon restart.
5. Run the diagnostic tests to ensure the connection can be made to your new database.
Monitor, stop, and start web & compute nodes
7/31/2018 • 2 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server


You can monitor, start, or stop all operationalization-related web and compute nodes on the Machine
Learning Server machine at once.

Machine Learning Server 9.3


In Machine Learning Server 9.3, you can use admin extension of the Azure Command Line Interface (Azure
CLI) to set up and manage your configuration, including stopping and starting services.

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.

# With elevated privileges, run the following commands.

# Monitor nodes
az ml admin node list

# Start nodes on a machine


az ml admin node start --computenode --webnode

# Stop nodes on a machine


az ml admin node stop --computenode --webnode

# Get help on other permutations


az ml admin node start --help
az ml admin node stop --help

Earlier versions: 9.0 - 9.2


To stop or start a web node or compute node:
1. Launch the administration utility.
2. From the main menu, choose the option Stop and start services.
3. From the submenu, choose which nodes to start or stop.
WARNING
If the following error occurs when attempting to start a web node
"Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -97 EAFNOSUPPORT address family not
supported", then disable IPv6 on your operating system.
Manage and declare compute nodes
7/31/2018 • 2 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server


In order for the Machine Learning Server web nodes to know to which compute nodes it can send requests, you
must maintain a complete list of compute node URIs. This list of compute node URIs is shared across all web
nodes automatically and is managed through the Admin CLI (v9.3) or, for earlier versions, in the Administration
Utility.
R Server 9.1 administrators must declare URIs manually for each web node in their respective appsettings.json
file.

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.

Machine Learning Server 9.3


In Machine Learning Server 9.3, you can use admin extension of the Azure Command Line Interface (Azure CLI)
to set up and manage your configuration, including the declaration and management of compute nodes with your
web nodes.

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.

# With elevated privileges, run the following commands.


az login --mls

# Use the following if you need help with logins.


az login --mls --help

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>

# List uris defined


az ml admin compute-node-uri list

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

Machine Learning Server 9.2


To declare or manage URIs in Machine Learning Server 9.2:
1. Log in to the machine on which one of your web nodes is installed.
2. Launch the administration utility with administrator privileges (Windows) or root/sudo privileges (Linux).
3. From the main menu, choose the option Manage compute nodes.
4. From the submenu, choose Add URIs to declare one or more compute node URIs.
5. 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.
6. You can also choose to remove URIs or view the list of URIs.
7. Return the main menu of the utility.
Encrypt credentials and secrets
7/31/2018 • 2 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server


For security purposes, we strongly recommend that you encrypt strings in the appsettings.json configuration file.
For example, you should encrypt any remote database connection strings and/or LDAP/LDAP -S passwords
rather than store strings in plain text.
The encryption function available in the administration utility relies on the RSA algorithm for encryption.
To encrypt credentials or secrets:
1. On the web node, install a credential encryption certificate with a private key into the default certificate
store on the local machine. That location is in the Windows certificate store or in the Linux-based PFX file.
The length of the encryption key depends on the certificate, however, we recommend a length of at least
1048 bits.
Ensure that your certificate is secured properly. On Windows, for example, you can use Bitlocker to
encrypt the disk.
2. Open the administration tool to encrypt the secret:
For Machine Learning Server 9.3, use admin extension of the Azure Command Line Interface
(Azure CLI) to encrypt your credentials.
You do not need an Azure subscription to use this CLI. It is installed as part of Machine Learning
Server and runs locally.
a. On the machine hosting the node, launch a command line window or terminal with
administrator (Windows) or root/sudo (Linux) privileges.
b. Run the command to encrypt:

# With elevated privileges, run the following commands.


# Get help on the commands
az ml admin credentials --help

# Display list of certificates installed on this machine


az ml admin credentials list

# 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>

CLI OPTIONS DESCRIPTION

list Returns the list of certificates found on the


machine.
CLI OPTIONS DESCRIPTION

set Returns an encrypted string when you specify a


certificate and a secret to be encrypted.

--cert-store-name The certificate store name. In Windows, it is


usually one of "My", "Root", "TrustedPeople" etc.

--cert-store-location The certificate store location. In Windows, it is


either "CurrentUser" or "LocalMachine".

--cert-subject_name The subject name of certificate. You could check it


from "az ml admin credentials list". In the above
example, the subject name is "DC=Windows
Azure CRP Certificate Generator".

--secret Enter information you want to encrypt.

The CLI returns an encrypted string.


For versions 9.0 - 9.2: Launch the administration utility with administrator privileges (Windows) or
root/sudo privileges (Linux).
a. From the main menu, choose the option Encrypt Credentials.
b. Specify where is the encryption certificate installed:
Local machine (Computer account)
Current user (My user account)
c. Specify which encryption certificate to use.
d. Enter information you want to encrypt. The tool returns an encrypted string.
3. Open the configuration file, <web-node-install-path>/appsettings.json.
4. In that file, update the appropriate section for a remote database connection or the authentication
password strings.

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

Applies to: Machine Learning Server, Microsoft R Server


When no other form of authentication is used for Machine Learning Server, you must define a password for
the local administrator account called 'admin'. If you enable another form of authentication, the local
administrator account is automatically disabled.
The admin password must be 8-16 characters long and contain:
At least one uppercase character
At least one lowercase character
At least one number
At least one of the following special characters:
~ ! @ # $ % ^ & ( ) - _ + = | < > \ / ; : , .

Machine Learning Server 9.3


In Machine Learning Server 9.3, you can use admin extension of the Azure Command Line Interface (Azure
CLI) to set up and manage your configuration, including updating the local 'admin' account password.

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.

To update the password:


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 update the 'admin' password.

# With elevated privileges, run the following commands.


# Update the admin account password
az ml admin password set --old-password <OLD-PW> --new-password <NEW-PW> --confirm-password <NEW-PW>

Earlier versions: 9.0 - 9.2


To set or update the password:
1. Launch the administration utility.
2. From the main menu, choose the option to set a password for the local 'admin' account.
3. If a password was already defined, provide the current password.
4. When prompted, enter the new password for this administrator account. If your configuration has
multiple web nodes, we recommend the same password be used.
5. Confirm the password.

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

Applies to: Machine Learning Server, Microsoft R Server


You can update the ports numbers for the web node, compute node, or deployr-rserve (a forked version of
RServe).

Machine Learning Server 9.3


In Machine Learning Server 9.3, you can use admin extension of the Azure Command Line Interface (Azure CLI)
to set up and manage your configuration, including updating the local 'admin' account password.

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.

To update port values:


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 update the port value(s), where <Port> should be replaced by the actual port
number without the brackets.

# With elevated privileges, run the following commands.


# List current port values
az ml admin port list

# Update port values


az ml admin port update --webnode <Port> --computenode <Port> --rserve <Port>

3. Restart the node for the change to go into effect.

Earlier versions: 9.0 - 9.2


To update port values:
1. Log in to the machine on which your web node or compute node is installed.
2. Launch the administration utility with administrator privileges (Windows) or root/sudo privileges (Linux).
3. From the main menu, choose the option Change service ports.
4. From the submenu, choose the port you want to update.
5. Enter the port number.

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

Applies to: Machine Learning Server, Microsoft R Server 9.x


The Evaluate Capacity tool allows you to test your own R and Python code deployed as a web service in your
own setup. The tool outputs an accurate evaluation of the latency/thread count for the simulation parameters you
define and a break-down graph.
You can define the parameters for the traffic simulation for a given configuration or for a given web service. You
can test for maximum latency or maximum thread count.
Maximum Latency: Define the maximum number of milliseconds for a web node request, the initial
thread count, and the thread increments for the test. The test increases the number of threads by the
defined increment until the defined time limit is reached.
Maximum Thread Count: Define the number of threads against which you want to run, such as 10, 15,
or 40. The test increases the number of parallel requests by the specified increment until the maximum
number of threads is reached.

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...

Configure Test Parameters


Machine Learning Server 9.3
In Machine Learning Server 9.3, you can use admin extension of the Azure Command Line Interface (Azure CLI)
to evaluate your configuration's capacity.

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

# With elevated privileges, run the following commands.


az ml admin capacity run
CLI OPTIONS FOR 'CAPACITY RUN' DEFINITION DEFAULT

--strategy Use latency to increase the n/a


number of threads by the defined
increment until the defined time limit
is reached.

Use thread to increase the


number of parallel requests by the
specified increment until the
maximum number of threads is
reached.

--latency Used for the strategy latency , the 250


maximum latency in milliseconds
after which the test stops.

--max-thread Used for the strategy thread , the 50


maximum thread count after which
the test stops running.

--min-thread The minimum thread count at which 10


the test starts.

--increment The increment by which the number 10


of threads increases for each
iteration until the maximum latency
is reached.

--service The name of the web service to test. n/a

--version The version of the web service to n/a


test.

--args Enter the required input parameters n/a


for the service in a JSON format.
For example, for a vector/matrix,
follow the JSON format such as
'[1,2,3]' for vector, '[[…]]' for matrix. A
data.frame is a map where each key
is a column name, and each value is
represented by a vector of the
column values.

3. Review the results onscreen.


4. Paste the URL printed onto the screen into your browser for a visual representation of the results (see
below ).
Earlier versions: 9.0 - 9.2
Evaluate capacity for Machine Learning Server 9.2 and R Server 9.x.
1. On the web node, launch the administration utility with administrator privileges (Windows) or root/sudo
privileges (Linux).
2. From the main menu, choose the option to Evaluate Capacity and review the current test parameters.
3. To choose a different web service:
a. From the submenu, choose the option for Change the service for simulation.
b. Specify the new service:
To use an existing service, enter 'Yes' and provide the service's name and version as
'<name>/<version>'. For example, my-service/1.1 .
To use the generated [default service], enter 'No'.
c. When prompted, enter the required input parameters for the service in a JSON format.
For example, for a vector/matrix, follow the JSON format such as '[1,2,3]' for vector, '[[…]]' for matrix. A
data.frame is a map where each key is a column name, and each value is represented by a vector of the
column values.
4. To test for the maximum latency:
a. From the submenu, choose the option for Change thread/latency limits.
b. When prompted, enter 'Time' to define the number of threads against which you want to test.
c. Specify the maximum latency in milliseconds after which the test stops.
d. Specify the minimum thread count at which the test starts.
e. Specify the increment by which the number of threads increases for each iteration until the maximum
latency is reached.
5. To test for the maximum number of parallel requests that can be supported:
a. From the submenu, choose the option for Change thread/latency limits.
b. When prompted, enter 'Threads' to define the maximal threshold for the duration of a web node
request.
c. Specify the maximum thread count after which the test stops running.
d. Specify the minimum thread count at which the test starts.
e. Specify the increment by which the number of threads increases for each iteration.
6. From the main menu, choose the option to Evaluate Capacity. The current test parameters appear.
7. From the sub menu, choose the option to Run capacity simulation to start the simulation.
8. Review the results onscreen.
9. Paste the URL printed onto the screen into your browser for a visual representation of the results (see
below ).

Understanding the Results


It is important to understand the results of these simulations to determine whether any configuration changes
are warranted, such as adding more web or compute nodes, increasing the pool size, and so on.
Console Results
After the tool is run, the results are printed to the console.

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.

STAGE TIME MEASURED

Web Node Request Time for the request from the web node's controller to go all
the way to deployr-rserve/JupyterKernel and back.

Create Shell Time to create a session or take it from the pool

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.

To update the thread pool:


1. On each compute nodes, open the configuration file, <compute-node-install-path>/appsettings.json. (Find
the install path for your version.)
2. Search for the section starting with "Pool": {

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

Applies to: Machine Learning Server, Microsoft R Server 9.x


Cross-Origin Resource Sharing (CORS ) enables your client application to freely communicate and make cross-site
HTTP requests for resources from a domain other than where the web node is hosted. You can enable or disable
CORS in the external configuration file, appsettings.json. Support for CORS is disabled by default.
To enable CORS support:
1. On each web node, open the configuration file, <web-node-install-path>/appsettings.json. (Find the install
path for your version.)
2. Enable CORS in the "CORS": { section of the appsettings.json file:
a. Set CORS "Enabled": true

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"]
}

3. Launch the administrator's utility and restart the web node.


R Execution Security Considerations
4/13/2018 • 2 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server 9.x


deployr-rserve is a forked version of RServe maintained by Microsoft. In this forked version, parallel R sessions
are supported for both Windows and Linux thereby overcoming this limitation in the original rserve package.
This forked version of RServe is the R execution component behind the compute node for Machine Learning
Server (and R Server). Compute nodes are used to execute R code as a session or service. Each compute node has
its own pool of R shells.
This RServe fork acts as an interface to R, which by default is single threaded. However, if you use RevoScaleR
package functions, you benefit from multi-threaded processing in the R shell.

The Execution Context


Machine Learning Server provides various API calls that permit the execution of R scripts and R code. All
authentication takes place on the web node, and the execution of the R code is managed through Machine
Learning Server's custom version of RServe. RServe provides a TCP/IP interface to the R Interpreter running on
the machine. By default, Rserve runs on the same machine as the compute node. RServe is started by Windows
Service (RServeWinService) that runs under a virtual service account with low privileges. RServe inherits the
permissions of that virtual service account. In the default configuration, Rserve only accepts socket connections
from localhost . In other words, only those processes running on the same machine where RServe is running can
directly connect to it and execute R code. The connection from the Compute node to RServe can be further secured
by using a username and a password. If your configuration requires additional compute capacity, you can add
additional compute nodes for more sophisticated load-balancing capabilities.

Directory & User Isolation Considerations


In the R language, users can change files in the file system, download content from the web, download packages,
and so on.
In order to mitigate some of the risks associated with RServe, the service is set up to run using a single locked
down account with write permissions ONLY to the R working directory <MRS_home>\o16n\Rserve\workdir,
which is the directory under which R sessions and service calls store artifacts, files, and workspaces. While the
custom Rserve service can only write to the working directory, there is no user isolation between the session
folders. However, all sessions execution requests can only be initiated by authenticated users and you can further
control user permissions to services using RBAC.
R package management when operationalizing
analytics with Machine Learning Server
6/18/2018 • 6 minutes to read • Edit Online

Applies to: Machine Learning Server, Microsoft R Server 9.x


One of the strengths of the R language is the thousands of third-party packages that have been made publicly
available via CRAN, the Comprehensive R Archive Network. R includes various functions that make it easy to
download and install these packages. Whenever you deploy an R script, the packages (and their dependencies)
needed by that R code must be available at runtime, or else the execution fails.
By adopting the R package management approaches discussed herein, data scientists can avoid issues such as a
locally tested script tested failing due to missing package dependencies in the remote environment.
As the Machine Learning Server administrator, you must ensure that the R code running on any compute nodes
has access to the R package dependencies declared within that code. The right set of R package versions must be
installed for the organization and accessible to all users.
However, in many enterprise environments, access to the Internet is limited or non-existent. In such
environments, it is useful to create a local package repository that users can access from within the corporate
firewall using Option 1.
You can also manually install the packages using a master script using Option 2.
Data scientists can also test out packages without risk to the production environment using the mrsdeploy
package option (3).

Option 1: Local Package Repository (Offline Solution)


Audience: System administrator
Applies to: Development -or- Production Environments

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.

# Define the package source: a CRAN mirror, or an MRAN snapshot


CRAN_mirror <- c(CRAN = "https://mran.microsoft.com/snapshot/2016-11-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.

# Define the local download location


local_repo <- "~/my-miniCRAN-repo"

e. Download and install the packages you need to this computer.

# List the packages you need


# Do not specify dependencies
pkgs_needed <- c("Package-A", "Package-B", "Package-...")

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.

2. On each compute node:


a. Copy the miniCRAN repository from the machine with Internet connectivity to the R_SERVICES
library on the SQL Server instance.
b. Launch your preferred R IDE or an R tool such as Rgui.exe.
c. At the R prompt, run the R command install.packages().
d. At the prompt, specify a repository and specify the directory containing the files you copied. That is,
the local miniCRAN repository.

pkgs_needed <- c("Package-A", "Package-B", "Package-...")


local_repo <- "~/my-miniCRAN-repo"

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()

Option 2: R Script with List of Approved Packages


Audience: System administrator
Applies to: Development -or- Production Environments

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-...")

2. Manually run this R script on each compute node.

Update and manually rerun this script on each compute node each time a new package or version is needed
in the server environment.

Option 3: Remote Session Testing


Audience: Data Scientist or the system administrator
Applies to: Development Environments

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>

For example, for Active Directory/LDAP:

> remoteLogin("https://localhost:12800",
session=TRUE,
diff=TRUE,
commandline=TRUE)

REMOTE>

A new remote session is started.


4. Run R code in the remote environment:
a. Install new R packages and upload any needed R objects and files into the remote R session.
REMOTE> install.packages("ggplot2")

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"

Take note of the snapshotId to call this snapshot later.

To reuse those installed packages, objects and files:


You can reload the snapshot (installed packages, objects, files) within the context of a remote session.

> 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

Applies to: Machine Learning Server, Microsoft R Server 9.x

Machine Learning Server 9.3


The installation path depends on the operating system and the type of node (web or compute).
Find path to your server directory:

OS <SERVER-DIRECTORY>

Windows C:\Program Files\Microsoft\ML


Server\PYTHON_SERVER\o16n
C:\Program Files\Microsoft\ML Server\R_SERVER\o16n

Linux /opt/microsoft/mlserver/9.3.0/o16n

Find path to log files or appsettings.json on each node:

FILE(S) FILEPATH BY NODE

Log files Web node:<server-


directory>\Microsoft.MLServer.WebNode\logs*.*
Compute node: <server-
directory>\Microsoft.MLServer.ComputeNode\logs*.*

appsettings.json Web node: <server-


directory>\Microsoft.MLServer.WebNode\appsettings.js
on
Compute node: <server-
directory>\Microsoft.MLServer.ComputeNode\appsettin
gs.json

Machine Learning Server 9.2.1


The installation path depends on the operating system and the type of node (web or compute).

OS PATH

Windows C:\Program Files\Microsoft\ML


Server\PYTHON_SERVER\o16n
C:\Program Files\Microsoft\ML Server\R_SERVER\o16n

Linux /opt/microsoft/mlserver/9.2.1/o16n

Administration utility is under: <server-directory>\Microsoft.MLServer.Utils.AdminUtil\


Log files are under: <server-directory>\<node-directory>\logs*.*
appsettings.json is under: <server-directory>\<node-directory>\appsettings.json
Where the <node-directory> name:

TYPE NODE DIRECTORY NAME

Web node Microsoft.MLServer.WebNode

Compute node Microsoft.MLServer.ComputeNode

Microsoft R Server 9.1.0


The installation path depends on the operating system and the type of node (web or compute).

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>

Where the <node-directory> name:

TYPE NODE DIRECTORY NAME

Web node Microsoft.RServer.WebNode

Compute node Microsoft.RServer.ComputeNode

Microsoft R Server 9.0.1


The installation path depends on the operating system and the type of node (web or compute).

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>

Where the <node-directory> name:

TYPE NODE DIRECTORY NAME

Web node Microsoft.DeployR.Server.WebAPI

Compute node Microsoft.DeployR.Server.BackEnd


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.

Azure virtual machines with Machine Learning Server


You can provision an Azure virtual machine, running either a Windows or Linux operating system, that already has
Machine Learning Server with both R and Python support.
The easiest way to provision the VM is one-click install using an ARM template. If you have an Azure subscription,
you can use an ARM template that performs the following tasks: provisions a virtual machine, installs Machine
Learning Server, opens port 12800, and configures the server for operationalization.
Follow these links to get started:
One-click installation of an auto-scale environment to operationalize your R analytics
Machine Learning Server ARM templates on Github
Other options include:
SQL Server Machine Learning Server as preconfigured Azure virtual machine on Windows
Machine Learning Server as preconfigured Azure virtual machine on Linux or Windows. Choose this
approach if you want to build your VM manually. The VM image provides the core engine but
operationalization is not configured. For instructions on how to add operationalization, see Operationalize
analytics with Machine Learning Server.

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.

Azure virtual machines with Machine Learning Server


You can provision an Azure virtual machine, running either a Windows or Linux operating system, that already has
Machine Learning Server with both R and Python support.
The easiest way to provision the VM is one-click install using an ARM template. If you have an Azure subscription,
you can use an ARM template that performs the following tasks: provisions a virtual machine, installs Machine
Learning Server, opens port 12800, and configures the server for operationalization.
Follow these links to get started:
One-click installation of an auto-scale environment to operationalize your R analytics
Machine Learning Server ARM templates on Github
Other options include:
SQL Server Machine Learning Server as preconfigured Azure virtual machine on Windows
Machine Learning Server as preconfigured Azure virtual machine on Linux or Windows. Choose this
approach if you want to build your VM manually. The VM image provides the core engine but
operationalization is not configured. For instructions on how to add operationalization, see Operationalize
analytics with Machine Learning Server.

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.

Start using Machine Server/ Machine Learning Services in the Cloud


You’ll need to create your own Microsoft Data Science Virtual Machine (VM ). To create this VM, you must have an
Azure subscription and an Azure storage account. Learn more about creating a Data Science VM see here.
After you provision your virtual machine from the image, you can start exploring your data and modeling right
away. The data on the virtual machine is stored on the cloud and highly available.

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.

How to provision with templates


The easiest approach is to use an ARM template that both installs and configures the VM and Machine Learning
Server. The template defines a resource group, the virtual network, a DNS name.
ARM templates are available on Github, with options for a single-server install or distributed installation that
places web nodes and compute nodes on different VMs within the same virtual network. There are also template
options for data Science VMs, which include a broader selection of tools and technologies, of which Machine
Learning Server is just one.
When you use a template, the server is operationalized for remote connections, web service deployment, logging,
and so forth. For more information, see Operationalize analytics with Machine Learning Server.
1. Go to the Github repo containing the templates: https://github.com/Microsoft/microsoft-
r/tree/master/mlserver-arm-templates
2. Choose your configuration. Click one-box configuration to install all packages and features on a single
VM, or click enterprise-configuration if you need a cluster.
3. Choose the operating system: Windows, Linux, Windows Data Science VM, or Linux Data Science VM.
4. On the readme page for the option you selected, click Deploy to Azure. You are prompted for input values
necessary to complete the deployment, including passwords and the level of physical resources used by the
VM.

How to provision in the portal


If you are new to using Azure VMs, we recommend that you review this article for more information about using
the portal and configuring a virtual machine.
1. Sign in to the Azure portal.
2. Click Create a resource.
3. Search for Machine Learning Server.
4. From the list of virtual machines, choose the VM image providing the operating system and version of
Machine Learning Server you want to install.
5. Accept the terms and get started by clicking Create.
6. Follow the onscreen prompts to provision the VM.
7. After the VM is deployed and running, connect to the VM to begin interacting with Machine Learning
Server.
8. At this point, you can also:
Install an R IDE or a Python interpreter.
Configure Machine Learning Server to operationalize your analytics so it acts as a deployment
server and host analytic web services.

Connect to the Virtual Machine


Once the VM is deployed, you can open the portal page for that VM and click Connect to obtain connection
information in the form of the IP address and port. You can further configure the VM to use a domain name or
static IP, but for an initial connection, the dynamic IP is sufficient.
Many people have success connecting using an open-source SSH client. A few examples include PuTTY, SmarTTY,
and WinCP.

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 .

PS C:\\Users\\juser> Select-AzureSubscription -SubscriptionName "Visual Studio Ultimate with MSDN" –Current

PS C:\\Users\\juser> Switch-AzureMode -Name AzureResourceManager

PS C:\\Users\\juser> New-AzurePublicIpAddress -Name rservercloudvm -ResourceGroupName rservercloudrg -Location


"South Central US" -DomainNameLabel rservercloud -AllocationMethod Dynamic

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.

Access Data in an Azure Storage Account


When you need to use data from your Azure storage account, there are several options for accessing or moving
the data:
Copy the data from your storage account to the local file system using a utility, such as AzCopy.
Add the files to a file share on your storage account and then mount the file share as a network drive on
your VM. For more information, see Mounting Azure files.

Resources & Documentation


Additional documentation about Machine Learning can be found on this documentation site using the table of
contents on your left.
See these additional resources to learn about R in general:
DataCamp: A free introductory and intermediate course in R, and a course on working with big data using
Revolution R
Stack Overflow: A good resource for R and Python programming and ML tools questions
Cross Validated: A site for questions about statistical issues in machine learning
R Help mailing list: The list and its archives offer a good resource of historical information
MRAN website: Many other R resources.
About Microsoft R Client
4/13/2018 • 5 minutes to read • Edit Online

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

Machine Learning Server vs R Client


Machine Learning Server and Microsoft R Client offer virtually identical R packages, but each one targets
different scenarios. R Client is intended for data scientists who create solutions that run locally. Machine
Learning Server is commercial software that runs on a range of platforms, at much greater scale, with
infrastructure for handling major workloads, on client-server topologies that support remote access over
authenticated connections.
You can work with R Client standalone. You can also use it with Machine Learning Server, where you learn and
develop on R Client, and then migrate your work to Machine Learning Server or execute it remotely on an
Machine Learning Server whenever you need the scale, support, and infrastructure of a server configured for
operationalization.
From R Client, shift data-centric RevoScaleR operations to a remote Machine Learning Server by creating a
remote compute context. Remote compute context is supported for SQL Server Machine Learning Services
or a Spark cluster. Typically, you shift the compute context to bring computations to where the data resides,
thus avoiding data transfer over the network.
From R Client, run arbitrary R code on a remote production instance of Machine Learning Server. This is a
general-purpose capability: from a command line, you can switch between local and remote sessions
interactively, useful for testing, administration, or to use the additional processing power of a production
server. For remote code execution, use mrsdeployand remoteLogin() or remoteLoginAAD (). For more
information, see Execute on a remote server .

Get started with R Client


Getting started with Microsoft R Client is as easy as 1-2-3. Click a step to get started:
![Step 1](./media/ what-is-microsoft-r-client/Step1.png)
1. Install R Client
The first step is to download Microsoft R Client for your operating system and install it. To learn more about
the supported platforms or installation steps, please see the following articles:
Install Microsoft R Client on Windows
Install Microsoft R Client for Linux
Compatibility with Machine Learning Server & R Server
2. Configure Your IDE
While R is a command line driven program, you can also use your favorite R integrated development
environment (IDE ) to interact with Microsoft R Client. To do so, you must point that IDE to the R Client R
executable. This way, whenever you execute your R code, you'll do so using R Client and benefit from the
proprietary packages installed with R Client. R IDE options include R Tools for Visual Studio on Windows
(Recommended), RStudio, or any other R development environment.
Set up RTVS for R Client on Windows: R Tools for Visual Studio (RTVS ) is an integrated
development environment available as a free add-in for any edition of Visual Studio. To make R Client
the default R engine for RTVS, choose Change R to Microsoft R Client from the R Tools menu.
Set up RStudio for R Client on Windows or Linux: RStudio is another popular R IDE. To make R
Client the default R engine for RStudio, update the path to R. For example, point to
C:\Program Files\Microsoft\R Client\R_SERVER\bin\x64 on Windows.

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.

3. Try Out R Client


Now that you've installed R Client, you can start building and running some R code. Launch R on the
command line or in your IDE and:
Run the sample R code as described in this quickstart guide.
Or, develop your own solutions using RevoScaleR functions, MicrosoftML functions, and APIs.
When ready, you can run that R code using R Client or even send those R commands to a remote Machine
Learning Server for execution if Machine Learning Server is also installed in your organization.

What's new in Microsoft R Client


Microsoft R Client 3.4.3
This release of R Client, built on open-source R 3.4.3, is at the same functional level as Machine Learning
Server 9.3. Download R Client from https://aka.ms/rclient (Windows) or https://aka.ms/rclientlinux (Linux).
R Client includes these enhancements:
R Client (Linux) now supports a remote SQL Server compute context on Windows.
sqlrutils is now supported for R Client (Linux).
Microsoft R Client 3.4.1
This release of R Client, built on open-source R 3.4.1, is at the same functional level as Machine Learning
Server 9.2.1. For more information about features in that release, see here.
Microsoft R Client 3.3.3
This release of R Client, built on open-source R 3.3.3. Key release features include:
Installations on Linux are now possible for R Client
Several of the packages installed have been updated. Learn more about here.
Microsoft R Client 3.3.2
The following release notes apply to Microsoft R Client, which can be downloaded from
https://aka.ms/rclient/download.
New enhanced Microsoft R Client Getting Started guide
A new 'version check' and auto-update is now possible using CheckForUpdates() in your R Console
Offline installations are now possible for R Client
New packages now bundled with Microsoft R Client:
mrsdeploy - adds remote execution and web service deployment from R Client 3.3.2 to a remote R
Server 9.0.1 instance
MicrosoftML - adds machine learning algorithms to R script that executes on either R Client or R
Server
olapR - adds MDX query support through connections to OLAP cubes on a SQL Server 2016
Analysis Services instance
and the packages bundled with Microsoft R Open 3.3.2
Learn more about the new and updated packages in this release.
Updated end-user license agreement
Telemetry collection is now enabled. Learn more about this feature and how to turn it off.

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

Operating Systems 64-bit versions of Microsoft Windows 7, 8.1, and 10

Free disk space 600 MB recommended, after installation of all prerequisites


If pre-trained models are installed, 1.2 GB is recommended

Available RAM 4+ GB recommended

Internet access Needed to download R Client and any dependencies

.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.

The following additional components are included in Setup and required:


Microsoft R Open 3.4.3
Microsoft MPI 8.1
AS OLE DB (SQL Server 2016) provider
Microsoft Visual C++ 2015 Redistributable
Optionally, you can install the pre-trained models for sentiment analysis and image detection.

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.

How to install (with internet access)


1. Log in to the machine with administrator privileges.
2. Download Microsoft R Client from the following link: https://aka.ms/rclient/
3. Launch the Microsoft R Client setup and follow the prompts.
4. Accept the default installation path for Microsoft R Client or choose another location.
5. Review the components that are installed as part of Microsoft R Client.
While most are required, you can choose to add additional components such as pre-trained models.
6. Accept the Microsoft R Client license terms.
7. Accept the Microsoft R Open license term. Microsoft R Client is built on Microsoft R Open, Microsoft's
enhanced distribution of R. Setup installs the correct version of R Open for you automatically.
8. Click Finish when installation is finished. A welcome screen opens to introduce you to the product and
documentation.

How to offline install (without internet access)


WARNING
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.

1. On a machine with unrestricted internet access:


a. Download Microsoft R Client from https://aka.ms/rclient/.
b. Download the Microsoft R Open ( *.cab) needed to install R Client from
https://go.microsoft.com/fwlink/?LinkId=867186.
c. Download .NET Framework 4.5.2 from https://www.microsoft.com/download/details.aspx?id=42642.
d. Download, if desired, the .cab file for pre-trained machine learning models from:
https://go.microsoft.com/fwlink/?LinkId=852727. Learn more about these pre-trained models.
e. Copy the downloaded files to a network share or portable drive.
2. On the machine with restricted internet access:
a. Log in with administrator privileges.
b. Copy the .cab file and R Client installer from the network share/portable drive on the first machine to
the machine that has restricted internet access. Put the CAB files in the setup user's temp folder
under %temp% .
c. Copy and install the .NET Framework. Restart your computer if you installed the .NET Framework.
d. Run RClientSetup.exe , which finds the cab file in the temp folder for you.
e. Accept the default installation path for Microsoft R Client or choose another location.
f. Review the components that are installed as part of Microsoft R Client.
While most are required, you can choose to add additional components such as pre-trained
models.
g. Accept the Microsoft R Client license terms.
h. Accept the Microsoft R Open license term. Microsoft R Client is built on Microsoft R Open,
Microsoft's enhanced distribution of R. Setup installs the correct version of R Open for you
automatically.
3. Without internet access, we recommend disabling the auto -update check feature so that R Client can
launch more quickly. Do so in the Rprofile.site file by adding a comment character (#) at the start of the
line: mrupdate::mrCheckForUpdates()

IMPORTANT
Review the recommendations in Package Management for instructions on how to set up a local package repository using
MRAN or miniCRAN.

Silent and Passive Installs


To install Microsoft R Client from a script on Windows, use the following command line switches:

MODE INSTALL COMMAND DESCRIPTION

Passive RClientSetup.exe /passive No prompts, but a progress indicator

Silent RClientSetup.exe /quiet No prompts nor progress indicator

What's Installed with R Client


Microsoft R Client installs the R base packages and a set of enhanced and proprietary R packages that support
parallel processing, improved performance, and connectivity to data sources including SQL Server and Hadoop.
The R libraries are installed under the R Client installation directory, C:\Program Files\Microsoft\R Client\R_SERVER
. Additionally, this directory contains the documentation for the R base packages, sample data, and the R library.
All tools for the standard base R (RTerm, Rgui.exe, and RScript) are also included with Microsoft R Client under
<install-directory>\bin . Documentation for these tools can be found in the setup folder:
<install-directory>\doc and in <install-directory>\doc\manual . One easy way to open these files is to open
RGui , click Help, and select one of the options.

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

Operating Systems Supported versions include:


- Red Hat Enterprise Linux (RHEL) and CentOS 6.x and 7.x
- Ubuntu 14.04 and 16.04
- SUSE Linux Enterprise Server 11 (SLES11)

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-architecture
chips (also known as IA-64) are not supported. Multiple-core
chips are recommended.

Available RAM 2 GB of RAM is required; 8 GB or more are recommended

Free disk space 600 MB recommended, after installation of all prerequisites


1.2 GB recommended if pre-trained models are installed

Internet access Needed to download R Client and any dependencies. If you


do not have an internet connection, for the instructions for an
offline installation

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:

PACKAGE MANAGER PLATFORM

yum RHEL, CentOS

apt Ubuntu online


PACKAGE MANAGER PLATFORM

dpkg Ubuntu offline

zypper SUSE

rpm RHEL, CentOS, SUSE

Root or super user permissions


You must install Microsoft R Client to a local drive on your computer.
You may need to disable your antivirus software. If you do, please turn it back on as soon as you are
finished.

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.

How to install (with internet access)


This section walks you through an R Client 3.4.3 deployment. Under these instructions, your installation includes
the ability to use the RevoScaleR, MicrosoftML packages, and mrsdeploy.
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 setting
the repo, see Linux Software Repository for Microsoft Products.

NOTE
If the repository configuration file is not present in the /etc directory, try manual configuration for repository registration.

On Ubuntu 14.04 - 16.04


With root or sudo permissions, run the following commands:
# Install as root or sudo
sudo su

# If your system does not have the https apt transport option, add it now
apt-get install apt-transport-https

# Set the package repository location containing the R Client distribution.


# On Ubuntu 14.04.
# wget http://packages.microsoft.com/config/ubuntu/14.04/prod/packages-microsoft-prod.deb
# On Ubuntu 16.04.
wget http://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb

# Register the repo.


dpkg -i packages-microsoft-prod.deb

# Check for microsoft-prod.list configuration file to verify registration.


ls -la /etc/apt/sources.list.d/

# Update packages on your system


apt-get update

# Install the packages


apt-get install microsoft-r-client-packages-3.4.3

# List the packages


ls /opt/microsoft/rclient/

Red Hat and CentOS 6/7


With root or sudo permissions, run the following commands:

# Install as root or sudo


sudo su

# Set the package repository location containing the R Client distribution.


# On RHEL 6:
# rpm -Uvh https://packages.microsoft.com/config/rhel/6/packages-microsoft-prod.rpm
# On RHEL 7:
rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

# Check for microsoft-prod.repo configuration file to verify registration.


ls -la /etc/yum.repos.d/

# Update packages on your system


yum update

# Install the packages


yum install microsoft-r-client-packages-3.4.3

SUSE Linux Enterprise Server 11


With root or sudo permissions, run the following commands:
# Install as root or sudo
sudo su

# Set the package repository location containing the R Client distribution.


zypper ar -f http://packages.microsoft.com/sles/11/prod packages-microsoft-com

# Update packages on your system


zypper update

# Install the packages


zypper install microsoft-r-client-packages-3.4.3

You can now set up your IDE and try out some sample code.

How to install offline (without internet access)


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 3.4.1, it will be replaced with the 3.4.3 version.
Packages for all supported versions of Linux can be found at packages.microsoft.com.
Redhat 6: https://packages.microsoft.com/rhel/6/prod/
Redhat 7: https://packages.microsoft.com/rhel/7/prod/
SLES 11: https://packages.microsoft.com/sles/11/prod/
Ubuntu 14.04: https://packages.microsoft.com/ubuntu/14.04/prod/
Ubuntu 16.04: https://packages.microsoft.com/ubuntu/16.04/prod/
Package list
The following packages comprise a full R Client installation:

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 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

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

Repeat for each package.


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.
Connect and validate
1. List installed packages:
On CentOS and RHEL: rpm -qa | grep microsoft
On Ubuntu: apt list --installed | grep microsoft
On SLES11: zypper se microsoft
2. Once you have a package name, you can obtain verbose version information. For example:
On CentOS and RHEL: $ rpm -qi microsoft-r-client-packages-3.4.3
On Ubuntu: $ dpkg --status microsoft-r-client-packages-3.4.3
On SLES: zypper info microsoft-r-client-packages-3.4.3
Output on Ubuntu is as follows:

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.

How to uninstall R Client 3.4.1


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. 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 might 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 R Client is the only Microsoft software
you have, you can remove it now.
3. After packages are uninstalled, remove remaining files. On root@, determine whether additional files still
exist:
$ ls /opt/microsoft/rclient/3.4.3/
4. Remove the entire directory:
$ rm -fr ls /opt/microsoft/rclient/3.4.3/

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

SQL Server 2017 Machine Learning Services


& SQL Server 2016 R Services (in-database & standalone)

Machine Learning Server 8.0.5 - 9.3


& R Server for Linux

Machine Learning Server 8.0.5 - 9.3


& R Server for Hadoop

Machine Learning Server 9.1 - 9.3


& R Server for Windows

HDInsight: cluster type = Machine Learning or R Server 9.2 - 9.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:

R CLIENT RELEASES SERVER RELEASES RELEASE DATE

3.4.3 9.3 February 2018

3.4.1 9.2.1 September 2017

3.4.0 9.1 March 2017

3.3.2 9.0 December 2016

3.3.0 8.0.5 June 2016

Learn about what's new in the latest Microsoft R Client release.


How to install Python client libraries for remote
access to a Machine Learning Server
9/25/2018 • 6 minutes to read • Edit Online

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.

Check package versions


While not required, it's a good idea to cross-check package versions so that you can match versions on the server
with those on the client. On a server with restricted access, you might need an administrator to get this
information for you.
Package information on SQL Server
Package information on Machine Learning Server for Hadoop

Install Python libraries on Windows


1. Download the installation shell script from https://aka.ms/mls93-py (or use https://aka.ms/mls-py for the
9.2. release). The script installs Anaconda 4.2.0, which includes Python 3.5.2, along with all packages listed
previously.
2. Open PowerShell window with elevated administrator permissions (right-click Run as administrator).
3. Go to the folder in which you downloaded the installer and run the script. Add the -InstallFolder
command-line argument to specify a folder location for the libraries. For example:
cd {{download-directory}}
.\Install-PyForMLS.ps1 -InstallFolder "C:\path-to-python-for-mls")

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.

Install Python libraries on Linux


On each supported OS, the package manager downloads packages from the repository, determines
dependencies, retrieves additional packages, and installs the software. After installation completes, mlserver-
python executable is at '/usr/bin'.
On Ubuntu 14.04 - 16.04
With root or sudo permissions, run the following commands:

# 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

# Add the Microsoft public signing key for Secure APT


apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893

# Verification step: look for the mlserver.list configuration file


ls -la /etc/apt/sources.list.d/

# Update packages on your system


apt-get update

# If your system does not have the https apt transport option
apt-get install apt-transport-https

# Install the packages


apt-get install microsoft-mlserver-packages-py-9.3.0

Red Hat and CentOS 6/7


With root or sudo permissions, run the following commands:
# Set location of the package repository. For example for 7.
rpm -Uvh https://packages.microsoft.com/rhel/7/prod/microsoft-mlserver-packages-py-9.3.0.rpm

# Verification step: look for the mlserver.list configuration file


ls -la /etc/apt/sources.list.d/

# Install the packages


yum install microsoft-mlserver-packages-py-9.3.0

SUSE Linux Enterprise Server 11


With root or sudo permissions, run the following commands:

# 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

# Verification step: look for the mlserver.list configuration file


ls -la /etc/apt/sources.list.d/

# Install the packages


zypper install microsoft-mlserver-packages-py-9.3.0

Test local package installation


As a verification step, call functions from the revoscalepy package and from scikit, included in Anaconda.
If you get a "module not found" error for any of the instructions below, verify you are loading the python
interpreter from the right location. If using Visual Studio, confirm that you selected the custom environment
pointing the prefix and interpreter paths to the correct location.

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.

from sklearn import datasets


import pandas as pd
iris = datasets.load_iris()
df = pd.DataFrame(iris.data, columns=iris.feature_names)

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>)

Summary Statistics Results for: petal length (cm)

Number of valid observations: 150.0


Number of missing observations: 0.0

Name Mean StdDev Min Max ValidObs MissingObs


0 petal length (cm) 3.758667 1.76442 1.0 6.9 150.0 0.0

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

Applies to: Machine Learning Server 9.x


Machine Learning Server installs a local, folder-only install of Anaconda to avoid interfering with other Python
distributions on your system. As such, packages providing the Python modules in Machine Learning Server
(revoscalepy, microsoftml, azureml-model-management-sdk) are not available system-wide. In this article, learn
how to load the Python interpreter installed with Machine Learning Server in your Python IDE of choice.

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)

Visual Studio 2017 with Python


The setup program for Machine Learning Server 9.3 adds Python distribution information to the registry, which
makes loading Python modules more straightforward than in previous releases.
However, when using an earlier release or to confirm settings, follow these steps to add Machine Learning
Server's Python distribution information to an environment. For more information, see Python environments
(Visual Studio docs).
1. In Tools > Python > Python environments, click + Custom to create a new environment.
2. In Description, give the environment name, and then fill in the following fields.
3. In Prefix path, enter C:\Program Files\Microsoft\ML Server\PYTHON_SERVER .
4. Click Auto Detect in the top right to auto-fill the remaining fields:
Interpreter path should be C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\python.exe .
Windowed interpreter should be C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\pythonw.exe .
Language version should be 3.5 for Python 3.5.
Path should be read-only.
5. Click Apply in the top right to save the environment.
You can use the environment you just created by selecting it in an interactive window. As a verification step, run
the example from the rx_summary function in revoscalepy.

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.

How to load Python samples on Windows


1. Download just the .ipynb files from the Github repo https://github.com/Microsoft/ML -Server-Python-
Samples:
Go to the source page: ML -Server-Python-Samples/microsoftml/quickstarts/binary-
classification/Binary+Classification+Quickstart.ipynb
In the Github page for this notebook, click Raw to show the Python script.
Use the browser save-as command to save a local copy of the file. Apply an .ipynb file extension.

NOTE
Some browsers append a .txt file extension automatically. Remove the extraneous .txt extension if you see it in the file
name.

2. Upload the .ipynb to your local server:


Navigate to the Jupyter-notebook executable on your computer:
C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\Scripts
Right-click Run as administrator on jupyter-notebook.exe
The Notebook Dashboard opens in your default browser at http://localhost:8888/tree .
Click Upload on the top right corner.
Navigate to the folder where you saved the .ipynb file. Most likely, it's in the Downloads folder:
\Downloads\ML-Server-Python-Samples-master\microsoftml\quickstarts\binary-
classification\Binary+Classification+Quickstart.ipynb
Select the file and click Open to add the notebook to your server.
3. Click the notebook to load it, then click Run to step through the content and script. For this particular
notebook, no additional configuration is required. For the web service notebook, read the readme for
configuration requirements.

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 .

You can now import revoscalepy, microsoftml, or azureml-model-management-sdk modules.


You can also choose Tools > Python Console to open an interactive window.

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.

Configure for multi-user access on Linux


This procedure applies to Linux or Spark edge node upon which you are hosting a JupyterHub or multi-user
server. It does not apply to single-user localhost servers.
For a multi-user server, add our custom kernel MLSPython to the data directory of your server. Machine
Learning Server provides this kernel for notebooks and scripts that make calls to revoscalepy, microsoftml, and
azureml.
Run the following command to install the kernel:

sudo /usr/bin/anaconda/bin/jupyter kernelspec install


/opt/microsoft/mlserver/9.2.1/libraries/jupyter/kernels/MMLSPy

Check kernel installation


Verify the file is in the expected location.
1. Run jupyter –data-dir from the node on which Jupyter Notebook Server is installed.
2. Note the path returned by -data-dir . This is where Jupyter stores its data directories, including kernels.
3. Navigate to the folder. You should see MLSPython listed.
If the installation command did not succeed, you can manually copy the MLSPython directory from
/opt/microsoft/mlserver/9.3.0/libraries/kernels/ to the kernels subdirectory under the data directory.

You might need to restart your server in order for the server to pick up the kernel.

Use the MMLSPy notebook option


In Jupyter dashboard, click New to create a new notebook. You should see the new kernel (MMLSPy) in the drop
down.
See also
microsoftml function reference
revoscalepy function reference
Jupyter/IPython Notebook Quick Start Guide
Installation guides for earlier releases
4/13/2018 • 2 minutes to read • Edit Online

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

MicrosoftML package R Function library in R Server and on Apache Spark on a


HDInsight cluster.

Create text classification models for problems such as


sentiment analysis and support ticket classification.

Train deep neural nets with GPU acceleration in order to


solve complex problems such as retail image classification
and handwriting analysis.

Work with high-dimensional categorical data for


scenarios like online advertising click-through prediction.

Solve common machine learning tasks such as churn


prediction, loan risk analysis, and demand forecasting using
state-of-the-art, fast and accurate algorithms.

Train models 2x faster than logistic regression with the


Fast Linear Algorithm (SDCA).

Train multilayer custom nets on GPUs up to 8x faster with


GPU acceleration for Neural Nets.

Reduce training time up to 10x while still retaining model


accuracy using feature selection.

Pretrained models Deep neural network models for sentiment analysis and
image featurization

Ensemble methods Use a combination of learning algorithms to provide better


predictive performance than the algorithms could
individually. The approach is used primarily in the
Hadoop/Spark environment for training across a multi-node
cluster. But it can also be used in a single-node/local context.
FEATURE DESCRIPTION

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).

RevoScaleR new functions rxExecBy enables parallel processing of partitioned data in


Spark and SQL Server compute contexts. Leverage the new
rxExecBy function against unordered data, have it sorted
and grouped into partitions (one partition per entity), and
then processed in parallel using whatever function or
operation you want to run. For example, to project the health
outcomes of individuals in a fitness study, you could run a
prediction model over data collected about each person.
Supported compute context includes RxSpark and
RxInSQLServer .

rxExecByPartition for running analytics computation in


parallel on individual data partitions split from an input data
source based on the specified variables.

rxGetPartitions gets the partitions of a previously


partitioned Xdf data source.

rxGetSparklyrConnection gets a Spark compute context


with sparklyr interop.

RxOrcData creates data sets based on data stored in


Optimized Row Columnar (ORC) format.

rxSerializeModel serializes a RevoScaleR model so that it


can be saved to disk or loaded into a SQL Server database
table. Serialized models are requred for real-time scoring.

rxSparkCacheData sets the Cache flag in a Spark compute


context.

rxSyncPackages copies packages from a user table in a SQL


Server database to a location on the file system so that R
scripts can call functions in those packages.

RevoScaleR enhanced functions rxDataStep adds multithreaded support.

rxImport adds multithreaded support.

rxMerge for Merging data frames in Spark compute


context.
FEATURE DESCRIPTION

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.

Remote execution Asynchronous remote execution is now supported using the


mrsdeploy R package. To continue working in your
development environment during the remote script
execution, execute your R script asynchronously using the
async parameter. This is particularly useful when you are
running scripts that have long execution times. Learn more
about asynchronous remote execution.

Operationalizing analytics Role-based access control to analytical web services:


Administrators can define authorization roles to give web
service permissions to groups of users with authorization
roles. These roles determine who can publish, update, and
delete their own web services, those who can also update
and delete the web services published by other users, and
who can only list and consume web services. Users are
assigned to roles using the security groups defined in your
organization's Active Directory /LDAP or Azure Active
Directory server. Learn more about roles.

Scoring perform boosts with real time scoring: Web


services that are published with a supported R model object
on Windows platforms can now benefit from an extra
realtime performance boost and lower latency. Simply use a
supported model object and set the
serviceType = Realtime argument at publish time.
Expanded platform support in future releases. Learn more
about Realtime web services.

Asynchronously batch processing for large input data:


Web services can now be consumed asynchronously via
batch execution. The Asynchronous Batch approach involves
the execution of code without manual intervention using
multiple asynchronous API calls on a specific web service sent
as a single request to R Server. Previously, web services could
only be consumed using the Request-Response method.
Learn more about asynchronous batch consumption.

Autoscaling of a grid of web and compute nodes on


Azure. A script template will be offered to easily spin up a set
of R Server VMs in Azure, configure them as a grid for
operationalizing analytics and remote execution. This grid can
be scaled up or down based on CPU usage.

Read about the differences between DeployR and R Server


9.x Operationalization.

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.

MicrosoftML A collection of functions for incorporating machine learning


into R code or script that executes on R Server and R Client.
Available in R Server for Windows, R Client for Windows, and
SQL Server 2016 R Services.

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

RevoScaleR Package Package management functions are now available in


RevoScaleR and are particularly relevant for package
management in SQL Server R Services and SQL Server
Machine Learning Services.

Additional updates include support for Spark 2.0.

RxHiveData generates a Hive Data Source object.

RxParquetData generates a Parquet Data Source object.

rxSparkConnect creates a persistent Spark compute


context.

rxSparkDisconnect disconnects a Spark session and return


to a local compute context.

rxSparkListData lists cached RxParquetData or


RxHiveData data source objects.

rxSparkRemoveData removes cached RxParquetData or


RxHiveData data source objects. Although RevoScaleR jobs
only execute on Spark 2.0 if you have R Server 9.0.1 for
Hadoop, you can create solutions containing Hive, Parquet,
and Spark-related functions in R Client.
FEATURE DESCRIPTION

Operationalization features Formerly known as DeployR, the operationalization feature is


now fully integrated into R Server, with a new ASP .NET core
bringing improved support from Microsoft. After installing R
Server on select platforms, you'll have everything you need
to enable operationalization and configure R Server to host R
analytics web services and remote R sessions.

In many enterprises, the final step is to deploy an interface to


the underlying analysis to a broader audience within the
organization. The operationalization feature in Microsoft R
Server provides the tools to deploy R analytics inside web,
desktop, mobile, and dashboard applications as well as
backend systems. R Server turns your R scripts into analytics
web services, so R code can be easily executed by
applications running on a secure server.

An operationalized R server offers the ability to host and


bundle R analytics into web services with minimal code
changes. R Server accepts interactive commands through
mrsdeploy functions for remote execution and web service
deployment. Data scientists can use mrsdeploy functions
on the command line. Application developers can write code
to instrument equivalent operations and integrate web
services into their applications using easy-to-consume
Swagger-based APIs in any programming language.

The operationalization feature can be configured on a single


machine. It can also be scaled for business-critical
applications with multiple web and compute nodes on
clustered servers for load balancing. This gives you the ability
to pipeline data streams that are subsequently transformed,
analyzed, and visualized into an R analytics web service.

In a Windows environment, multi-server topologies are


supported through Windows clustering methodologies.
Compute nodes can be made highly available using Windows
server failover clusters in Active-Active mode. Web nodes can
be scaled out using Windows network load balancing.
Operationalization with R Server also supports production-
grade workloads and seamless integration with popular
enterprise security solutions.

In the context of operationalization, clustered topologies are


composed of standalone servers, not nodes in Hadoop or
cloud services in Azure. Feature support is limited to a subset
of the supported R Server platforms has the list.

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 Hadoop Installation on Hadoop clusters has been simplified to


eliminate manual steps.

Support Hadoop on SUSE 11 and Hadoop distributions


(Cloudera CDH 5.5-5.7, Hortonworks HDP 2.4, MapR 5.0-
5.1)

Distributed compute context RxSpark is available, in which


computations are parallelized and distributed across the
nodes of a Hadoop cluster via Apache Spark. This provides
up to a 7x performance boost compared to RxHadoopMR .

Hadoop diagnostic tool to collect status of MRS and


dependencies on all nodes (available through a CSS Support
request).

Hadoop user directories in HDFS and Linux are now created


automatically as needed.

Hadoop administrator script to clean-up orphaned HDFS and


Linux user directories.

R Server for Teradata Option added to rxPredict to insert into an existing table.

Option added for use of LDAP authentication with a TPT


connection.

DeployR Enterprise Improved Web security features for better protection against
malicious attacks, improved installation security, and
improved Security Policy Management.

Relies on an H2 database by default and allows you to easily


use a SQL Server or PostgreSQL database instead to fit your
production environment.

Simplified installer for a better customer experience.

XML format for data exchange is deprecated, and will be


removed from future versions of DeployR.

The API has been updated. See the change history.

This release is of DeployR Enterprise only.

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.

SITE EDITION DETAILS

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.

From Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.

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.

Enable Remote Connections and Analytic Deployment


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the deployment
and consumption of web services with Microsoft R Server, then you must configure R Server after installation to
act as a deployment server and host analytic web services. Possible configurations are a one-box setup or an
enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server from an R Client
workstation and execute code on the server.

What's Installed with R Server


An installation of Microsoft R Server includes the following components.

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.

Tools for the standard base R (RTerm, Rgui.exe, and RScript)


are under <install-directory>\bin . Documentation is
under <install-directory>\doc and in
<install-directory>\doc\manual . One easy way to open
these files is to open RGui , click Help, and select one of the
options.

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.

On Windows, the default R Server installation directory is


C:\Program Files\Microsoft\R Server\R_SERVER .

R Server is engineered for distributed and parallel processing


for all multi-threaded functions, utilizing available cores and
disk storage of the local machine. R Server also supports the
ability to transfer computations to other R Server instances
on other platforms through compute context instructions.

Admin tool Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.
COMPONENT DESCRIPTION

pre-trained models Used for sentiment analysis and image featurization.

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 .

Licensing and support


How you install R Server determines the support policy, location of R binaries, and the availability of certain
features.
Licensing
R Server for Windows is licensed as a SQL Server enterprise feature. Licensing is the same regardless of how
you install the server (standalone, standalone as part of SQL Server, or embedded in a relational database
instance as SQL Server Machine Learning Services).
In a development context, developers and data scientists can install the free developer edition, which delivers the
same features as enterprise, but is licensed for smaller developer workloads. Each edition is available through
different download channels.
Support Policy
Two support plans 1 are available for R Server for Windows. The installation method determines which one is in
effect.

SERVICE PLAN DETAILS HOW TO GET THIS PLAN

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.

FILE LOCATION INSTALLER

C:\Program Files\Microsoft\R Server\R_SERVER Windows installer

C:\Program Files\Microsoft SQL Server\130\R_SERVER SQL Server Setup, R Server (Standalone)

C:\Program Files\Microsoft SQL SQL Server Setup, R Services (In-Database)


Server<instance_name>\R_SERVICES

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.

Install earlier versions


Earlier versions are supported, but with limited availability on Microsoft download sites. If you already have one
of the older supported versions, you can use the links in this section to access installation instructions.

VERSION DETAILS

Version 8.0.5 This version of R Server for Windows, released as Microsoft R


Server 2016, is integrated with the enterprise edition of SQL
Server 2016. Licensing, installation, and support of this
version of R Server for Windows is through SQL Server.
Using SQL Server setup, you can install R Server as a
standalone server, or as multi-instance service within SQL
Server. For more information, see R Server for Windows and
SQL Server R Services - R Server install page in SQL Server
2016 technical documentation.

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.

Download required components


Without an internet connection, the following components must be downloaded to a separate device and
transferred to the target machine.

COMPONENT DESCRIPTION DOWNLOAD LINK

SRO_3.3.3.0_1033.cab Microsoft R Open https://go.microsoft.com/fwlink/?


LinkID=842800

MLM_9.1.0.0_1033.cab Machine learning models https://go.microsoft.com/fwlink/?


LinkID=845098

Download R Server installer


You can get the zipped installation file from one of the following download sites.
SITE EDITION DETAILS

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.

From Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.

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.

View log files


Post-installation, you can review 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 RTVS or Rgui.exe connects to the server.
As a verification step, you can 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.

Enable Remote Connections and Analytic Deployment


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the deployment
and consumption of web services with Microsoft R Server, then you must configure R Server after installation to
act as a deployment server and host analytic web services. Possible configurations are a one-box setup or an
enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server from an R Client
workstation and execute code on the server.

What's Installed with R Server


An installation of Microsoft R Server includes the following components.

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.

Tools for the standard base R (RTerm, Rgui.exe, and RScript)


are under <install-directory>\bin . Documentation is
under <install-directory>\doc and in
<install-directory>\doc\manual . One easy way to open
these files is to open RGui , click Help, and select one of the
options.

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.

On Windows, the default R Server installation directory is


C:\Program Files\Microsoft\R Server\R_SERVER .

R Server is engineered for distributed and parallel processing


for all multi-threaded functions, utilizing available cores and
disk storage of the local machine. R Server also supports the
ability to transfer computations to other R Server instances
on other platforms through compute context instructions.

Admin tool Used for enabling remote execution and web service
deployment, operationalizing analytics, and configuring web
and compute nodes.

Pretrained models Used for sentiment analysis and image featurization.

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.

Command line options


You can run RServerSetup.exe from the command line with options to expose or hide the wizard, set an install
mode, or specify options for adding features or using custom folder locations.
User Interaction Options

PARAMETER DESCRIPTION

/full Invokes the wizard.

/quiet Hides the wizard, running a silent installation with no


interaction or prompts. EULA acceptance is automatic for
both MRS and MRO.

/passive Equivalent to /quiet in this release.

Install Modes

PARAMETER DESCRIPTION

/install Runs RServerSetup.exe in install mode, used to add R Server


or the pre-trained machine learning models

/uninstall Removes an existing installation of R Server.

/modify Runs RServerSetup.exe in modify mode. Setup looks for an


existing installation of R Server 9.1 and gives you options for
changing an installation (for example, you could add the pre-
trained models, or uninstall the server). Use this option if you
want to rerun (or repair) an installation.

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

/installdir="" Specifies the installation directory. By default, this is


C:\Program Files\Microsoft\R Server\R_SERVER.

/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.

/models Adds the pre-trained machine learning models. Use with


/install .

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

3. Uninstall the software in unattended mode.


rserversetup.exe /quiet /uninstall

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.

Download R Server installer


You can get the gzipped installation file from one of the following download sites.

SITE EDITION DETAILS


SITE EDITION DETAILS

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.

For downloads from Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.

Unpack the distribution


Download the software to a writable directory, such as /tmp, unpack the distribution and then run the
installation script.
The distribution includes one installer for Microsoft R Server. For a gzipped TAR file, you should unpack the file
as follows (be sure you have downloaded the file to a writable directory, such as /tmp):
1. Log in as root or a user with super user privileges ( sudo su ).
2. Switch to the /tmp directory (assuming it's the download location).
3. Unpack the file:
[tmp] $ tar zxvf en_microsoft_r_server_910_for_linux_x64_10323878.tar.gz

The distribution is unpacked into an MRS91Linux folder at the download location. The distribution includes the
following files:

FILE DESCRIPTION

install.sh Script for installing R Server.


FILE DESCRIPTION

generate_mrs_parcel.sh Script for generating a parcel used for installing R Server on


CDH.

EULA.txt End user license agreements for each separately licensed


component.

DEB folder Contains Microsoft R packages for deployment on Ubuntu.

RPM folder Contains Microsoft R packages for deployment on


CentOS/RHEL and SUSE.

Parcel folder Contains files used to generate a parcel for installation on


CDH.

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.

Run the MRS install script


R Server for Linux is deployed by running the install script with no parameters.
1. Log in as root or as a user with super user privileges ( sudo -s ). The following instructions assume root
install.
2. Clean cached data so that the installer can get updated packages.
On RHEL use yum: [root@localhost tmp] $ yum expire-cache
On Ubuntu use apt-get: [root@localhost tmp] $ apt-get autoclean
3. Change to the MRS91Linux directory containing the installation script:
[root@localhost tmp] $ cd /tmp/MRS91Linux

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

Partial output is as follows (note version 9.1.0):

Name : microsoft-r-server-packages-9.1 Relocations: /usr/lib64


Version : 9.1.0 Vendor: Microsoft
. . .

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

Species Counts
setosa 50
versicolor 50
virginica 50

To quit the program, type q() at the command line with no arguments.

Enable Remote Connections and Analytic Deployment


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the
deployment and consumption of web services with Microsoft R Server, then you must configure R Server after
installation to act as a deployment server and host analytic web services. Possible configurations are a one-box
setup or an enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server
from an R Client workstation and execute code on the server.

Unattended install options


You can perform a silent install to bypass prompts during setup. In /tmp/MRS91Linux, run the install script
with the following parameters:
[root@localhost MRS91Linux] $ install.sh -a -s

Additional flags are available, as follows:

FLAG OPTION DESCRIPTION

-a --accept-eula Accept all end user license


agreements.

-d --download-mro Download microsoft r open for


distribution to an offline system.

-m --models Install Microsoft ML models.

-r --no-dotnet-core Opt out of installing .NET Core


(required for mrsdeploy and
MicrosoftML)

-s --silent Perform a silent, unattended install.

-u --unattended Perform an unattended install.

-h --help Print this help text.

What's Installed with R Server


The Microsoft R Server setup installs the R base packages and a set of enhanced and proprietary R packages
that support parallel processing, improved performance, and connectivity to data sources including SQL
Server and Hadoop. In contrast with R Client, R Server supports much larger data sets and distributed
workloads.

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)

Download R Server dependencies


From an internet-connected computer, download Microsoft R Open (MRO ) and .NET Core for Linux.
MRO provides the R distribution (base R language and script support) used by R Server. R Server setup checks
for this specific distribution and won't use alternative distributions. MRO can co-exist with other distributions of
R on your machine, but additional configuration could be required to make a particular version the default. For
more information, see Manage an R Server installation on Linux.
The .NET Core component is required for MicrosoftML (machine learning). It is also required for mrsdeploy,
used for remote execution, web service deployment, and configuration of R Server as web node and compute
node instances.

COMPONENT VERSION DOWNLOAD LINK NOTES


COMPONENT VERSION DOWNLOAD LINK NOTES

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
.

Download R Server installer


You can get the gzipped installation file from one of the following download sites.

SITE EDITION DETAILS

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.

For downloads from Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.
Download package dependencies
R Server has package dependencies for various platforms. The list of required packages can be found at Package
dependencies for Microsoft R Server.
You can list existing packages in /usr/lib64 to see what is currently installed. It's common to have a very large
number of packages. To zero in on specific packages, you can do a partial string search with this command
syntax: ls -l /usr/lib64/libpng*

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

Install package dependencies


On the target system which is disconnected from the internet, run rpm -i <package-name> to install any packages
that are missing from your system (for example, rpm -i libpng12-1-2-50-10.el7.x86_64.rpm ).

Unpack .NET Core and set symbolic link


For an offline installation of .NET Core, manually create its directory path, unpack the distribution, and then set
references so that the component can be discovered by other applications.
1. Log in as root or as a user with super user privileges ( sudo -s ).
2. Switch to the /tmp directory (assuming it's the download location) and execute ls to list the files as a
verification step. You should see the tar.gz files you transferred earlier.
3. Make a directory for .NET Core:
[root@localhost tmp] $ mkdir /opt/dotnet

4. Unpack the .NET Core redistribution into the /opt/dotnet directory:


[root@localhost tmp] $ tar zxvf dotnet-<linux-os-name>-x64.1.1.tar.gz -C /opt/dotnet

5. Set the symbolic link for .NET Core to user directories:


[root@localhost tmp] $ ln -s /opt/dotnet/dotnet /usr/bin/dotnet

Unpack MRS distribution and copy MRO


Next, unpack the R Server distribution and copy the gzipped MRO distribution to the MRS91Linux folder.

IMPORTANT
Do not unpack MRO yourself. The installer looks for a gzipped tar file for MRO.

1. Unpack the MRS gzipped file.


[root@localhost tmp] $ tar zxvf en_microsoft_r_server_910_for_linux_x64_10323878.tar.gz

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

Run the MRS install script


R Server for Linux is deployed by running the install script with no parameters. At this point, you could opt for
unattended install to bypass EULA prompts.
1. Switch to the MRS91Linux directory containing the installation script:
[root@localhost tmp] $ cd 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):

Name : microsoft-r-server-packages-9.1 Relocations: /usr/lib64


Version : 9.1.0 Vendor: Microsoft
. . .

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

Species Counts
setosa 50
versicolor 50
virginica 50

To quit the program, type q() at the command line with no arguments.

Unattended install options


You can perform a silent install to bypass prompts during setup. In /tmp/MRS91Linux, run the install script with
the following parameters:
[root@localhost MRS91Linux] $ install.sh -a -s

Additional flags are available, as follows:

FLAG OPTION DESCRIPTION

-a --accept-eula Accept all end user license agreements.


FLAG OPTION DESCRIPTION

-d --download-mro Download microsoft r open for


distribution to an offline system.

-m --models Install Microsoft ML models.

-r --no-dotnet-core Opt out of installing .NET Core


(required for mrsdeploy and
MicrosoftML)

-s --silent Perform a silent, unattended install.

-u --unattended Perform an unattended install.

-h --help Print this help text.

Enable Remote Connections and Analytic Deployment


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the deployment
and consumption of web services with Microsoft R Server, then you must configure R Server after installation to
act as a deployment server and host analytic web services. Possible configurations are a one-box setup or an
enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server from an R Client
workstation and execute code on the server.

What's Installed with R Server


The Microsoft R Server setup installs the R base packages and a set of enhanced and proprietary R packages
that support parallel processing, improved performance, and connectivity to data sources including SQL Server
and Hadoop. In contrast with R Client, R Server supports much larger data sets and distributed workloads.

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.

Program version and file locations


As a first step, use your package manager to list the currently installed R Server packages. Typically, CentOS and
Red Hat systems use yum, Ubuntu systems use apt-get, and SLES systems use zypper:
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. On a 9.1 installation, you will see about 9 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.3.3:
On RHEL: rpm -qi microsoft-r-open-mro-3.3.x86_64
On Ubuntu: dpkg --status microsoft-r-open-mro-3.3.x86_64
On SUSE: zypper info microsoft-r-open-mro-3.3.x86_64

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 )

General instructions for all versions


Packages are registered in a database that tracks all package installations in the cluster. To update the database, use
a package manager to remove the package: yum for Red Hat and CentOS, apt for Ubuntu, or zypper for SUSE.
Log in as root or a user with sudo privileges. If you are using sudo , precede commands requiring root privileges
with sudo .
The Revo64 program runs on demand so stopping and disabling the server is not required.

How to uninstall 9.x


1. Uninstall Microsoft R Open (MRO ) and remove any dependent packages used only by MRO:
On RHEL: yum erase microsoft-r-open-mro-3.3.x86_64
On Ubuntu: apt-get purge microsoft-r-open-mro-3.3
On SUSE: zypper remove microsoft-r-open-mro-3.3
2. Most packages are uninstalled, including Microsoft R Server. List the remaining packages to see what's left.
On a 9.1. installation, you should see only those packages used for operationalizing R Server analytics. On a
9.0.1 install, you might see just mrsdeploy. Using the syntax from the previous step, uninstall remaining
packages. For 9.1, uninstall packages in the following order:
Microsoft-r-server-adminutil-9.1.x86_64
Microsoft-r-server-webnode-9.1.x86_64
Microsoft-r-server-computenode-9.1.x86_64
Microsoft-r-server-config-rserve-9.1.x86_64
3. After packages are removed, you can remove remaining files. On the root node, verify the location of other
files that need to be removed:
$ ls /usr/lib64/microsoft-r
4. Remove the entire directory:
$ 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.

How to uninstall 8.0.5


1. Uninstall Microsoft R Open (MRO ) and remove any dependent packages used only by MRO:

yum erase microsoft-r-server-mro-3.0

2. On the root node, verify the location of other files that need to be removed: `

ls /usr/lib64/microsoft-r/8.0

3. Remove the entire directory:

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.

How to uninstall 8.0.0


1. Uninstall the Microsoft R Open for Microsoft R Server (MRO -for-MRS ) package:

yum erase MRO-for-MRS-8.0.0

2. Remove directories of MRS and MRO, in this order:

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

How to uninstall individual packages


If you remove Microsoft R Open (microsoft-r-server-mro-8.0-8.0.5-1.x86_64), you will also remove any dependent
packages used only by R Open.
Uninstall order is important. Due to package dependencies, be sure to remove the packages in the order given
below.

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.

Unpack the distribution


Download the software to a writable directory, such as /tmp, unpack the distribution and then run the installation
script.
The distribution includes one installer for Microsoft R Server. For a gzipped TAR file, you should unpack the file as
follows (be sure you have downloaded the file to a writable directory, such as /tmp):
1. Log in as root or a user with sudo privileges.
2. Switch to the /tmp directory (assuming it's the download location)
3. Unpack the file:
[tmp] $ tar zxvf en_r_server_901_for_linux_x64_9648602.gz

Run the MRS install script


R Server for Linux is deployed by running the install script with no parameters.
1. Change to the MRS90LINUX directory containing the installation script:
[tmp] $ cd ..\MRS90LINUX

2. Run the script.


[MRS90LINUX] $ sudo bash install.sh

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\*

[MRS90LINUX] $ yum list \*deployr\*

2. Check the version of Microsoft R Open using rpm -qi :


[MRS90LINUX] $ rpm -qi microsoft-r-open-mro-3.3.x86_64

3. Check the version of Microsoft R Server:


[MRS90LINUX] $ rpm -qi microsoft-r-server-packages-9.0.x86_64

4. Partial output is as follows (note version 9.0.1):


Name : microsoft-r-server-packages-9.0 Relocations: /usr/lib64 Version : 9.0.1 Vendor: Microsoft . . .

Start Revo64
As a verification step, run the Revo64 program.
1. Switch to the directory containing the executable:
$ cd MRS90LINUX

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

Species Counts
setosa 50
versicolor 50
virginica 50

To quit the program, type q() at the command line with no arguments.

Configure R Server to operationalize your analytics


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the deployment
and consumption of web services with Microsoft R Server, then you must configure R Server after installation to
act as a deployment server and host analytic web services. Possible configurations are a one-box setup or an
enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server from an R Client
workstation and execute code on the server.

Manage your installation


In this section, we discuss file management for your Microsoft R Server installation, including file ownership, file
permissions, and so on.
File ownership
If followed the instructions provided, the installed files are all 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; this can make maintenance easier and reduce security concerns. In such an environment, you
may wish 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. Create the "RUser" account if it does not already exist. Assign this user to a suitable group, if desired.
3. Use the chown command to change ownership of the files (in the example below, we assume RUser has
been made a member of the dev group; this command requires root privileges):

chown -R RUser:dev /usr/lib64/MRS90LINUX

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:

FLAG OPTION DESCRIPTION

-a --accept-eula Accept all end user license agreements.

-d --download-mro Download microsoft r open for


distribution to an offline system.

-p --hadoop-components Install Hadoop components.

-s --silent Perform a silent, unattended install.

-u --unattended Perform an unattended install.

-h --help Print this help text.

For a standard unattended install, run the following script:

./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.

Setting up a package repository


One of the strengths of the R language is the thousands of third-party packages that have been made publicly
available via CRAN, the Comprehensive R Archive Network. R includes a number of functions that make it easy to
download and install these packages. However, in many enterprise environments, access to the Internet is limited
or non-existent. In such environments, it is useful to create a local package repository that users can access from
within the corporate firewall.
Your local repository may contain source packages, binary packages, or both. If some or all of your users will be
working on Windows systems, you should include Windows binaries in your repository. Windows binaries are R -
version-specific; if you are running R 3.2.2, you need Windows binaries built under R 3.2. These versioned binaries
are available from CRAN and other public repositories. If some or all of your users will be working on Linux
systems, you must include source packages in your repository.
The Microsoft Managed R Archive Network (MRAN ) provides daily snapshots of all of CRAN, and together with
the Microsoft-developed open-source package miniCRAN can be used to easily build a local package repository
containing source packages, binary packages, or both.
There are two ways to create the package repository: either copy all the packages from a given MRAN snapshot,
or create a new repository and populate it with just those packages you want to be available to your users. We will
describe both procedures using MRAN and miniCRAN.
Note: 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.
Installing miniCRAN
On a system with Internet access, the easiest way to install the miniCRAN package (or any R package) is to start R
and use the install.packages function:

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)

3. Specify an MRAN snaphot:

CRAN <- "http://mran.revolutionanalytics.com/snapshot/2015-11-30"

4. Set your MRAN snapshot as your CRAN repo:

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:

pkgs <- pkgAvail()[,1]

6. Use miniCRAN’s makeRepo function to create a repository of these packages in your /local/repos directory:
makeRepo(pkgs, "/local/repos", type="source")

Create a custom repository


As mentioned above, a custom repository gives you complete control over which packages are available to your
users. Here, too, you have two basic choices in terms of populating your repository: you can either use makeRepo
to select specific packages from an existing MRAN snapshot, or you can combine your own locally developed
packages with packages from other sources. The latter option gives you the greatest control, but typically means
you need to manage the contents using home-grown tools.
Create a custom package directory
Your custom package directory can contain source packages, binary packages, or both. Windows binary packages
should have a path of the form

/local/repos/bin/windows/contrib/3.2

while source packages should have a path of the form:

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")

Configure R to use a local repository


To make your local repository available to your R users:
1. Open the file Rprofile.site in the /etc directory of your installed R (if you installed to the default /usr prefix,
the path is /usr/lib64/MRO -for-MRS -8.0.0/R -3.2.2/lib64/R/etc/Rprofile.site).
2. Find the following line in the Rprofile.site file:

r <- c(REVO=RevoUtils::getRevoRepos())

3. Add your repository as follows:

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")

4. Save the file and your repository is ready for use.


If you are in a locked-down environment without access to the standard Microsoft repository, replace the Revo
repository with your local repository (or repositories).

Remove Microsoft R Server


For instructions on rolling back your installation, see Uninstall Microsoft R Server to upgrade to a newer version.

Manage multiple R installations


You can install the latest Microsoft R Server side-by-side with an existing Microsoft R Server. In this section, we
discuss maintaining multiple versions of Microsoft R Server, together with instructions for maintaining Microsoft
R Server alongside versions of R obtained from CRAN or third-party repositories such as
http://dl.fedoraproject.org/pub/epel. (Note, however, that patch releases such as Microsoft R Server 7.4.1 are
intended to replace their associated main release, not live side by side with it. You must uninstall and reinstall such
releases.)
Using Microsoft R Server with other R installations
If you have an installed R script in your /usr/bin directory and then install Microsoft R Server, the automated
installer detects that R exists and does not prompt you to link R to Revo64. In this case, you can use both versions
of R simply by calling them by their respective script names, “R” and “Revo64”. To have Microsoft R Server
become your default R, do the following:
1. Rename the R script by appending the R version, for example 3.2.2:

mv /usr/bin/R /usr/bin/R-3.2.2

2. Create a symbolic link from the Revo64 script to R:

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.

Unpack the distribution


Unpack the distribution in a writable directory such as /tmp, and then run the installation script.
The distribution includes one installer for Microsoft R Server. For a gzipped TAR file, you should unpack the file as
follows (be sure you have downloaded the file to a writable directory, such as /tmp):
1. Log in as root or a user with sudo privileges.
2. Switch to the /tmp directory (assuming it's the download location)
3. Unpack the file: [tmp] $ tar zxvf en_microsoft_r_server_for_linux_x64_8944657.tar.gz

Unpacking an ISO file


(applies to 8.x only) Volume licensing makes the download available as an ISO file. To unpack this file, create a
mount point, and then mount the ISO file to that mount point:
mkdir /mnt/mrsimage
mount –o loop • sw_dvd5_r_server_2016_english_-2_for_RdHtLinux_mlf_x20-98713.iso /mnt/mrsimage

The download file is sw_dvd5_r_server_2016_english_-2_for_RdHtLinux_mlf_x20-98713.iso.

Run the install script


Microsoft R Server for Linux is deployed by running the install script with no parameters, which you can install at
the root, or as super user via sudo .
1. Log in as root or a user with sudo privileges ( sudo su ). The following instructions assume user privileges with
the sudo override.
2. Verify system repositories are up to date: [username] $ sudo yum clean all
3. Change to the directory to which you downloaded the rpm (for example, /tmp): [username] $ cd /tmp
4. Change to the MRS80LINUX directory containing the installation script: [tmp] $ cd MRS80LINUX
5. Run the script. [MRS80LINUX] $ sudo bash install.sh
6. 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.
7. Repeat to accept license terms for Microsoft R Server.
8. Installer output shows the packages and location of the log file.

Verify installation
1. List installed packages and get package names: [MRS80LINUX] $ yum list \*microsoft\*
[MRS80LINUX] $ yum list \*deployr\*

2. Check the version of Microsoft R Open using rpm -qi :


[MRS80LINUX] $ rpm -qi microsoft-r-open-mro-3.f.x86_64

3. Check the version of Microsoft R Server: [MRS80LINUX] $ rpm -qi microsoft-r-server-packages-8.0.x86_64

4. Partial output is as follows (note version 8.0.5):

Name : microsoft-r-server-packages-8.0 Relocations: /usr/lib64


Version : 8.0.5 Vendor: Microsoft
. . .

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

Species Counts
setosa 50
versicolor 50
virginica 50

4. To quit the program, type q() at the command line with no arguments.

Manage your installation


In this section, we discuss file management for your Microsoft R Server installation, including file ownership, file
permissions, and so on.
File ownership
If followed the instructions provided, the installed files are all 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; this can make maintenance easier and reduce security concerns. In such an
environment, you may wish 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. Create the "RUser" account if it does not already exist. Assign this user to a suitable group, if desired.
3. Use the chown command to change ownership of the files (in the example below, we assume RUser has
been made a member of the dev group; this command requires root privileges):

chown -R RUser:dev /usr/lib64/MRS80LINUX

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

-a --accept-eula Accept all end user license agreements.

-d --download-mro Download microsoft r open for


distribution to an offline system.

-p --hadoop-components Install Hadoop components.

-s --silent Perform a silent, unattended install.

-u --unattended Perform an unattended install.

-h --help Print this help text.

For a standard unattended install, run the following script:

./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.

Setting up a package repository


One of the strengths of the R language is the thousands of third-party packages that have been made publicly
available via CRAN, the Comprehensive R Archive Network. R includes a number of functions that make it easy to
download and install these packages. However, in many enterprise environments, access to the Internet is limited
or non-existent. In such environments, it is useful to create a local package repository that users can access from
within the corporate firewall.
Your local repository may contain source packages, binary packages, or both. If some or all of your users will be
working on Windows systems, you should include Windows binaries in your repository. Windows binaries are R -
version-specific; if you are running R 3.2.2, you need Windows binaries built under R 3.2. These versioned binaries
are available from CRAN and other public repositories. If some or all of your users will be working on Linux
systems, you must include source packages in your repository.
The Microsoft Managed R Archive Network (MRAN ) provides daily snapshots of all of CRAN, and together with
the Microsoft-developed open-source package miniCRAN can be used to easily build a local package repository
containing source packages, binary packages, or both.
There are two ways to create the package repository: either copy all the packages from a given MRAN snapshot,
or create a new repository and populate it with just those packages you want to be available to your users. We will
describe both procedures using MRAN and miniCRAN.
Note: 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. Once created, you can either move the
repository to a different location within your firewall, or simply disable the machine’s Internet access.
Installing miniCRAN
On a system with Internet access, the easiest way to install the miniCRAN package (or any R package) is to start R
and use the install.packages function:

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)

3. Specify an MRAN snaphot:

CRAN <- "http://mran.revolutionanalytics.com/snapshot/2015-11-30"

4. Set your MRAN snapshot as your CRAN repo:

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:

pkgs <- pkgAvail()[,1]

6. Use miniCRAN’s makeRepo function to create a repository of these packages in your /local/repos
directory:

makeRepo(pkgs, "/local/repos", type="source")


Create a custom repository
As mentioned above, a custom repository gives you complete control over which packages are available to your
users. Here, too, you have two basic choices in terms of populating your repository: you can either use makeRepo
to select specific packages from an existing MRAN snapshot, or you can combine your own locally developed
packages with packages from other sources. The latter option gives you the greatest control, but typically means
you need to manage the contents using home-grown tools.
Create a custom package directory
Your custom package directory can contain source packages, binary packages, or both. Windows binary packages
should have a path of the form

/local/repos/bin/windows/contrib/3.2

while source packages should have a path of the form:

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")

Configure R to use a local repository


To make your local repository available to your R users:
1. Open the file Rprofile.site in the /etc directory of your installed R (if you installed to the default /usr prefix,
the path is /usr/lib64/MRO -for-MRS -8.0.0/R -3.2.2/lib64/R/etc/Rprofile.site).
2. Find the following line in the Rprofile.site file:

r <- c(REVO=RevoUtils::getRevoRepos())

3. Add your repository as follows:

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")

4. Save the file and your repository is ready for use.


If you are in a locked-down environment without access to the standard Microsoft repository, replace the Revo
repository with your local repository (or repositories).
Remove Microsoft R Server
For instructions on rolling back your installation, see Uninstall Microsoft R Server to upgrade to a newer version.

Manage multiple R installations


You can install the latest Microsoft R Server side-by-side with an existing Microsoft R Server. In this section, we
discuss maintaining multiple versions of Microsoft R Server, together with instructions for maintaining Microsoft
R Server alongside versions of R obtained from CRAN or third-party repositories such as
http://dl.fedoraproject.org/pub/epel. (Note, however, that patch releases such as Microsoft R Server 7.4.1 are
intended to replace their associated main release, not live side by side with it. You must uninstall and reinstall such
releases.)
Using Microsoft R Server with other R installations
If you have an installed R script in your /usr/bin directory and then install Microsoft R Server, the automated
installer detects that R exists and does not prompt you to link R to Revo64. In this case, you can use both versions
of R simply by calling them by their respective script names, “R” and “Revo64”. To have Microsoft R Server
become your default R, do the following:
1. Rename the R script by appending the R version, for example 3.2.2:

mv /usr/bin/R /usr/bin/R-3.2.2

2. Create a symbolic link from the Revo64 script to R:

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:

chown -R RUser:dev /usr/lib64/MRS90LINUX

Use Revo64 as the default R script engine


If you installed base R first, followed by Microsoft R Server, the automated installer detects that R exists and does
not prompt you to link R to Revo64. In this case, you can use both versions of R simply by calling them by their
respective script names: “R” and “Revo64”.
To make R Server the default R script engine, do the following:
1. Rename the R script by appending the R version, for example 3.3.3:

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

Set up a local package repository behind a firewall


One of the strengths of the R language is the thousands of third-party packages that have been made publicly
available via CRAN, the Comprehensive R Archive Network. R includes a number of functions that make it easy
to download and install these packages. However, in many enterprise environments, access to the Internet is
limited or non-existent. In such environments, it is useful to create a local package repository that users can
access from within the corporate firewall.
A local repository may contain source packages, binary packages, or both. If some or all of your users will be
working on Windows systems, you should include Windows binaries in your repository. Windows binaries are R -
version-specific; if you are running R 3.3.3, you need Windows binaries built under R 3.3.3. These versioned
binaries are available from CRAN and other public repositories. If some or all of your users will be working on
Linux systems, you must include source packages in your repository.
The Microsoft Managed R Archive Network (MRAN ) provides daily snapshots of all of CRAN, and together with
the Microsoft-developed open-source package miniCRAN can be used to easily build a local package repository
containing source packages, binary packages, or both.
There are two ways to create the package repository: either copy all the packages from a given MRAN snapshot,
or create a new repository and populate it with just those packages you want to be available to your users. We
will describe both procedures using MRAN and miniCRAN.

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.

Approach 1: use miniCRAN


On a system with Internet access, the easiest way to install the miniCRAN package (or any R package) is to start
R and use the install.packages function:

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)

3. Specify an MRAN snaphot:

CRAN <- "http://mran.revolutionanalytics.com/snapshot/2015-11-30"

4. Set your MRAN snapshot as your CRAN repo:

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:

pkgs <- pkgAvail()[,1]

6. Use miniCRAN’s makeRepo function to create a repository of these packages in your /local/repos
directory:

makeRepo(pkgs, "/local/repos", type="source")

Create a custom repository


You can customize a package repository to include specific packages rather than all-inclusive snapshots providing
more packages than you need. A custom repository gives you complete control over which packages are available
to your users. Here, too, you have two basic choices in terms of populating your repository: you can either use the
previously described miniCRAN makeRepo function to select specific packages from an existing MRAN snapshot
Alternatively, you can combine your own locally developed packages with packages from other sources. The
second option offers the greatest control, but typically means you need to manage the contents using home-
grown tools.
Recommendations for Windows binary packages
If using your own tools to create a custom package directory, your Windows binary packages should have a path
of the form:

/local/repos/bin/windows/contrib/3.3

while source packages should have a path of the form:

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")

Configure R to use a local repository


To make your local repository available to your R users:
1. Open the file Rprofile.site in the /etc directory of your installed R (if you installed to the default /usr prefix,
the path is /usr/lib64/MRO -for-MRS -9.0.1/R -3.3.3/lib64/R/etc/Rprofile.site).
2. Find the following line in the Rprofile.site file:

r <- c(REVO=RevoUtils::getRevoRepos())

3. Add your repository as follows:

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")

4. Save the file and your repository is ready for use.


If you are in a locked-down environment without access to the standard Microsoft repository, replace the Revo
repository with your local repository (or repositories).

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.

Recommendations for installation


We recommend installing R Server on all data nodes of the cluster to avoid Hadoop queuing up jobs on nodes that
don't actually have R Server. Although the task will eventually get reassigned to a node that has R Server, you will
see errors from the worker node and experience unnecessary delay while waiting for the error to resolve.
Microsoft Azure offers virtual machines with Hadoop templates. If you don't have a Hadoop cluster, you can
purchase and provision virtual machines on Azure using templates provided by several vendors.
1. Sign in to Azure portal.
2. Click New in the top left side bar.
3. In the search box, type the name of one of these vendors: Cloudera, HortonWorks, and MapR. Several of these
vendors offer sandbox deployments that make it easier to get started.

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.

Download R Server installer


Get the zipped RServerSetup installer file from one of the following download sites.

SITE EDITION DETAILS

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 downloads from Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.

Unpack the distribution


Download the software to a writable directory, such as /tmp, unpack the distribution and then run the installation
script.
The distribution includes one installer for Microsoft R Server. For a gzipped TAR file, you should unpack the file as
follows (be sure you have downloaded the file to a writable directory, such as /tmp):
1. Log in as root or a user with super user privileges ( sudo su ).
2. Switch to the /tmp directory (assuming it's the download location)
3. Unpack the file: [tmp] $ tar zxvf en_microsoft_r_server_910_for_hadoop_x64_10323951.tar.gz

Run the install script


The Hadoop component is deployed by running the install script with the -p parameter, which you can install at the
root, or as super user via sudo .
1. Log in as root or as a user with super user privileges ( sudo -s ).
2. Verify system repositories are up to date: [username] $ sudo yum clean all
3. Change to the directory to which you mounted or unpacked the installer (for example, /tmp/MRS91Hadoop if
you unpacked the tar.gz file): [username] $ cd /tmp [username tmp] $ cd MRS91Hadoop
4. Run the script with the -p parameter, specifying the Hadoop component. Optionally, add the pre-trained
machine learning models: [username tmp MRS91Hadoop] $ sudo bash install.sh -p -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 the key sequence to accept license terms for Microsoft R Server.
7. Installer output shows the packages and location of the log file.

Unattended install options


You can perform a silent install to bypass prompts during setup. In MRS91Hadoop, run the install script with the
following parameters:
[tmp MRS91Hadoop] $ install.sh -a -s

Additional flags are available, as follows:

FLAG OPTION DESCRIPTION

-a --accept-eula Accept all end user license agreements.

-d --download-mro Download microsoft r open for


distribution to an offline system.

-m --models Install Microsoft pre-trained machine


learning models.

-p --hadoop Install the Hadoop component.

-r --no-dotnet-core Opt out of installing .NET Core (required


for mrsdeploy and MicrosoftML)

-s --silent Perform a silent, unattended install.

-u --unattended Perform an unattended install.

-h --help Print this help text.


Verify installation
1. List installed packages and get package names: [MRS91Hadoop] $ yum list \*microsoft\*
2. Check the version of Microsoft R Open using rpm -qi :
[MRS91Hadoop] $ rpm -qi microsoft-r-open-mro-3.3.3.x86_64
3. Check the version of Microsoft R Server: [MRS91Hadoop] $ rpm -qi microsoft-r-server-packages-9.1.x86_64
4. Partial output is as follows (note version 9.1.0):

Name : microsoft-r-server-packages-9.1.0 Relocations: /usr/lib64


Version : 9.1.0 Vendor: Microsoft
. . .

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:

$ `hadoop fs -mkdir /user/RevoShare/$USER`


$ `hadoop fs -chmod uog+rwx /user/RevoShare/$USER`
$ `mkdir -p /var/RevoShare/$USER`
$ `chmod uog+rwx /var/RevoShare/$USER`

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")

Output for each command should be [1] TRUE .


As part of this process, make sure the base directories /user and /user/RevoShare have uog+rwx permissions as
well.
Run programs and sample jobs using sample data
The next procedure loads sample data and runs the Revo64 program to further verify the installation.
1. Send sample data to HDFS.

$ hadoop fs -mkdir -p /share/SampleData


$ hadoop fs -copyFromLocal /usr/lib64/microsoft-
r/9.0/lib64/R/library/RevoScaleR/SampleData/AirlineDemoSmall.csv /share/SampleData/
$ hadoop fs -ls /share/SampleData

2. Start Revo64.

$ cd MRS90Linux
$ Revo64
3. Run a simple local computation. This step uses the proprietary Microsoft libraries.

> rxSummary(~., iris)

Partial output is as follows (showing the first 4 lines).

Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.003 seconds
Computation time: 0.010 seconds.
Call:
rxSummary(formula = ~., data = iris)

4. Run a sample local job.


This step uses the sample dataset and downloads data from HDFS, confirming that your local session can
access HDFS.
Paste the following code into your Revo64 session.

input <- file.path("/share/SampleData/AirlineDemoSmall.csv")

colInfo <- list(DayOfWeek = list(type = "factor",


levels = c("Monday", "Tuesday", "Wednesday", "Thursday","Friday", "Saturday", "Sunday")))

airDS <- RxTextData(file = input, missingValueString = "M", colInfo = colInfo, fileSystem =


RxHdfsFileSystem())

adsSummary <- rxSummary(~ArrDelay+CRSDepTime+DayOfWeek, data = airDS)


adsSummary

Partial output is as follows (showing the last 8 lines).

DayOfWeek Counts
Monday 97975
Tuesday 77725
Wednesday 78875
Thursday 81304
Friday 82987
Saturday 86159
Sunday 94975

5. Run a sample Hadoop job.


This step uses the sample dataset to run a Hadoop job.
Paste the following code into your Revo64 session. This snippet differs from the previous snippet by the first
line.

rxSetComputeContext(RxHadoopMR(consoleOutput=TRUE))
input <- file.path("/share/SampleData/AirlineDemoSmall.csv")

colInfo <- list(DayOfWeek = list(type = "factor",


levels = c("Monday", "Tuesday", "Wednesday", "Thursday","Friday", "Saturday", "Sunday")))

airDS <- RxTextData(file = input, missingValueString = "M", colInfo = colInfo, fileSystem =


RxHdfsFileSystem())

adsSummary <- rxSummary(~ArrDelay+CRSDepTime+DayOfWeek, data = airDS)


adsSummary
Partial output is as follows (showing the first 10 lines).

====== 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:

6. Run a sample Spark job.

rxSetComputeContext(RxSpark(consoleOutput=TRUE, executorMem="1g", driverMem="1g",


executorOverheadMem="1g", numExecutors=2))
input <- file.path("/share/SampleData/AirlineDemoSmall.csv")

colInfo <- list(DayOfWeek = list(type = "factor",


levels = c("Monday", "Tuesday", "Wednesday", "Thursday","Friday", "Saturday", "Sunday")))

airDS <- RxTextData(file = input, missingValueString = "M", colInfo = colInfo, fileSystem =


RxHdfsFileSystem())

adsSummary <- rxSummary(~ArrDelay+CRSDepTime+DayOfWeek, data = airDS)


adsSummary

7. To quit the program, type q() at the command line with no arguments.

Automate a distributed installation


If you have multiple nodes, you can automate the installation across nodes using any distributed shell. Examples
include the following
dsh ("Dancer’s shell")
pdsh (Parallel Distributed Shell)
PyDSH (the Python Distributed Shell)
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. If possible, use a distributed shell that provides a
top-level copy command, such as the pdcp command that is part of pdsh.
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

For RHEL/CENTOS systems; tar zxvf MRS80RHEL.tar.gz


For SLES systems; tar zxvf MRS80SLES.tar.gz
2. Copy the installer gzipped tar file to a writable directory, such as /tmp:
From the mounted img file: cp /mnt/mrsimage/Microsoft-R -Server- * .tar.gz /tmp
From the unpacked tar file: cp /tmp/MRS80/Microsoft-R -Server- </em> .tar.gz /tmp
3. The following commands use pdsh and pdcp to distribute and install Microsoft R Server (ensure that each
command is 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):
The following commands use pdsh and pdcp to distribute and install Microsoft R Server:

alias pdshw=’pdsh -w\`cat myhosts.txt\` -R ssh’


alias pdcpw=’pdcp -w\`cat myhosts.txt\` -R ssh’
pdshw
> mkdir -p /var/tmp/revo-install
> exit
pdcpw /tmp/MRS91Hadoop.tar.gz /var/tmp/revo-install
pdshw
> cd /var/tmp/revo-install; yum clean all
> tar zxf MRS91Hadoop.tar.gz
> cd MRS91Hadoop; sudo bash ./install.sh -a -p
> exit

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.

Enable Remote Connections and Analytic Deployment


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the deployment
and consumption of web services with Microsoft R Server, then you must configure R Server after installation to
act as a deployment server and host analytic web services. Possible configurations are a one-box setup or an
enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server from an R Client
workstation and execute code on the server.

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.

Download R Server dependencies


From an internet-connected computer, download Microsoft R Open (MRO ) and .NET Core for Linux.
MRO provides the R distribution (base R language and script support) used by R Server. R Server setup checks
for this specific distribution and won't use alternative distributions. MRO can co-exist with other distributions of R
on your machine, but additional configuration could be required to make a particular version the default. For more
information, see Manage an R Server installation on Linux.
The .NET Core component is required for MicrosoftML (machine learning). It is also required for mrsdeploy, used
for remote execution, web service deployment, and configuration of R Server as web node and compute node
instances.

COMPONENT VERSION DOWNLOAD LINK NOTES

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 .

Download R Server installer


You can get Microsoft R Server (MRS ) 9.1.0 for Hadoop from one of the following download sites.

SITE EDITION DETAILS


SITE EDITION DETAILS

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.

For downloads from Visual Studio Dev Essentials:


1. Click Join or access now to sign up for download benefits.
2. Check the URL to verify it changed to https://my.visualstudio.com/.
3. Click Downloads to search for R Server.
4. Click Downloads for a specific version to select the platform.

Download package dependencies


R Server has package dependencies for various platforms. The list of required packages can be found at Package
dependencies for Microsoft R Server. If the target system is missing any, download the ones you will need.
You can list existing packages in /usr/lib64 to see what is currently installed. It's common to have a very large
number of packages. You can do a partial string search to filter on specific filenames (such as lib* for files starting
with lib.): ls -l /usr/lib64/lib*

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

Install package dependencies


On the target system which is disconnected from the internet, run rpm -i <package-name> to install any packages
that are missing from your system (for example, rpm -i libpng12-1-2-50-10.el7.x86_64.rpm ).

Unpack .NET Core and set symbolic link


For an offline installation of .NET Core, manually create its directory path, unpack the distribution, and then set
references so that the component can be discovered by other applications.
1. Log in as root or as a user with super user privileges ( sudo -s ).
2. Switch to the /tmp directory (assuming it's the download location) and execute ls to list the files as a
verification step. You should see the tar.gz files you transferred earlier.
3. Make a directory for .NET Core:
[root@localhost tmp] $ mkdir /opt/dotnet

4. Unpack the .NET Core redistribution into the /opt/dotnet directory:


[root@localhost tmp] $ tar zxvf dotnet-<linux-os-name>-x64.1.1.tar.gz -C /opt/dotnet

5. Set the symbolic link for .NET Core to user directories:


[root@localhost tmp] $ ln -s /opt/dotnet/dotnet /usr/bin/dotnet

Unpack MRS distribution and copy MRO


Next, unpack the R Server distribution and copy the gzipped MRO distribution to the MRS91Hadoop folder.

IMPORTANT
Do not unpack MRO yourself. The installer looks for a gzipped tar file for MRO.

1. Unpack the MRS gzipped file.


[root@localhost tmp] $ tar zxvf en_microsoft_r_server_910_for_hadoop_x64_10323951.tar.gz

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

Run the MRS install script


R Server for Hadoop is deployed by running the install script with no parameters. At this point, you could opt for
unattended install to bypass EULA prompts.
1. Switch to the MRS91Hadoop directory containing the installation script:
[root@localhost tmp] $ cd 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\*

2. Check the version of Microsoft R Open using rpm -qi :


[MRS91Hadoop] $ rpm -qi microsoft-r-open-mro-3.3.3.x86_64

3. Check the version of Microsoft R Server:


[MRS91Hadoop] $ rpm -qi microsoft-r-server-packages-9.1.0.x86_64

4. Partial output is as follows (note version 9.1.0):


Name : microsoft-r-server-packages-9.0 Relocations: /usr/lib64 Version : 9.1.0 Vendor: Microsoft . . .

Start Revo64
As a verification step, run the Revo64 program.
1. Switch to the directory containing the executable:
$ cd MRS91Hadoop

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)

Summary Statistics Results for: ~.


Data: iris
Number of valid observations: 150

Name Mean StdDev Min Max ValidObs MissingObs


Sepal.Length 5.843333 0.8280661 4.3 7.9 150 0
Sepal.Width 3.057333 0.4358663 2.0 4.4 150 0
Petal.Length 3.758000 1.7652982 1.0 6.9 150 0
Petal.Width 1.199333 0.7622377 0.1 2.5 150 0

Category Counts for Species


Number of categories: 3
Number of valid observations: 150
Number of missing observations: 0

Species Counts
setosa 50
versicolor 50
virginica 50

To quit the program, type q() at the command line with no arguments.

Enable Remote Connections and Analytic Deployment


The server can be used as-is if you install and use an R IDE on the same box, but to benefit from the deployment
and consumption of web services with Microsoft R Server, then you must configure R Server after installation to
act as a deployment server and host analytic web services. Possible configurations are a one-box setup or an
enterprise setup. Doing so also enables remote execution, allowing you to connect to R Server from an R Client
workstation and execute code on the server.

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.

Considerations for uninstall and reinstallation of R Server on


Hadoop
You can uninstall and reinstall node by node across the cluster, but don’t try to submit any jobs until all nodes
are at the same functional level.
If you are upgrading the Hadoop cluster, you must uninstall and reinstall Microsoft R Server on the cluster.
You can either uninstall R Server before upgrading your cluster, or create and run a user-defined script that
repairs the R Server links as a post-upgrade operation. The simpler approach is to uninstall R Server first,
upgrade the cluster, and then reinstall R Server.

Before you uninstall


Uninstall reverses the installation steps, including uninstalling any package dependencies used only by R
Server, so the best place to start is by collecting some information about your installation:
Version of R Server in the cluster
Package location
Which nodes in the cluster have R Server

Program version and file locations


As a first step, use your package manager to list the currently installed R Server packages. Typically, CentOS
and Red Hat systems use yum, Ubuntu systems use apt-get, and SLES systems use zypper:
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. On a 9.1 installation, you will see about 9 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.3.3:
On RHEL: rpm -qi microsoft-r-open-mro-3.3.x86_64
On Ubuntu: dpkg --status microsoft-r-open-mro-3.3.x86_64
On SUSE: zypper info microsoft-r-open-mro-3.3.x86_64
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 )

General instructions for all versions


Packages are registered in a database that tracks all package installations in the cluster. To update the
database, use a package manager to remove the package: yum for Red Hat and CentOS, apt for Ubuntu, or
zypper for SUSE.
Log in as root or a user with sudo privileges. If you are using sudo , precede commands requiring root
privileges with sudo .
The Revo64 program runs on demand so stopping and disabling the server is not required.

How to uninstall 9.x


1. On any node, uninstall Microsoft R Open (MRO ) and remove any dependent packages used only by
MRO. Most packages are uninstalled with MRO, including Microsoft R Server.
On RHEL: yum erase microsoft-r-open-mro-3.3.x86_64
On Ubuntu: apt-get purge microsoft-r-open-mro-3.3
On SUSE: zypper remove microsoft-r-open-mro-3.3
2. On edge nodes only, you could have additional packages if you installed features for operationalizing
analytics. On a 9.0.1 installation, this is the mrsdeploy package, which you can uninstall using the same
syntax in the previous step. In the 9.1 release, multiple packages provide the feature. Uninstall each
one in the following order:
Microsoft-r-server-adminutil-9.1.x86_64
Microsoft-r-server-webnode-9.1.x86_64
Microsoft-r-server-computenode-9.1.x86_64
Microsoft-r-server-config-rserve-9.1.x86_64
3. On all nodes, after packages are removed, you should now remove remaining files. On the root node,
verify the location of other files that need to be removed:
$ ls /usr/lib64/microsoft-r
4. Remove the entire directory:
$ 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.
Repeat on each node in the cluster.

How to uninstall 8.0.5


1. Uninstall Microsoft R Open (MRO ) and remove any dependent packages used only by MRO:

yum erase microsoft-r-server-mro-8.0

2. On the root node, verify the location of other files that need to be removed: `
ls /usr/lib64/microsoft-r/8.0

3. Remove the entire directory:

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.

How to uninstall 8.0.0


1. Uninstall the Microsoft R Open for Microsoft R Server (MRO -for-MRS ) package:

yum erase MRO-for-MRS-8.0.0

2. Remove directories of MRS and MRO, in this order:

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

How to uninstall individual packages


If you remove Microsoft R Open (microsoft-r-server-mro-8.0-8.0.5-1.x86_64), you will also remove any
dependent packages used only by R Open.
Uninstall order is important. Due to package dependencies, be sure to remove the packages in the order
given below.

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

How to uninstall the Hadoop component


If you are uninstalling R Server 9.0.1 or 8.0.5, there is a Hadoop component that can be uninstalled
independently of other packages in the distribution:
microsoft-r-server-hadoop-9.0.1.x86_64
microsoft-r-server-hadoop-8.0-8.0.5-1.x86_64

For versions prior to 8.0.5, do the following:


Remove symlinks to libhfs.so and libjvm.so
Remove scaleR JARs (or symlinks to those JARs) from HADOOP_HOME/lib
See Also
Install R on Hadoop overview
Install Microsoft R Server on Linux
Troubleshoot R Server installation problems on Hadoop
Install Microsoft R Server 9.0.1 on Hadoop
6/18/2018 • 10 minutes to read • Edit Online

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.

Recommendations for installation


We recommend installing R Server on all nodes of the cluster to avoid Hadoop queuing up jobs on nodes that
don't actually have R Server. Although the task will eventually get reassigned to a node that has R Server, you will
see errors from the worker node and experience unnecessary delay while waiting for the error to resolve.
Microsoft Azure offers virtual machines with Hadoop templates. If you don't have a Hadoop cluster, you can
purchase and provision virtual machines on Azure using templates provided by several vendors.
1. Sign in to Azure portal.
2. Click New in the top left side bar.
3. In the search box, type the name of one of these vendors: Cloudera, HortonWorks, and MapR. Several of these
vendors offer sandbox deployments that make it easier to get started.

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.

Unpack the distribution


Download the software to a writable directory, such as /tmp, unpack the distribution and then run the installation
script.
The distribution includes one installer for Microsoft R Server. For a gzipped TAR file, you should unpack the file as
follows (be sure you have downloaded the file to a writable directory, such as /tmp):
1. Log in as root or a user with sudo privileges.
2. Switch to the /tmp directory (assuming it's the download location)
3. Unpack the file: [tmp] $ tar zxvf en_r_server_901_for_hadoop_x64_9648875.gz

Run the install script


Microsoft R Server 2016 for Hadoop is deployed by running the install script with the -p parameter, which you can
install at the root, or as super user via sudo .
1. Log in as root or a user with sudo privileges ( sudo su ). The following instructions assume user privileges with
the sudo override.
2. Verify system repositories are up to date: [username] $ sudo yum clean all
3. Change to the directory to which you mounted or unpacked the installer (for example, /mnt/mrsimage for an
.img file, or /tmp/MRS90HADOOP if you unpacked the tar.gz file): [username] $ cd /tmp [username tmp] $
cd /MRS90HADOOP
4. Run the script with the -p parameter, specifying the Hadoop component: [username tmp MRS90HADOOP ] $
sudo bash install.sh -p
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 to accept license terms for Microsoft R Server.
7. Installer output shows the packages and location of the log file.
Verify installation
1. List installed packages and get package names: [MRS90HADOOP ] $ yum list \*microsoft\*
[MRS90HADOOP ] $ yum list \*deployr\*
2. Check the version of Microsoft R Open using rpm -qi : [MRS90HADOOP ] $
rpm -qi microsoft-r-open-mro-3.3.x86_64

3. Check the version of Microsoft R Server: [MRS90HADOOP ] $


rpm -qi microsoft-r-server-packages-9.0.x86_64

4. Partial output is as follows (note version 9.0.1):

Name : microsoft-r-server-packages-9.0 Relocations: /usr/lib64


Version : 9.0.1 Vendor: Microsoft
. . .

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:

$ `hadoop fs -mkdir /user/RevoShare/$USER`


$ `hadoop fs -chmod uog+rwx /user/RevoShare/$USER`
$ `mkdir -p /var/RevoShare/$USER`
$ `chmod uog+rwx /var/RevoShare/$USER`

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")

Output for each command should be [1] TRUE .


As part of this process, make sure the base directories /user and /user/RevoShare have uog+rwx permissions as
well.
Run programs and sample jobs using sample data
The next procedure loads sample data and runs the Revo64 program to further verify the installation.
1. Send sample data to HDFS.

$ hadoop fs -mkdir -p /share/SampleData


$ hadoop fs -copyFromLocal /usr/lib64/microsoft-
r/9.0/lib64/R/library/RevoScaleR/SampleData/AirlineDemoSmall.csv /share/SampleData/
$ hadoop fs -ls /share/SampleData

2. Start Revo64.
$ cd MRS90Linux
$ Revo64

3. Run a simple local computation. This step uses the proprietary Microsoft libraries.

> rxSummary(~., iris)

Partial output is as follows (showing the first 4 lines).

Rows Read: 150, Total Rows Processed: 150, Total Chunk Time: 0.003 seconds
Computation time: 0.010 seconds.
Call:
rxSummary(formula = ~., data = iris)

4. Run a sample local job.


This step uses the sample dataset and downloads data from HDFS, confirming that your local session can
access HDFS.
Paste the following code into your Revo64 session.

input <- file.path("/share/SampleData/AirlineDemoSmall.csv")

colInfo <- list(DayOfWeek = list(type = "factor",


levels = c("Monday", "Tuesday", "Wednesday", "Thursday","Friday", "Saturday", "Sunday")))

airDS <- RxTextData(file = input, missingValueString = "M", colInfo = colInfo, fileSystem =


RxHdfsFileSystem())

adsSummary <- rxSummary(~ArrDelay+CRSDepTime+DayOfWeek, data = airDS)


adsSummary

Partial output is as follows (showing the last 8 lines).

DayOfWeek Counts
Monday 97975
Tuesday 77725
Wednesday 78875
Thursday 81304
Friday 82987
Saturday 86159
Sunday 94975

5. Run a sample Hadoop job.


This step uses the sample dataset to run a Hadoop job.
Paste the following code into your Revo64 session. This snippet differs from the previous snippet by the
first line.
rxSetComputeContext(RxHadoopMR(consoleOutput=TRUE))
input <- file.path("/share/SampleData/AirlineDemoSmall.csv")

colInfo <- list(DayOfWeek = list(type = "factor",


levels = c("Monday", "Tuesday", "Wednesday", "Thursday","Friday", "Saturday", "Sunday")))

airDS <- RxTextData(file = input, missingValueString = "M", colInfo = colInfo, fileSystem =


RxHdfsFileSystem())

adsSummary <- rxSummary(~ArrDelay+CRSDepTime+DayOfWeek, data = airDS)


adsSummary

Partial output is as follows (showing the first 10 lines).

====== 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:

6. Run a sample Spark job.

rxSetComputeContext(RxSpark(consoleOutput=TRUE, executorMem="1g", driverMem="1g",


executorOverheadMem="1g", numExecutors=2))
input <- file.path("/share/SampleData/AirlineDemoSmall.csv")

colInfo <- list(DayOfWeek = list(type = "factor",


levels = c("Monday", "Tuesday", "Wednesday", "Thursday","Friday", "Saturday", "Sunday")))

airDS <- RxTextData(file = input, missingValueString = "M", colInfo = colInfo, fileSystem =


RxHdfsFileSystem())

adsSummary <- rxSummary(~ArrDelay+CRSDepTime+DayOfWeek, data = airDS)


adsSummary

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

For RHEL/CENTOS systems; tar zxvf MRS80RHEL.tar.gz


For SLES systems; tar zxvf MRS80SLES.tar.gz
2. Copy the installer gzipped tar file to a writable directory, such as /tmp:
From the mounted img file: cp /mnt/mrsimage/Microsoft-R -Server- * .tar.gz /tmp
From the unpacked tar file: cp /tmp/MRS80/Microsoft-R -Server- </em> .tar.gz /tmp
3. The following commands use pdsh and pdcp to distribute and install Microsoft R Server (ensure that each
command is 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):

alias pdshw=’pdsh -w\`cat myhosts.txt\` -R ssh’


alias pdcpw=’pdcp -w\`cat myhosts.txt\` -R ssh’
pdshw
> mkdir -p /var/tmp/revo-install
> exit
pdcpw /tmp/MRS90HADOOP.tar.gz /var/tmp/revo-install
pdshw
> cd /var/tmp/revo-install; yum clean all
> tar zxf MRS90HADOOP.tar.gz
> cd MRS90HADOOP; sudo bash ./install.sh -a -p
> exit

Install additional packages on each node using rxExec


Once