Partilhar via


Configure Machine Learning Server 9.2.1 to operationalize analytics (One-box)

Important

This content is being retired and may not be updated in the future. The support for Machine Learning Server will end on July 1, 2022. For more information, see What's happening to Machine Learning Server?

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.

Configure Machine Learning Server on one-box architecture

How to configure

Important

For a speedy setup in Azure, try one of our Azure Resource Manager 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.